mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-31 00:55:13 +01:00
24 lines
509 B
C++
24 lines
509 B
C++
#include <QLocale>
|
|
#include "tooltip.h"
|
|
#include "cadencegraphitem.h"
|
|
|
|
|
|
CadenceGraphItem::CadenceGraphItem(const Graph &graph, GraphType type,
|
|
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
|
{
|
|
setToolTip(toolTip());
|
|
}
|
|
|
|
QString CadenceGraphItem::toolTip() const
|
|
{
|
|
ToolTip tt;
|
|
QLocale l(QLocale::system());
|
|
|
|
tt.insert(tr("Maximum"), l.toString(max(), 'f', 1)
|
|
+ UNIT_SPACE + tr("rpm"));
|
|
tt.insert(tr("Average"), l.toString(avg(), 'f', 1)
|
|
+ UNIT_SPACE + tr("rpm"));
|
|
|
|
return tt.toString();
|
|
}
|