1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00
GPXSee/src/data/data.h

46 lines
1010 B
C
Raw Normal View History

2016-10-23 11:09:20 +02:00
#ifndef DATA_H
#define DATA_H
2015-10-05 01:43:48 +02:00
#include <QList>
#include <QMultiMap>
2015-10-05 01:43:48 +02:00
#include <QString>
2017-07-27 19:47:46 +02:00
#include <QStringList>
#include "waypoint.h"
#include "track.h"
2016-08-09 01:16:19 +02:00
#include "route.h"
#include "parser.h"
2015-10-05 01:43:48 +02:00
2019-01-18 00:17:28 +01:00
class Data
2015-10-05 01:43:48 +02:00
{
public:
Data(const QString &fileName, bool tryUnknown = true);
2019-01-18 00:17:28 +01:00
bool isValid() const {return _valid;}
2016-10-23 11:09:20 +02:00
const QString &errorString() const {return _errorString;}
int errorLine() const {return _errorLine;}
2015-10-12 01:12:12 +02:00
2019-01-31 01:46:53 +01:00
const QList<Track> &tracks() const {return _tracks;}
const QList<Route> &routes() const {return _routes;}
2019-01-18 00:17:28 +01:00
const QVector<Waypoint> &waypoints() const {return _waypoints;}
2019-01-31 01:46:53 +01:00
const QList<Area> &areas() const {return _polygons;}
2017-07-27 19:47:46 +02:00
static QString formats();
static QStringList filter();
2015-10-05 01:43:48 +02:00
private:
void processData(QList<TrackData> &trackData, QList<RouteData> &routeData);
2019-01-18 00:17:28 +01:00
bool _valid;
2016-10-23 11:09:20 +02:00
QString _errorString;
int _errorLine;
2019-01-31 01:46:53 +01:00
QList<Track> _tracks;
QList<Route> _routes;
QList<Area> _polygons;
2019-01-18 00:17:28 +01:00
QVector<Waypoint> _waypoints;
static QMultiMap<QString, Parser*> _parsers;
2015-10-05 01:43:48 +02:00
};
2016-10-23 11:09:20 +02:00
#endif // DATA_H