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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user