Use the canonical file name also for the "already open" check
[GPXSee.git] / src / GUI / powergraphitem.cpp
blobefc22c71d6ec54fc89be692b7724889653efdd03
1 #include <QLocale>
2 #include "tooltip.h"
3 #include "powergraphitem.h"
6 PowerGraphItem::PowerGraphItem(const Graph &graph, GraphType type, int width,
7 const QColor &color, QGraphicsItem *parent)
8 : GraphItem(graph, type, width, color, Qt::SolidLine, parent)
12 ToolTip PowerGraphItem::info() const
14 ToolTip tt;
15 QLocale l(QLocale::system());
17 tt.insert(tr("Maximum"), l.toString(max(), 'f', 1)
18 + UNIT_SPACE + tr("W"));
19 tt.insert(tr("Average"), l.toString(avg(), 'f', 1)
20 + UNIT_SPACE + tr("W"));
22 return tt;