mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
25 lines
568 B
C++
25 lines
568 B
C++
#include <QLocale>
|
|
#include "tooltip.h"
|
|
#include "cadencegraphitem.h"
|
|
|
|
|
|
CadenceGraphItem::CadenceGraphItem(const Graph &graph, GraphType type,
|
|
int width, const QColor &color, QGraphicsItem *parent)
|
|
: GraphItem(graph, type, width, color, Qt::SolidLine, parent)
|
|
{
|
|
}
|
|
|
|
ToolTip CadenceGraphItem::info(bool extended) const
|
|
{
|
|
Q_UNUSED(extended);
|
|
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;
|
|
}
|