2018-09-09 18:46:43 +02:00
|
|
|
#include <QLocale>
|
2017-09-24 19:54:13 +02:00
|
|
|
#include "tooltip.h"
|
|
|
|
#include "cadencegraphitem.h"
|
|
|
|
|
2018-09-09 18:46:43 +02:00
|
|
|
|
2017-10-04 23:15:39 +02:00
|
|
|
CadenceGraphItem::CadenceGraphItem(const Graph &graph, GraphType type,
|
2019-08-25 10:54:25 +02:00
|
|
|
int width, const QColor &color, QGraphicsItem *parent)
|
2020-03-25 23:08:26 +01:00
|
|
|
: GraphItem(graph, type, width, color, Qt::SolidLine, parent)
|
2017-09-24 19:54:13 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-09-06 00:05:36 +02:00
|
|
|
ToolTip CadenceGraphItem::info(bool extended) const
|
2017-09-24 19:54:13 +02:00
|
|
|
{
|
2024-09-06 00:05:36 +02:00
|
|
|
Q_UNUSED(extended);
|
2017-09-24 19:54:13 +02:00
|
|
|
ToolTip tt;
|
2018-09-09 18:46:43 +02:00
|
|
|
QLocale l(QLocale::system());
|
2017-09-24 19:54:13 +02:00
|
|
|
|
2018-09-09 18:46:43 +02:00
|
|
|
tt.insert(tr("Maximum"), l.toString(max(), 'f', 1)
|
2018-09-09 15:27:44 +02:00
|
|
|
+ UNIT_SPACE + tr("rpm"));
|
2018-09-09 18:46:43 +02:00
|
|
|
tt.insert(tr("Average"), l.toString(avg(), 'f', 1)
|
2018-09-09 15:27:44 +02:00
|
|
|
+ UNIT_SPACE + tr("rpm"));
|
2017-09-24 19:54:13 +02:00
|
|
|
|
2021-08-04 08:57:42 +02:00
|
|
|
return tt;
|
2017-09-24 19:54:13 +02:00
|
|
|
}
|