2015-10-12 01:12:12 +02:00
|
|
|
#ifndef SPEEDGRAPH_H
|
|
|
|
#define SPEEDGRAPH_H
|
|
|
|
|
|
|
|
#include <QList>
|
2016-02-11 20:58:52 +01:00
|
|
|
#include "graphview.h"
|
2015-12-19 20:23:07 +01:00
|
|
|
#include "units.h"
|
2015-10-12 01:12:12 +02:00
|
|
|
|
2016-02-12 10:23:14 +01:00
|
|
|
class GPX;
|
|
|
|
|
2016-02-11 20:58:52 +01:00
|
|
|
class SpeedGraph : public GraphView
|
2015-10-12 01:12:12 +02:00
|
|
|
{
|
2015-10-13 00:27:49 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
2015-10-12 01:12:12 +02:00
|
|
|
public:
|
2015-10-17 01:33:02 +02:00
|
|
|
SpeedGraph(QWidget *parent = 0);
|
2015-10-12 01:12:12 +02:00
|
|
|
|
2015-10-17 12:08:30 +02:00
|
|
|
void loadGPX(const GPX &gpx);
|
2015-10-12 01:12:12 +02:00
|
|
|
void clear();
|
2015-12-19 20:23:07 +01:00
|
|
|
void setUnits(enum Units units);
|
2015-10-12 01:12:12 +02:00
|
|
|
|
2015-10-19 00:35:08 +02:00
|
|
|
qreal avg() const;
|
2016-03-27 13:23:00 +02:00
|
|
|
qreal max() const {return bounds().bottom();}
|
2015-10-19 00:35:08 +02:00
|
|
|
|
2015-10-12 01:12:12 +02:00
|
|
|
private:
|
2016-03-27 15:04:58 +02:00
|
|
|
void setXUnits();
|
|
|
|
void setYUnits();
|
2015-12-19 20:23:07 +01:00
|
|
|
void addInfo();
|
|
|
|
|
2015-10-12 01:12:12 +02:00
|
|
|
QList<QPointF> _avg;
|
2016-03-27 15:04:58 +02:00
|
|
|
enum Units _units;
|
2015-10-12 01:12:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SPEEDGRAPH_H
|