1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 19:55:53 +01:00
GPXSee/src/data/kmlparser.h

53 lines
1.7 KiB
C
Raw Normal View History

#ifndef KMLPARSER_H
#define KMLPARSER_H
#include <QXmlStreamReader>
2016-10-25 22:50:11 +02:00
#include <QDateTime>
#include "parser.h"
class KMLParser : public Parser
{
public:
2019-01-31 01:46:53 +01:00
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:
2019-01-31 01:46:53 +01:00
void kml(QList<TrackData> &tracks, QList<Area> &areas,
QVector<Waypoint> &waypoints);
void document(QList<TrackData> &tracks, QList<Area> &areas,
QVector<Waypoint> &waypoints);
void folder(QList<TrackData> &tracks, QList<Area> &areas,
QVector<Waypoint> &waypoints);
void placemark(QList<TrackData> &tracks, QList<Area> &areas,
QVector<Waypoint> &waypoints);
void multiGeometry(QList<TrackData> &tracks, QList<Area> &areas,
QVector<Waypoint> &waypoints, const QString &name, const QString &desc,
const QDateTime timestamp);
void track(TrackData &track);
void multiTrack(TrackData &t);
void lineString(TrackData &track);
2019-01-31 01:46:53 +01:00
void linearRing(QVector<Coordinates> &coordinates);
void boundary(QVector<Coordinates> &coordinates);
void polygon(Area &area);
2016-10-27 22:33:35 +02:00
void point(Waypoint &waypoint);
bool pointCoordinates(Waypoint &waypoint);
bool lineCoordinates(TrackData &track);
2019-01-31 01:46:53 +01:00
bool polygonCoordinates(QVector<Coordinates> &points);
2016-10-28 19:12:40 +02:00
bool coord(Trackpoint &trackpoint);
void extendedData(TrackData &track, int start);
void schemaData(TrackData &track, int start);
void heartRate(TrackData &track, int start);
void cadence(TrackData &track, int start);
void speed(TrackData &track, int start);
void temperature(TrackData &track, int start);
QDateTime timeStamp();
2016-10-27 22:33:35 +02:00
qreal number();
QDateTime time();
QXmlStreamReader _reader;
};
#endif // KMLPARSER_H