diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-20 14:29:32 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-20 14:29:32 -0300 |
commit | 021a6a076e76e45bf5f6f8b976e2178a666ec1bd (patch) | |
tree | 0be9f2adb2702086ae7a6cd2f10a0a284b89e294 /qt-ui/diveplanner.h | |
parent | 1fb023d3c67834df047c3bd97f7c701a92afbd97 (diff) | |
download | subsurface-021a6a076e76e45bf5f6f8b976e2178a666ec1bd.tar.gz |
Created a class DiveHandle to make drag drop work.
Create d a class DiveHandle to make drag drop works,
it has a from and to Lines, and it will move them
around.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r-- | qt-ui/diveplanner.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index 7dca3bb85..33f647fe6 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -4,6 +4,13 @@ #include <QGraphicsView> #include <QGraphicsPathItem> +class DiveHandler : public QGraphicsEllipseItem{ +public: + DiveHandler(); + + QGraphicsLineItem *from; + QGraphicsLineItem *to; +}; class DivePlanner : public QGraphicsView { Q_OBJECT public: @@ -16,11 +23,11 @@ protected: void clear_generated_deco(); void create_deco_stop(); bool isPointOutOfBoundaries(QPointF point); - + private: DivePlanner(QWidget* parent = 0); QList<QGraphicsLineItem*> lines; - QList<QGraphicsEllipseItem*> handles; + QList<DiveHandler *> handles; QGraphicsLineItem *verticalLine; QGraphicsLineItem *horizontalLine; }; |