mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-02 22:09:16 +02:00
@ -1,7 +1,9 @@
|
||||
#include <QLocale>
|
||||
#include "tooltip.h"
|
||||
#include "format.h"
|
||||
#include "speedgraphitem.h"
|
||||
|
||||
|
||||
SpeedGraphItem::SpeedGraphItem(const Graph &graph, GraphType type,
|
||||
qreal movingTime, QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||
{
|
||||
@ -25,10 +27,11 @@ QString SpeedGraphItem::toolTip() const
|
||||
? avg() * scale : mavg() * scale)), false);
|
||||
QString pu = (_units == Metric) ? tr("min/km") : (_units == Imperial) ?
|
||||
tr("min/mi") : tr("min/nmi");
|
||||
QLocale l(QLocale::system());
|
||||
|
||||
tt.insert(tr("Maximum"), QString::number(max() * scale, 'f', 1)
|
||||
tt.insert(tr("Maximum"), l.toString(max() * scale, 'f', 1)
|
||||
+ UNIT_SPACE + su);
|
||||
tt.insert(tr("Average"), QString::number((_timeType == Total)
|
||||
tt.insert(tr("Average"), l.toString((_timeType == Total)
|
||||
? avg() * scale : mavg() * scale, 'f', 1) + UNIT_SPACE + su);
|
||||
tt.insert(tr("Pace"), pace + UNIT_SPACE + pu);
|
||||
|
||||
|
Reference in New Issue
Block a user