mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
#ifndef GPXPARSER_H
|
|
#define GPXPARSER_H
|
|
|
|
#include <QXmlStreamReader>
|
|
#include "parser.h"
|
|
|
|
class GPXParser : public Parser
|
|
{
|
|
public:
|
|
bool parse(QFile *file, QList<TrackData> &tracks, QList<RouteData> &routes,
|
|
QList<Area> &areas, QVector<Waypoint> &waypoints);
|
|
QString errorString() const {return _reader.errorString();}
|
|
int errorLine() const {return _reader.lineNumber();}
|
|
|
|
private:
|
|
void gpx(QList<TrackData> &tracks, QList<RouteData> &routes,
|
|
QList<Area> &areas, QVector<Waypoint> &waypoints);
|
|
void track(TrackData &track);
|
|
void trackpoints(SegmentData &segment);
|
|
void routepoints(RouteData &route, QList<TrackData> &tracks);
|
|
void rpExtension(SegmentData *autoRoute);
|
|
void tpExtension(Trackpoint &trackpoint);
|
|
void trkptExtensions(Trackpoint &trackpoint);
|
|
void rteptExtensions(SegmentData *autoRoute);
|
|
void area(Area &area);
|
|
void gpxExtensions(QList<Area> &areas);
|
|
void trackpointData(Trackpoint &trackpoint);
|
|
void waypointData(Waypoint &waypoint, SegmentData *autoRoute = 0);
|
|
qreal number();
|
|
QDateTime time();
|
|
Coordinates coordinates();
|
|
Link link();
|
|
|
|
QXmlStreamReader _reader;
|
|
};
|
|
|
|
#endif // GPXPARSER_H
|