1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 13:41:16 +01:00
GPXSee/src/data/gpxparser.h

36 lines
1.0 KiB
C
Raw Normal View History

2016-10-23 11:09:20 +02:00
#ifndef GPXPARSER_H
#define GPXPARSER_H
#include <QXmlStreamReader>
#include "parser.h"
class GPXParser : 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:
2017-07-27 19:47:46 +02:00
void gpx(QList<TrackData> &tracks, QList<RouteData> &routes,
2019-01-18 00:17:28 +01:00
QVector<Waypoint> &waypoints);
void track(TrackData &track);
void trackpoints(TrackData &track);
void routepoints(RouteData &route, QList<TrackData> &tracks);
void rpExtension(TrackData *autoRoute);
2016-10-27 08:09:12 +02:00
void tpExtension(Trackpoint &trackpoint);
void trkptExtensions(Trackpoint &trackpoint);
void rteptExtensions(TrackData *autoRoute);
2016-10-27 08:09:12 +02:00
void trackpointData(Trackpoint &trackpoint);
void waypointData(Waypoint &waypoint, TrackData *autoRoute = 0);
qreal number();
QDateTime time();
Coordinates coordinates();
2016-10-23 11:09:20 +02:00
QXmlStreamReader _reader;
};
#endif // GPXPARSER_H