2016-03-21 22:37:55 +01:00
|
|
|
#ifndef HEARTRATEGRAPH_H
|
|
|
|
#define HEARTRATEGRAPH_H
|
|
|
|
|
2016-06-24 00:55:44 +02:00
|
|
|
#include "graphtab.h"
|
2016-03-21 22:37:55 +01:00
|
|
|
|
2019-08-25 10:54:25 +02:00
|
|
|
class HeartRateGraphItem;
|
|
|
|
|
2016-06-24 00:55:44 +02:00
|
|
|
class HeartRateGraph : public GraphTab
|
2016-03-21 22:37:55 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
HeartRateGraph(QWidget *parent = 0);
|
2019-08-25 10:54:25 +02:00
|
|
|
~HeartRateGraph();
|
2016-03-21 22:37:55 +01:00
|
|
|
|
2016-06-24 00:55:44 +02:00
|
|
|
QString label() const {return tr("Heart rate");}
|
2018-05-04 19:36:37 +02:00
|
|
|
QList<GraphItem*> loadData(const Data &data);
|
2016-03-21 22:37:55 +01:00
|
|
|
void clear();
|
2016-08-16 00:27:54 +02:00
|
|
|
void showTracks(bool show);
|
2016-03-21 22:37:55 +01:00
|
|
|
|
2016-06-24 00:55:44 +02:00
|
|
|
private:
|
2016-03-21 22:37:55 +01:00
|
|
|
qreal avg() const;
|
2016-03-27 13:23:00 +02:00
|
|
|
qreal max() const {return bounds().bottom();}
|
2016-08-09 01:16:19 +02:00
|
|
|
void setInfo();
|
2016-03-21 22:37:55 +01:00
|
|
|
|
2019-03-15 19:43:17 +01:00
|
|
|
QVector<QPointF> _avg;
|
2016-08-19 19:48:44 +02:00
|
|
|
|
|
|
|
bool _showTracks;
|
2019-08-25 10:54:25 +02:00
|
|
|
QList<HeartRateGraphItem*> _tracks;
|
2016-03-21 22:37:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // HEARTRATEGRAPH_H
|