summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r--qt-ui/diveplanner.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 232b8f0fe..bd9b254d1 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -95,11 +95,15 @@ private:
QGraphicsSimpleTextItem *text;
};
-class DiveHandler : public QGraphicsEllipseItem{
+class DiveHandler : public QObject, public QGraphicsEllipseItem{
+Q_OBJECT
public:
DiveHandler();
protected:
void mousePressEvent(QGraphicsSceneMouseEvent* event);
+ void contextMenuEvent(QGraphicsSceneContextMenuEvent* event);
+public slots:
+ void selfRemove();
};
class Ruler : public QGraphicsLineItem{
@@ -118,7 +122,6 @@ public:
qreal posAtValue(qreal value);
void setColor(const QColor& color);
void setTextColor(const QColor& color);
-
private:
Qt::Orientation orientation;
QList<QGraphicsLineItem*> ticks;
@@ -210,6 +213,8 @@ private:
int minMinutes; // this holds the minimum duration of the dive.
int dpMaxTime; // this is the time of the dive calculated by the deco.
+
+ friend class DiveHandler;
};
#include "ui_diveplanner.h"