diff options
-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); |