aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-08-30 16:43:10 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-08-30 16:43:10 -0300
commit9bc7d8f514d40da94285be980e19d6f16f421067 (patch)
treeaa33badb049eb65b4d976007224b102a3a59a0ff
parentaef0dd0fa03d32d81279d8b2b72f265b89f33932 (diff)
downloadsubsurface-9bc7d8f514d40da94285be980e19d6f16f421067.tar.gz
More Code Cleanup
The code now seems to be mostly working. There is unfortunately a QAction shortcut conflict between the implementation and the MainWindow. - I'm gonna fix that in the next commit. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
-rw-r--r--qt-ui/diveplanner.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index a42851a84..e7c1b1962 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -2,27 +2,21 @@
#include "graphicsview-common.h"
#include "models.h"
#include "modeldelegates.h"
+#include "ui_diveplanner.h"
+#include "mainwindow.h"
#include "../dive.h"
#include "../divelist.h"
#include "../planner.h"
-#include <cmath>
#include <QMouseEvent>
#include <QDebug>
-#include <QGraphicsWidget>
-#include <QGraphicsProxyWidget>
-#include <QPushButton>
#include <QGraphicsSceneMouseEvent>
#include <QMessageBox>
#include <QStringListModel>
-#include <QGraphicsProxyWidget>
#include <QListView>
-#include <QDesktopWidget>
#include <QModelIndex>
#include <QSettings>
-#include "ui_diveplanner.h"
-#include "mainwindow.h"
#define TIME_INITIAL_MAX 30
@@ -196,7 +190,6 @@ void DivePlannerGraphics::keyDownAction()
plannerModel->editStop(row, dp);
}
}
- createDecoStops();
}
}
@@ -244,7 +237,6 @@ void DivePlannerGraphics::keyLeftAction()
plannerModel->editStop(row, dp);
}
}
- createDecoStops();
}
void DivePlannerGraphics::keyRightAction()
@@ -272,7 +264,7 @@ void DivePlannerGraphics::keyRightAction()
dp.time += 60;
plannerModel->editStop(row, dp);
}
- } createDecoStops();
+ }
}
void DivePlannerGraphics::keyDeleteAction()
@@ -286,7 +278,6 @@ void DivePlannerGraphics::keyDeleteAction()
}
}
plannerModel->removeSelectedPoints(selectedIndexes);
- createDecoStops();
}
}
@@ -324,7 +315,6 @@ void DivePlannerGraphics::keyEscAction()
scene()->clearSelection();
return;
}
-
cancelPlan();
}
@@ -378,7 +368,6 @@ void DivePlannerGraphics::decreaseDepth()
return;
}
}
-
depthLine->setMaximum(depthLine->maximum() - 10);
depthLine->updateTicks();
createDecoStops();