summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index d7522b505..ba0bc80d7 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -878,7 +878,9 @@ DivePlannerWidget::DivePlannerWidget(QWidget* parent, Qt::WindowFlags f): QWidge
ui.tableWidget->setTitle(tr("Dive Planner Points"));
ui.tableWidget->setModel(DivePlannerPointsModel::instance());
ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::GAS, new AirTypesDelegate(this));
-
+ ui.cylinderTableWidget->setTitle(tr("Available Gases"));
+ ui.cylinderTableWidget->setModel(CylindersModel::instance());
+// connect(ui.cylinderTableWidget, SIGNAL(addButtonClicked()), CylindersModel::instance(), SLOT(add()));
connect(ui.tableWidget, SIGNAL(addButtonClicked()), DivePlannerPointsModel::instance(), SLOT(addStop()));
connect(ui.startTime, SIGNAL(timeChanged(QTime)), this, SLOT(startTimeChanged(QTime)));
connect(ui.ATMPressure, SIGNAL(textChanged(QString)), this, SLOT(atmPressureChanged(QString)));
@@ -1190,6 +1192,7 @@ void DivePlannerPointsModel::cancelPlan()
clear();
emit planCanceled();
setPlanMode(NOTHING);
+ CylindersModel::instance()->update();
}
DivePlannerPointsModel::Mode DivePlannerPointsModel::currentMode() const
@@ -1283,4 +1286,5 @@ void DivePlannerPointsModel::createPlan()
clear();
planCreated();
setPlanMode(NOTHING);
+ CylindersModel::instance()->update();
}