2016-08-09 01:16:19 +02:00
|
|
|
#ifndef ROUTE_H
|
|
|
|
#define ROUTE_H
|
|
|
|
|
|
|
|
#include <QVector>
|
2016-10-28 14:33:36 +02:00
|
|
|
#include "routedata.h"
|
2016-09-19 00:56:10 +02:00
|
|
|
#include "graph.h"
|
2016-11-14 22:12:43 +01:00
|
|
|
#include "path.h"
|
2016-08-09 01:16:19 +02:00
|
|
|
|
|
|
|
class Route
|
|
|
|
{
|
|
|
|
public:
|
2016-10-28 14:33:36 +02:00
|
|
|
Route(const RouteData &data);
|
2016-08-09 01:16:19 +02:00
|
|
|
|
2019-08-29 20:15:03 +02:00
|
|
|
const RouteData &data() const {return _data;}
|
2020-03-25 23:08:26 +01:00
|
|
|
Path path() const;
|
|
|
|
GraphPair elevation() const;
|
2016-08-09 23:08:49 +02:00
|
|
|
qreal distance() const;
|
|
|
|
|
2017-03-18 01:30:31 +01:00
|
|
|
const QString &name() const {return _data.name();}
|
|
|
|
const QString &description() const {return _data.description();}
|
2020-03-09 20:04:13 +01:00
|
|
|
const QString &comment() const {return _data.comment();}
|
2019-10-14 20:07:05 +02:00
|
|
|
const QVector<Link> &links() const {return _data.links();}
|
2017-03-18 01:30:31 +01:00
|
|
|
|
2019-01-31 01:46:53 +01:00
|
|
|
bool isValid() const {return _data.size() >= 2;}
|
2016-08-09 01:16:19 +02:00
|
|
|
|
2020-03-25 23:08:26 +01:00
|
|
|
static void useDEM(bool use) {_useDEM = use;}
|
|
|
|
static void showSecondaryElevation(bool show)
|
|
|
|
{_show2ndElevation = show;}
|
|
|
|
|
2016-08-09 01:16:19 +02:00
|
|
|
private:
|
2020-03-25 23:08:26 +01:00
|
|
|
Graph gpsElevation() const;
|
|
|
|
Graph demElevation() const;
|
|
|
|
|
2019-01-31 01:46:53 +01:00
|
|
|
RouteData _data;
|
2016-09-19 23:35:04 +02:00
|
|
|
QVector<qreal> _distance;
|
2020-03-25 23:08:26 +01:00
|
|
|
|
|
|
|
static bool _useDEM;
|
|
|
|
static bool _show2ndElevation;
|
2016-08-09 01:16:19 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ROUTE_H
|