1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-07 07:13:21 +02:00
GPXSee/src/GUI/powergraphitem.cpp

24 lines
518 B
C++
Raw Normal View History

#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, parent)
{
}
QString PowerGraphItem::info() const
{
ToolTip tt;
QLocale l(QLocale::system());
tt.insert(tr("Maximum"), l.toString(max(), 'f', 1)
2018-09-09 15:26:45 +02:00
+ UNIT_SPACE + tr("W"));
tt.insert(tr("Average"), l.toString(avg(), 'f', 1)
2018-09-09 15:26:45 +02:00
+ UNIT_SPACE + tr("W"));
return tt.toString();
}