diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-21 16:51:13 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-21 16:51:13 -0300 |
commit | 880b98ed35c2dbf3b5a015784323894c59bc7feb (patch) | |
tree | c477296c9ab22a2969939e0bfa96bed7028efaf6 /qt-ui | |
parent | 28f48227f72bf7db16b1f53b4d50df7fb5a54131 (diff) | |
download | subsurface-880b98ed35c2dbf3b5a015784323894c59bc7feb.tar.gz |
Added the skeleton implementation of the increaseTime and depth
Added the skeleton implementation of the increaseTime and
increaseDepth methods - they will increase the time / depth by
10 units ( feets / minutes ) each time they are clicked.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 13 | ||||
-rw-r--r-- | qt-ui/diveplanner.h | 5 |
2 files changed, 18 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 026e9f312..d6096f4bb 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -47,10 +47,22 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent) plusDepth = new Button(); plusDepth->setPos(15, 1); scene()->addItem(plusDepth); + connect(plusDepth, SIGNAL(clicked()), this, SLOT(increaseDepth())); plusTime = new Button(); plusTime->setPos( 95, 90); scene()->addItem(plusTime); + connect(plusTime, SIGNAL(clicked()), this, SLOT(increaseTime())); +} + +void DivePlannerGraphics::increaseDepth() +{ + qDebug() << "Increase Depth Clicked"; +} + +void DivePlannerGraphics::increaseTime() +{ + qDebug() << "Increase Time Clicked"; } void DivePlannerGraphics::mouseDoubleClickEvent(QMouseEvent* event) @@ -249,6 +261,7 @@ void DivePlannerGraphics::mousePressEvent(QMouseEvent* event) activeDraggedHandler->setBrush(Qt::red); } } + QGraphicsView::mousePressEvent(event); } void DivePlannerGraphics::mouseReleaseEvent(QMouseEvent* event) diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index c3ae3eb60..453cec63e 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -62,6 +62,11 @@ protected: void clear_generated_deco(); void create_deco_stop(); bool isPointOutOfBoundaries(const QPointF& point); + +private slots: + void increaseTime(); + void increaseDepth(); + private: void moveActiveHandler(const QPointF& pos); |