2016-10-23 11:09:20 +02:00
|
|
|
#ifndef TCXPARSER_H
|
|
|
|
#define TCXPARSER_H
|
|
|
|
|
|
|
|
#include <QXmlStreamReader>
|
|
|
|
#include "parser.h"
|
|
|
|
|
|
|
|
|
|
|
|
class TCXParser : public Parser
|
|
|
|
{
|
|
|
|
public:
|
2019-01-31 01:46:53 +01:00
|
|
|
bool parse(QFile *file, QList<TrackData> &tracks, QList<RouteData> &routes,
|
|
|
|
QList<Area> &polygons, QVector<Waypoint> &waypoints);
|
2016-10-23 11:09:20 +02:00
|
|
|
QString errorString() const {return _reader.errorString();}
|
|
|
|
int errorLine() const {return _reader.lineNumber();}
|
|
|
|
|
|
|
|
private:
|
2019-01-18 00:17:28 +01:00
|
|
|
void tcx(QList<TrackData> &tracks, QVector<Waypoint> &waypoints);
|
|
|
|
void courses(QList<TrackData> &tracks, QVector<Waypoint> &waypoints);
|
2017-07-27 19:47:46 +02:00
|
|
|
void activities(QList<TrackData> &tracks);
|
2017-10-14 22:57:03 +02:00
|
|
|
void multiSportSession(QList<TrackData> &tracks);
|
|
|
|
void sport(QList<TrackData> &tracks);
|
2019-01-18 00:17:28 +01:00
|
|
|
void course(QVector<Waypoint> &waypoints, TrackData &track);
|
2016-10-28 14:33:36 +02:00
|
|
|
void activity(TrackData &track);
|
2019-02-11 23:28:08 +01:00
|
|
|
void lap(SegmentData &segment);
|
|
|
|
void trackpoints(SegmentData &segment);
|
2016-10-27 09:15:05 +02:00
|
|
|
void trackpointData(Trackpoint &trackpoint);
|
|
|
|
void waypointData(Waypoint &waypoint);
|
2016-11-06 03:28:08 +01:00
|
|
|
void extensions(Trackpoint &trackpoint);
|
2017-09-14 20:18:34 +02:00
|
|
|
void heartRateBpm(Trackpoint &trackpoint);
|
2016-10-24 00:21:40 +02:00
|
|
|
Coordinates position();
|
2016-10-27 09:15:05 +02:00
|
|
|
qreal number();
|
|
|
|
QDateTime time();
|
2016-10-23 11:09:20 +02:00
|
|
|
|
2016-11-02 17:33:06 +01:00
|
|
|
void warning(const char *text) const;
|
2016-10-29 10:40:30 +02:00
|
|
|
|
2016-10-23 11:09:20 +02:00
|
|
|
QXmlStreamReader _reader;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TCXPARSER_H
|