diff options
author | Anton Lundin <glance@acc.umu.se> | 2017-02-04 08:58:27 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-05-04 10:50:15 -0700 |
commit | 0c276403ac1b080829b2169d84d42ebdbff2f875 (patch) | |
tree | 7385090d7edf4dd5d7716e64310b10fa17082f0f /desktop-widgets/configuredivecomputerdialog.cpp | |
parent | 6e23ce1488c22ce17d6a1f0313d5600df4632cca (diff) | |
download | subsurface-0c276403ac1b080829b2169d84d42ebdbff2f875.tar.gz |
Build a gui for configure OSTC 4
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Diffstat (limited to 'desktop-widgets/configuredivecomputerdialog.cpp')
-rw-r--r-- | desktop-widgets/configuredivecomputerdialog.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/desktop-widgets/configuredivecomputerdialog.cpp b/desktop-widgets/configuredivecomputerdialog.cpp index 83114d7b5..ac1998dca 100644 --- a/desktop-widgets/configuredivecomputerdialog.cpp +++ b/desktop-widgets/configuredivecomputerdialog.cpp @@ -175,6 +175,14 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : QDia ui.ostcDilTable->setItemDelegateForColumn(4, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH)); ui.ostcSetPointTable->setItemDelegateForColumn(1, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::SETPOINT)); ui.ostcSetPointTable->setItemDelegateForColumn(2, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH)); + ui.ostc4GasTable->setItemDelegateForColumn(1, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::PERCENT)); + ui.ostc4GasTable->setItemDelegateForColumn(2, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::PERCENT)); + ui.ostc4GasTable->setItemDelegateForColumn(3, new GasTypeComboBoxItemDelegate(this, GasTypeComboBoxItemDelegate::OSTC3)); + ui.ostc4GasTable->setItemDelegateForColumn(4, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH)); + ui.ostc4DilTable->setItemDelegateForColumn(3, new GasTypeComboBoxItemDelegate(this, GasTypeComboBoxItemDelegate::OSTC3)); + ui.ostc4DilTable->setItemDelegateForColumn(4, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH)); + ui.ostc4SetPointTable->setItemDelegateForColumn(1, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::SETPOINT)); + ui.ostc4SetPointTable->setItemDelegateForColumn(2, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH)); QSettings settings; settings.beginGroup("ConfigureDiveComputerDialog"); @@ -221,6 +229,27 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : QDia ui.ostcSetPointTable->setColumnWidth(i, width.toInt()); } settings.endGroup(); + settings.beginGroup("ostc4GasTable"); + for (int i = 0; i < ui.ostc4GasTable->columnCount(); i++) { + QVariant width = settings.value(QString("colwidth%1").arg(i)); + if (width.isValid()) + ui.ostc4GasTable->setColumnWidth(i, width.toInt()); + } + settings.endGroup(); + settings.beginGroup("ostc4DilTable"); + for (int i = 0; i < ui.ostc4DilTable->columnCount(); i++) { + QVariant width = settings.value(QString("colwidth%1").arg(i)); + if (width.isValid()) + ui.ostc4DilTable->setColumnWidth(i, width.toInt()); + } + settings.endGroup(); + settings.beginGroup("ostc4SetPointTable"); + for (int i = 0; i < ui.ostc4SetPointTable->columnCount(); i++) { + QVariant width = settings.value(QString("colwidth%1").arg(i)); + if (width.isValid()) + ui.ostc4SetPointTable->setColumnWidth(i, width.toInt()); + } + settings.endGroup(); settings.endGroup(); } |