diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-11-12 11:12:43 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-12 11:17:40 +0900 |
commit | d72c69db7a49fc20ea7618deaac4b125614afb12 (patch) | |
tree | 3b6688950e02dc7e72e83c613666a2952d3488d6 /qt-ui/diveplanner.cpp | |
parent | cd1149e57fb077c2f3dbf0fce7a1a9478feb6743 (diff) | |
download | subsurface-d72c69db7a49fc20ea7618deaac4b125614afb12.tar.gz |
Add depth colum to cylinder model
To make the planner work this adds a new column to the Cylinder widget
(depth - for the depth at which we want to change to a certain gas
during deco).
This also tries to hide that column in the equipment view and hide the
start/end pressure columns in the planner view. Oddly that fails :-(
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 14118c519..1a20e4f9b 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -905,6 +905,11 @@ DivePlannerWidget::DivePlannerWidget(QWidget* parent, Qt::WindowFlags f): QWidge ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::GAS, new AirTypesDelegate(this)); ui.cylinderTableWidget->setTitle(tr("Available Gases")); ui.cylinderTableWidget->setModel(CylindersModel::instance()); + // the setColumnHidden calls don't seem to work???? + ui.cylinderTableWidget->setColumnHidden(CylindersModel::START, true); + ui.cylinderTableWidget->setColumnHidden(CylindersModel::END, true); + ui.cylinderTableWidget->setColumnHidden(CylindersModel::DEPTH, false); + ui.cylinderTableWidget->view()->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate()); connect(ui.cylinderTableWidget, SIGNAL(addButtonClicked()), DivePlannerPointsModel::instance(), SLOT(addCylinder_clicked())); connect(ui.tableWidget, SIGNAL(addButtonClicked()), DivePlannerPointsModel::instance(), SLOT(addStop())); |