#ifndef GPXPARSER_H #define GPXPARSER_H #include #include "parser.h" class GPXParser : public Parser { public: bool parse(QFile *file, QList &tracks, QList &routes, QList &areas, QVector &waypoints); QString errorString() const {return _reader.errorString();} int errorLine() const {return _reader.lineNumber();} private: void gpx(QList &tracks, QList &routes, QList &areas, QVector &waypoints); void track(TrackData &track); void trackpoints(SegmentData &segment); void routepoints(RouteData &route, QList &tracks); void rpExtension(SegmentData *autoRoute); void tpExtension(Trackpoint &trackpoint); void trkptExtensions(Trackpoint &trackpoint); void rteptExtensions(SegmentData *autoRoute); void area(Area &area); void gpxExtensions(QList &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