2016-10-23 11:09:20 +02:00
|
|
|
#ifndef TCXPARSER_H
|
|
|
|
#define TCXPARSER_H
|
|
|
|
|
|
|
|
#include <QXmlStreamReader>
|
|
|
|
#include "parser.h"
|
|
|
|
|
|
|
|
|
|
|
|
class TCXParser : public Parser
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
~TCXParser() {}
|
|
|
|
|
2017-07-27 19:47:46 +02:00
|
|
|
bool parse(QFile *file, QList<TrackData> &tracks,
|
|
|
|
QList<RouteData> &routes, QList<Waypoint> &waypoints);
|
2016-10-23 11:09:20 +02:00
|
|
|
QString errorString() const {return _reader.errorString();}
|
|
|
|
int errorLine() const {return _reader.lineNumber();}
|
|
|
|
|
|
|
|
private:
|
2017-07-27 19:47:46 +02:00
|
|
|
void tcx(QList<TrackData> &tracks, QList<Waypoint> &waypoints);
|
|
|
|
void courses(QList<TrackData> &tracks, QList<Waypoint> &waypoints);
|
|
|
|
void activities(QList<TrackData> &tracks);
|
|
|
|
void course(QList<Waypoint> &waypoints, TrackData &track);
|
2016-10-28 14:33:36 +02:00
|
|
|
void activity(TrackData &track);
|
|
|
|
void lap(TrackData &track);
|
|
|
|
void trackpoints(TrackData &track);
|
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
|