Remove leftovers from the planner.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-05-25 00:51:05 -03:00 committed by Dirk Hohndel
parent 2359bd3c2c
commit b88e6dc5fa
5 changed files with 15 additions and 57 deletions

View file

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

View file

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

View file

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

View file

@ -42,10 +42,6 @@ public:
COLLAPSED,
EXPANDED
};
enum StackWidgetIndexes {
PROFILE,
PLANNERPROFILE
};
enum InfoWidgetIndexes {
MAINTAB,
PLANNERWIDGET

View file

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