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>
This commit is contained in:
Tomaz Canabrava 2013-06-21 16:51:13 -03:00
parent 28f48227f7
commit 880b98ed35
2 changed files with 18 additions and 0 deletions

View file

@ -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)

View file

@ -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);