aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/diveplanner.cpp11
-rw-r--r--qt-ui/maintab.cpp1
-rw-r--r--qt-ui/tableview.cpp2
-rw-r--r--qt-ui/tableview.h2
4 files changed, 7 insertions, 9 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 76ea82e75..bdecf24ad 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -908,12 +908,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());
+ QTableView *view = ui.cylinderTableWidget->view();
+ view->setColumnHidden(CylindersModel::START, true);
+ view->setColumnHidden(CylindersModel::END, true);
+ view->setColumnHidden(CylindersModel::DEPTH, false);
+ 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()));
ui.tableWidget->setBtnToolTip(tr("add dive data point"));
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 30659c5c5..3dcb24df0 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -83,7 +83,6 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
ui.cylinders->view()->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate());
ui.weights->view()->setItemDelegateForColumn(WeightModel::TYPE, new WSInfoDelegate());
- // this does not appear to work???
ui.cylinders->view()->setColumnHidden(CylindersModel::DEPTH, true);
completers.buddy = new QCompleter(BuddyCompletionModel::instance(), ui.buddy);
completers.divemaster = new QCompleter(DiveMasterCompletionModel::instance(), ui.divemaster);
diff --git a/qt-ui/tableview.cpp b/qt-ui/tableview.cpp
index c3aed1f18..d9731b477 100644
--- a/qt-ui/tableview.cpp
+++ b/qt-ui/tableview.cpp
@@ -7,7 +7,7 @@
#include <QTextStream>
#include <QSettings>
-TableView::TableView(QWidget *parent) : QTableView(parent)
+TableView::TableView(QWidget *parent) : QWidget(parent)
{
ui.setupUi(this);
QFile cssFile(":table-css");
diff --git a/qt-ui/tableview.h b/qt-ui/tableview.h
index af410c6e0..fc22425d3 100644
--- a/qt-ui/tableview.h
+++ b/qt-ui/tableview.h
@@ -14,7 +14,7 @@ class QAbstractItemModel;
class QModelIndex;
class QTableView;
-class TableView : public QTableView {
+class TableView : public QWidget {
Q_OBJECT
public:
TableView(QWidget *parent = 0);