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

38 lines
1.1 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,
2019-02-01 00:26:27 +01:00
QList<Area> &areas, 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-02-01 00:26:27 +01:00
QList<Area> &areas, QVector<Waypoint> &waypoints);
void track(TrackData &track);
2019-02-11 23:28:08 +01:00
void trackpoints(SegmentData &segment);
void routepoints(RouteData &route, QList<TrackData> &tracks);
2019-02-11 23:28:08 +01:00
void rpExtension(SegmentData *autoRoute);
2016-10-27 08:09:12 +02:00
void tpExtension(Trackpoint &trackpoint);
void trkptExtensions(Trackpoint &trackpoint);
2019-02-11 23:28:08 +01:00
void rteptExtensions(SegmentData *autoRoute);
2019-02-01 00:26:27 +01:00
void area(Area &area);
void gpxExtensions(QList<Area> &areas);
2016-10-27 08:09:12 +02:00
void trackpointData(Trackpoint &trackpoint);
2019-02-11 23:28:08 +01:00
void waypointData(Waypoint &waypoint, SegmentData *autoRoute = 0);
qreal number();
QDateTime time();
Coordinates coordinates();
2019-10-14 01:16:38 +02:00
Link link();
2016-10-23 11:09:20 +02:00
QXmlStreamReader _reader;
};
#endif // GPXPARSER_H