mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
46 lines
1004 B
C++
46 lines
1004 B
C++
#ifndef DATA_H
|
|
#define DATA_H
|
|
|
|
#include <QList>
|
|
#include <QMultiMap>
|
|
#include <QString>
|
|
#include <QStringList>
|
|
#include "waypoint.h"
|
|
#include "track.h"
|
|
#include "route.h"
|
|
#include "parser.h"
|
|
|
|
class Data
|
|
{
|
|
public:
|
|
Data(const QString &fileName, bool full = true);
|
|
|
|
bool isValid() const {return _valid;}
|
|
const QString &errorString() const {return _errorString;}
|
|
int errorLine() const {return _errorLine;}
|
|
|
|
const QList<Track> &tracks() const {return _tracks;}
|
|
const QList<Route> &routes() const {return _routes;}
|
|
const QVector<Waypoint> &waypoints() const {return _waypoints;}
|
|
const QList<Area> &areas() const {return _polygons;}
|
|
|
|
static QString formats();
|
|
static QStringList filter();
|
|
|
|
private:
|
|
void processData(QList<TrackData> &trackData, QList<RouteData> &routeData);
|
|
|
|
bool _valid;
|
|
QString _errorString;
|
|
int _errorLine;
|
|
|
|
QList<Track> _tracks;
|
|
QList<Route> _routes;
|
|
QList<Area> _polygons;
|
|
QVector<Waypoint> _waypoints;
|
|
|
|
static QMultiMap<QString, Parser*> _parsers;
|
|
};
|
|
|
|
#endif // DATA_H
|