summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-23 19:50:09 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-24 07:26:53 -0700
commite1dcd8eac32e2e7d606f5bc82106cde07984b42a (patch)
treea485f8111917ba8ab9ae84e6d6eed3b46ea01d12 /qt-ui/diveplanner.h
parent3a2ceed33d5fcb706a1790fa80fad322dba33556 (diff)
downloadsubsurface-e1dcd8eac32e2e7d606f5bc82106cde07984b42a.tar.gz
Change how the handler handlers itself.
This patch adds a itemChange method, that emits a 'changed' signal when the handler is moved. I'll use that signal on the profile to call the correct method. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r--qt-ui/diveplanner.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 0166e433b..b68605537 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -139,9 +139,10 @@ public:
DiveHandler();
protected:
- void mousePressEvent(QGraphicsSceneMouseEvent *event);
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
-
+ virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+signals:
+ void moved();
private:
int parentIndex();
public
@@ -161,7 +162,6 @@ protected:
virtual void mouseMoveEvent(QMouseEvent *event);
virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseReleaseEvent(QMouseEvent *event);
- bool isPointOutOfBoundaries(const QPointF &point);
qreal fromPercent(qreal percent, Qt::Orientation orientation);
public
slots: