aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/diveplanner.cpp6
-rw-r--r--qt-ui/diveplanner.h9
-rw-r--r--qt-ui/mainwindow.cpp16
-rw-r--r--qt-ui/mainwindow.h4
-rw-r--r--qt-ui/mainwindow.ui37
5 files changed, 15 insertions, 57 deletions
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 @@
</layout>
</widget>
</widget>
- <widget class="QTabWidget" name="stackedWidget">
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="page_5">
- <attribute name="title">
- <string>Profile Visualization</string>
- </attribute>
- <layout class="QGridLayout" name="gridLayout">
+ <widget class="QWidget" name="ProfileWidget">
+ <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
@@ -496,32 +489,6 @@
</spacer>
</item>
</layout>
- </widget>
- <widget class="QWidget" name="page_6">
- <attribute name="title">
- <string>Old Planner Visualization</string>
- </attribute>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="DivePlannerGraphics" name="divePlanner"/>
- </item>
- </layout>
- </widget>
</widget>
</widget>
<widget class="QSplitter" name="listGlobeSplitter">