#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(TrackData &track); void routepoints(RouteData &route, QList &tracks); void rpExtension(TrackData *autoRoute); void tpExtension(Trackpoint &trackpoint); void trkptExtensions(Trackpoint &trackpoint); void rteptExtensions(TrackData *autoRoute); void area(Area &area); void gpxExtensions(QList &areas); void trackpointData(Trackpoint &trackpoint); void waypointData(Waypoint &waypoint, TrackData *autoRoute = 0); qreal number(); QDateTime time(); Coordinates coordinates(); QXmlStreamReader _reader; }; #endif // GPXPARSER_H