diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-20 18:40:59 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-20 18:40:59 -0300 |
commit | fdd8a4811bd598cd661cda5a9c057749dc1a11d1 (patch) | |
tree | 85f5cdec65d7d06d69c3a3021a88fa67af847ced /qt-ui/diveplanner.h | |
parent | 8fcd465a65546efd6dd90c6e4d29ff4e93d7dbe8 (diff) | |
download | subsurface-fdd8a4811bd598cd661cda5a9c057749dc1a11d1.tar.gz |
Added a new class to handle the DivePlanner dialog
Added a new class named DivePlanner that is a QDialog,
and renamed the old DivePlanner class to DivePlannerGraphics.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r-- | qt-ui/diveplanner.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index ac0d7ebd9..4a28f2ec1 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -3,6 +3,7 @@ #include <QGraphicsView> #include <QGraphicsPathItem> +#include <QDialog> class DiveHandler : public QGraphicsEllipseItem{ public: @@ -34,10 +35,10 @@ private: double posEnd; }; -class DivePlanner : public QGraphicsView { +class DivePlannerGraphics : public QGraphicsView { Q_OBJECT public: - static DivePlanner *instance(); + DivePlannerGraphics(QWidget* parent = 0); protected: virtual void mouseDoubleClickEvent(QMouseEvent* event); virtual void showEvent(QShowEvent* event); @@ -51,7 +52,7 @@ protected: bool isPointOutOfBoundaries(QPointF point); private: - DivePlanner(QWidget* parent = 0); + void moveActiveHandler(QPointF pos); QList<QGraphicsLineItem*> lines; QList<DiveHandler *> handles; @@ -66,4 +67,19 @@ private: QGraphicsSimpleTextItem *depthString; }; + +namespace Ui{ + class DivePlanner; +} + +class DivePlanner : public QDialog{ + Q_OBJECT +public: + static DivePlanner *instance(); + struct dive* getDive(); + +private: + DivePlanner(); + Ui::DivePlanner *ui; +}; #endif |