summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/diveplanner.cpp3
-rw-r--r--qt-ui/maintab.cpp3
-rw-r--r--qt-ui/models.cpp17
-rw-r--r--qt-ui/models.h2
4 files changed, 15 insertions, 10 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 0209b2e1e..4e1865fc6 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -961,7 +961,8 @@ DivePlannerWidget::DivePlannerWidget(QWidget* parent, Qt::WindowFlags f): QWidge
QTableView *view = ui.cylinderTableWidget->view();
view->setColumnHidden(CylindersModel::START, true);
view->setColumnHidden(CylindersModel::END, true);
- view->setColumnHidden(CylindersModel::DEPTH, false);
+ // disabled as pointless outside of the disabled planner
+ // view->setColumnHidden(CylindersModel::DEPTH, false);
view->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate(this));
connect(ui.cylinderTableWidget, SIGNAL(addButtonClicked()), DivePlannerPointsModel::instance(), SLOT(addCylinder_clicked()));
connect(ui.tableWidget, SIGNAL(addButtonClicked()), DivePlannerPointsModel::instance(), SLOT(addStop()));
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 0a66a227e..103413ac1 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -84,7 +84,8 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
ui.cylinders->view()->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate(this));
ui.weights->view()->setItemDelegateForColumn(WeightModel::TYPE, new WSInfoDelegate(this));
- ui.cylinders->view()->setColumnHidden(CylindersModel::DEPTH, true);
+ // disabled as this column is pointless outside the disabled planner
+ // ui.cylinders->view()->setColumnHidden(CylindersModel::DEPTH, true);
completers.buddy = new QCompleter(BuddyCompletionModel::instance(), ui.buddy);
completers.divemaster = new QCompleter(DiveMasterCompletionModel::instance(), ui.divemaster);
completers.location = new QCompleter(LocationCompletionModel::instance(), ui.location);
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 06bb95281..a1494880d 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -65,7 +65,10 @@ void CleanerTableModel::setHeaderDataStrings(const QStringList& newHeaders)
CylindersModel::CylindersModel(QObject* parent): current(0), rows(0)
{
// enum {REMOVE, TYPE, SIZE, WORKINGPRESS, START, END, O2, HE, DEPTH};
- setHeaderDataStrings( QStringList() << "" << tr("Type") << tr("Size") << tr("WorkPress") << tr("StartPress") << tr("EndPress") << trUtf8("O" UTF8_SUBSCRIPT_2 "%") << tr("He%") << tr("Switch at"));
+ setHeaderDataStrings( QStringList() << "" << tr("Type") << tr("Size") << tr("WorkPress") <<
+ tr("StartPress") << tr("EndPress") << trUtf8("O" UTF8_SUBSCRIPT_2 "%") << tr("He%")
+ // while the planner is disabled, we don't need this column: << tr("Switch at")
+ );
}
CylindersModel *CylindersModel::instance()
@@ -136,9 +139,9 @@ QVariant CylindersModel::data(const QModelIndex& index, int role) const
case HE:
ret = percent_string(cyl->gasmix.he);
break;
- case DEPTH:
- ret = get_depth_string(cyl->depth, true);
- break;
+ // case DEPTH:
+ // ret = get_depth_string(cyl->depth, true);
+ // break;
}
break;
case Qt::DecorationRole:
@@ -251,9 +254,9 @@ bool CylindersModel::setData(const QModelIndex& index, const QVariant& value, in
changed = true;
}
break;
- case DEPTH:
- if (CHANGED())
- cyl->depth = string_to_depth(vString.toUtf8().data());
+ // case DEPTH:
+ // if (CHANGED())
+ // cyl->depth = string_to_depth(vString.toUtf8().data());
}
dataChanged(index, index);
if (addDiveMode)
diff --git a/qt-ui/models.h b/qt-ui/models.h
index 2d7e5c34d..505d7dcb5 100644
--- a/qt-ui/models.h
+++ b/qt-ui/models.h
@@ -81,7 +81,7 @@ private:
class CylindersModel : public CleanerTableModel {
Q_OBJECT
public:
- enum Column {REMOVE, TYPE, SIZE, WORKINGPRESS, START, END, O2, HE, DEPTH, COLUMNS};
+ enum Column {REMOVE, TYPE, SIZE, WORKINGPRESS, START, END, O2, HE, /* DEPTH, */ COLUMNS};
explicit CylindersModel(QObject* parent = 0);
static CylindersModel *instance();