summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-08-26 08:47:45 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-08-26 08:47:45 -0300
commit6cb1f1a250a58614bbdd2e26f9fa3ca3cf62a9f5 (patch)
treebcc6aa6662fd0fc64187e5cc0448e7234b49c068 /qt-ui/diveplanner.cpp
parent0a043528f72a47b14cfe3708a8f133a29ad17d55 (diff)
downloadsubsurface-6cb1f1a250a58614bbdd2e26f9fa3ca3cf62a9f5.tar.gz
Code Cleanup: Buttons on Graphical Planner
Removed a bunch of non-used graphics buttons, since the new widget now contains everything needed for the creation / cancelation of the dive plan. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 5e79f0b89..5a8f7d62d 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -114,13 +114,7 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent)
ADDBTN(plusTime, ":plus", "" , 95, 5, tr("Increase minimum time by 10m"), increaseTime());
ADDBTN(lessDepth, ":minimum","" , 2, 5, tr("Decreases maximum depth by 10m"), decreaseDepth());
ADDBTN(lessTime, ":minimum","" , 92, 95, tr("Decreases minimum time by 10m"), decreaseTime());
- ADDBTN(okBtn, "", tr("Ok"), 1, 95, "", okClicked());
- ADDBTN(cancelBtn, "", tr("Cancel"), 0,0, "", cancelClicked());
#undef ADDBTN
-
- cancelBtn->setPos(okBtn->pos().x() + okBtn->boundingRect().width()
- + fromPercent(2, Qt::Horizontal), fromPercent(95, Qt::Vertical));
-
minMinutes = TIME_INITIAL_MAX;
QAction *action = NULL;
@@ -265,7 +259,7 @@ void DivePlannerGraphics::keyEscAction()
return;
}
- cancelClicked();
+ cancelPlan();
}
qreal DivePlannerGraphics::fromPercent(qreal percent, Qt::Orientation orientation)
@@ -275,7 +269,7 @@ qreal DivePlannerGraphics::fromPercent(qreal percent, Qt::Orientation orientatio
return result;
}
-void DivePlannerGraphics::cancelClicked()
+void DivePlannerGraphics::cancelPlan()
{
if (handles.size()){
if (QMessageBox::warning(mainWindow(), tr("Save the Plan?"),
@@ -287,11 +281,6 @@ void DivePlannerGraphics::cancelClicked()
mainWindow()->showProfile();
}
-void DivePlannerGraphics::okClicked()
-{
- // todo.
-}
-
void DivePlannerGraphics::increaseDepth()
{
if (depthLine->maximum() + 10 > MAX_DEEPNESS)