1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +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);
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);
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);
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