mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-31 17:15:14 +01:00
24 lines
522 B
C++
24 lines
522 B
C++
#include <QLocale>
|
|
#include "tooltip.h"
|
|
#include "powergraphitem.h"
|
|
|
|
|
|
PowerGraphItem::PowerGraphItem(const Graph &graph, GraphType type, int width,
|
|
const QColor &color, QGraphicsItem *parent)
|
|
: GraphItem(graph, type, width, color, Qt::SolidLine, parent)
|
|
{
|
|
}
|
|
|
|
ToolTip PowerGraphItem::info() const
|
|
{
|
|
ToolTip tt;
|
|
QLocale l(QLocale::system());
|
|
|
|
tt.insert(tr("Maximum"), l.toString(max(), 'f', 1)
|
|
+ UNIT_SPACE + tr("W"));
|
|
tt.insert(tr("Average"), l.toString(avg(), 'f', 1)
|
|
+ UNIT_SPACE + tr("W"));
|
|
|
|
return tt;
|
|
}
|