1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 23:03:22 +02:00
GPXSee/src/GUI/heartrategraphitem.cpp

24 lines
553 B
C++

#include <QLocale>
#include "tooltip.h"
#include "heartrategraphitem.h"
HeartRateGraphItem::HeartRateGraphItem(const Graph &graph, GraphType type,
int width, const QColor &color, QGraphicsItem *parent)
: GraphItem(graph, type, width, color, Qt::SolidLine, parent)
{
}
QString HeartRateGraphItem::info() const
{
ToolTip tt;
QLocale l(QLocale::system());
tt.insert(tr("Maximum"), l.toString(max(), 'f', 0)
+ UNIT_SPACE + tr("bpm"));
tt.insert(tr("Average"), l.toString(avg(), 'f', 0)
+ UNIT_SPACE + tr("bpm"));
return tt.toString();
}