1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-16 11:54:23 +02:00

Hyperlink + copy&paste enabled tool tips

This commit is contained in:
2019-10-13 20:20:32 +02:00
parent de9bae9d66
commit a9ce6f54c7
33 changed files with 286 additions and 96 deletions

View File

@ -1,4 +1,6 @@
#include <QPainter>
#include <QGraphicsSceneMouseEvent>
#include "popup.h"
#include "graphitem.h"
@ -8,6 +10,7 @@ GraphItem::GraphItem(const Graph &graph, GraphType type, int width,
{
Q_ASSERT(_graph.isValid());
_units = Metric;
_pen = QPen(color, width);
_sx = 0; _sy = 0;
_time = _graph.hasTime();
@ -303,3 +306,9 @@ void GraphItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
emit selected(false);
}
void GraphItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Popup::show(event->screenPos(), toolTip(_units), event->widget());
QGraphicsObject::mousePressEvent(event);
}