2016-06-16 20:33:56 +02:00
|
|
|
#ifndef TEMPERATUREGRAPH_H
|
|
|
|
#define TEMPERATUREGRAPH_H
|
|
|
|
|
2016-06-24 00:55:44 +02:00
|
|
|
#include "graphtab.h"
|
2016-06-16 20:33:56 +02:00
|
|
|
|
|
|
|
class GPX;
|
|
|
|
|
2016-06-24 00:55:44 +02:00
|
|
|
class TemperatureGraph : public GraphTab
|
2016-06-16 20:33:56 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
TemperatureGraph(QWidget *parent = 0);
|
|
|
|
|
2016-06-24 00:55:44 +02:00
|
|
|
QString label() const {return tr("Temperature");}
|
2016-06-16 20:33:56 +02:00
|
|
|
void loadGPX(const GPX &gpx);
|
|
|
|
void clear();
|
|
|
|
void setUnits(enum Units units);
|
2016-08-16 00:27:54 +02:00
|
|
|
void showTracks(bool show);
|
|
|
|
void showRoutes(bool show) {Q_UNUSED(show);}
|
2016-06-16 20:33:56 +02:00
|
|
|
|
2016-06-24 00:55:44 +02:00
|
|
|
private:
|
2016-06-16 20:33:56 +02:00
|
|
|
qreal avg() const;
|
|
|
|
qreal min() const {return bounds().top();}
|
|
|
|
qreal max() const {return bounds().bottom();}
|
|
|
|
void setXUnits();
|
|
|
|
void setYUnits();
|
2016-08-09 01:16:19 +02:00
|
|
|
void setInfo();
|
2016-06-16 20:33:56 +02:00
|
|
|
|
|
|
|
QList<QPointF> _avg;
|
2016-08-19 19:48:44 +02:00
|
|
|
|
2016-06-16 20:33:56 +02:00
|
|
|
enum Units _units;
|
2016-08-19 19:48:44 +02:00
|
|
|
bool _showTracks;
|
2016-06-16 20:33:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TEMPERATUREGRAPH_H
|