2015-10-05 01:43:48 +02:00
|
|
|
#ifndef TRACK_H
|
|
|
|
#define TRACK_H
|
|
|
|
|
|
|
|
#include <QVector>
|
2016-02-11 20:58:52 +01:00
|
|
|
#include <QDateTime>
|
|
|
|
#include "trackpoint.h"
|
2016-09-19 00:56:10 +02:00
|
|
|
#include "graph.h"
|
2015-10-05 01:43:48 +02:00
|
|
|
|
2016-02-11 20:58:52 +01:00
|
|
|
class Track
|
2015-10-05 01:43:48 +02:00
|
|
|
{
|
|
|
|
public:
|
2016-03-21 22:37:55 +01:00
|
|
|
Track(const QVector<Trackpoint> &data);
|
2015-10-05 01:43:48 +02:00
|
|
|
|
2016-08-15 08:20:27 +02:00
|
|
|
const QVector<Trackpoint> &track() const {return _data;}
|
2016-09-19 00:56:10 +02:00
|
|
|
Graph elevation() const;
|
|
|
|
Graph speed() const;
|
|
|
|
Graph heartRate() const;
|
|
|
|
Graph temperature() const;
|
2016-08-09 23:08:49 +02:00
|
|
|
|
|
|
|
qreal distance() const;
|
2016-02-11 20:58:52 +01:00
|
|
|
qreal time() const;
|
|
|
|
QDateTime date() const;
|
2015-11-23 02:37:08 +01:00
|
|
|
|
2016-09-19 23:35:04 +02:00
|
|
|
bool isNull() const {return (_data.size() < 2);}
|
2016-07-28 00:23:22 +02:00
|
|
|
|
2015-10-05 01:43:48 +02:00
|
|
|
private:
|
2016-02-19 21:42:54 +01:00
|
|
|
const QVector<Trackpoint> &_data;
|
2016-09-19 23:35:04 +02:00
|
|
|
QVector<qreal> _distance;
|
|
|
|
QVector<qreal> _time;
|
2015-10-05 01:43:48 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TRACK_H
|