diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 53a1e7846..aaf530ca7 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -43,11 +43,6 @@ QString dpGasToStr(const divedatapoint &p) static DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance(); -DivePlannerGraphics::DivePlannerGraphics(QWidget *parent) : QGraphicsView(parent) -{ - -} - bool intLessThan(int a, int b) { return a <= b; @@ -139,6 +134,7 @@ void DivePlannerPointsModel::removeDeco() removeSelectedPoints(computedPoints); setRecalc(oldrec); } + #if 0 void DivePlannerGraphics::drawProfile() { diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index 10c907b39..4aa5f0094 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -119,15 +119,6 @@ slots: void changeGas(); }; -class DivePlannerGraphics : public QGraphicsView { - Q_OBJECT -public: - DivePlannerGraphics(QWidget *parent = 0); -private -slots: - -}; - #include "ui_diveplanner.h" class DivePlannerWidget : public QWidget { diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 339ee8e8f..19a16a886 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -318,14 +318,16 @@ void MainWindow::on_actionDivePlanner_triggered() break; } } - ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); ui.infoPane->setCurrentIndex(PLANNERWIDGET); } void MainWindow::showProfile() { enableDcShortcuts(); - ui.stackedWidget->setCurrentIndex(PROFILE); + //TODO: I BROKE THIS BY COMMENTING THE LINE BELOW + // and I'm sleepy now, so I think I should not try to fix right away. + // we don't setCurrentIndex anymore, we ->setPlanState() or ->setAddState() on the ProfileView. + //ui.stackedWidget->setCurrentIndex(PROFILE); ui.infoPane->setCurrentIndex(MAINTAB); } @@ -1101,14 +1103,20 @@ void MainWindow::editCurrentDive() if (defaultDC == "manually added dive") { disableDcShortcuts(); DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::ADD); - ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); // Planner. + //TODO: I BROKE THIS BY COMMENTING THE LINE BELOW + // and I'm sleepy now, so I think I should not try to fix right away. + // we don't setCurrentIndex anymore, we ->setPlanState() or ->setAddState() on the ProfileView. + //ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); // Planner. ui.infoPane->setCurrentIndex(MAINTAB); DivePlannerPointsModel::instance()->loadFromDive(d); ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE); } else if (defaultDC == "planned dive") { disableDcShortcuts(); DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN); - ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); // Planner. + //TODO: I BROKE THIS BY COMMENTING THE LINE BELOW + // and I'm sleepy now, so I think I should not try to fix right away. + // we don't setCurrentIndex anymore, we ->setPlanState() or ->setAddState() on the ProfileView. + //ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); // Planner. ui.infoPane->setCurrentIndex(PLANNERWIDGET); DivePlannerPointsModel::instance()->loadFromDive(d); ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE); diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 0aaab2a34..a658fe3cc 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -42,10 +42,6 @@ public: COLLAPSED, EXPANDED }; - enum StackWidgetIndexes { - PROFILE, - PLANNERPROFILE - }; enum InfoWidgetIndexes { MAINTAB, PLANNERWIDGET diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index 5885baf30..1fd0fa775 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -85,15 +85,8 @@ - - - 0 - - - - Profile Visualization - - + + 0 @@ -496,32 +489,6 @@ - - - - Old Planner Visualization - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - -