From 0c276403ac1b080829b2169d84d42ebdbff2f875 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Sat, 4 Feb 2017 08:58:27 +0100 Subject: Build a gui for configure OSTC 4 Signed-off-by: Anton Lundin --- desktop-widgets/configuredivecomputerdialog.cpp | 29 + desktop-widgets/configuredivecomputerdialog.ui | 1911 ++++++++++++++++++++--- 2 files changed, 1691 insertions(+), 249 deletions(-) (limited to 'desktop-widgets') 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(); } diff --git a/desktop-widgets/configuredivecomputerdialog.ui b/desktop-widgets/configuredivecomputerdialog.ui index f600530ae..1b6beae50 100644 --- a/desktop-widgets/configuredivecomputerdialog.ui +++ b/desktop-widgets/configuredivecomputerdialog.ui @@ -236,6 +236,15 @@ :/icons/ostc2n.png:/icons/ostc2n.png + + + OSTC 4 + + + + :/icons/ostc4.png:/icons/ostc4.png + + @@ -2857,255 +2866,1563 @@ - - - - - - - 0 - - - - - - - - - - device - retrieveDetails - saveSettingsPushButton - backupButton - restoreBackupButton - cancel - - - - - - - DiveComputerList - currentRowChanged(int) - dcStackedWidget - setCurrentIndex(int) - - - 20 - 20 - - - 20 - 20 - - - - - lightCheckBox - toggled(bool) - lightSpinBox - setEnabled(bool) - - - 20 - 20 - - - 20 - 20 - - - - - alarmDepthCheckBox - toggled(bool) - alarmDepthDoubleSpinBox - setEnabled(bool) - - - 20 - 20 - - - 20 - 20 - - - - - alarmTimeCheckBox - toggled(bool) - alarmTimeSpinBox - setEnabled(bool) - - - 20 - 20 - - - 20 - 20 - - - - - aGFSelectableCheckBox - toggled(bool) - aGFHighSpinBox - setEnabled(bool) - - - 340 - 229 - - - 686 - 265 - - - - - aGFSelectableCheckBox - toggled(bool) - aGFLowSpinBox - setEnabled(bool) - - - 340 - 229 - - - 686 - 229 - - - - - aGFSelectableCheckBox_3 - toggled(bool) - aGFHighSpinBox_3 - setEnabled(bool) - - - 340 - 229 - - - 686 - 265 - - - - - aGFSelectableCheckBox_3 - toggled(bool) - aGFLowSpinBox_3 - setEnabled(bool) - - - 340 - 229 - - - 686 - 229 - - - - - safetyStopCheckBox - toggled(bool) - safetyStopLengthSpinBox - setEnabled(bool) - - - 20 - 20 - - - 20 - 20 - - - - - safetyStopCheckBox - toggled(bool) - safetyStopStartDepthDoubleSpinBox - setEnabled(bool) - - - 20 - 20 - - - 20 - 20 - - - - - safetyStopCheckBox - toggled(bool) - safetyStopEndDepthDoubleSpinBox - setEnabled(bool) - - - 20 - 20 - - - 20 - 20 - - - - - safetyStopCheckBox - toggled(bool) - safetyStopResetDepthDoubleSpinBox - setEnabled(bool) - - - 20 - 20 - - - 20 - 20 - - - - - safetyStopCheckBox_3 - toggled(bool) - safetyStopLengthSpinBox_3 - setEnabled(bool) - - - 20 - 20 - - - 20 - 20 - - - - - safetyStopCheckBox_3 - toggled(bool) - safetyStopStartDepthDoubleSpinBox_3 - setEnabled(bool) - - - 20 - 20 - - - 20 - 20 - + + + + + + 0 + + + + Basic settings + + + + + + + Eco + + + + + Medium + + + + + High + + + + + + + + % + + + 5 + + + + + + + + English + + + + + German + + + + + French + + + + + Italian + + + + + + + + + m/°C + + + + + ft/°F + + + + + + + + Serial No. + + + serialNoLineEdit_4 + + + + + + + + 1 + 0 + + + + true + + + + + + + Firmware version + + + firmwareVersionLineEdit_4 + + + + + + + + MMDDYY + + + + + DDMMYY + + + + + YYMMDD + + + + + + + + true + + + + + + + Language + + + languageComboBox_4 + + + + + + + Date format + + + dateFormatComboBox_4 + + + + + + + Brightness + + + brightnessComboBox_4 + + + + + + + Units + + + unitsComboBox_4 + + + + + + + Salinity (0-5%) + + + salinitySpinBox_4 + + + + + + + false + + + Reset device to default settings + + + + + + + + 1 + 0 + + + + + 230LSB/Gauss + + + + + 330LSB/Gauss + + + + + 390LSB/Gauss + + + + + 440LSB/Gauss + + + + + 660LSB/Gauss + + + + + 820LSB/Gauss + + + + + 1090LSB/Gauss + + + + + 1370LSB/Gauss + + + + + + + + Qt::Vertical + + + + 20 + 177 + + + + + + + + + 1 + 0 + + + + 60 + + + + + + + Compass gain + + + compassGainComboBox_4 + + + + + + + Computer model + + + + + + + Custom text + + + customTextLlineEdit_4 + + + + + + + true + + + + + + + + OC + + + + + CC + + + + + Gauge + + + + + Apnea + + + + + + + + Dive mode + + + diveModeComboBox_4 + + + + + + + + 2s + + + + + 10s + + + + + + + + Sampling rate + + + samplingRateComboBox_4 + + + + + + + + Standard + + + + + Red + + + + + Green + + + + + Blue + + + + + + + + Sync dive computer time with PC + + + + + + + Dive mode color + + + diveModeColour_4 + + + + + + + Show safety stop + + + + + + + End Depth + + + + + + + false + + + s + + + 60 + + + 240 + + + 180 + + + + + + + Length + + + + + + + Start Depth + + + + + + + Reset Depth + + + + + + + false + + + m + + + 1 + + + 2.100000000000000 + + + 6.100000000000000 + + + 0.100000000000000 + + + 5.100000000000000 + + + + + + + false + + + m + + + 1 + + + 1.900000000000000 + + + 3.000000000000000 + + + 2.900000000000000 + + + + + + + false + + + m + + + 1 + + + 8.100000000000000 + + + 15.100000000000000 + + + 10.100000000000000 + + + + + + + + Advanced settings + + + + + + Left button sensitivity + + + + + + + Always show pO₂ + + + + + + + Alt GF can be selected underwater + + + + + + + Future TTS + + + + + + + Pressure sensor offset + + + + + + + GFLow + + + + + + + % + + + 10 + + + 100 + + + 30 + + + + + + + GFHigh + + + + + + + % + + + 60 + + + 110 + + + 85 + + + + + + + Desaturation + + + desaturationSpinBox_4 + + + + + + + % + + + 60 + + + 100 + + + 90 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + m + + + 3 + + + 6 + + + + + + + Decotype + + + + + + + false + + + % + + + 60 + + + 100 + + + 60 + + + + + + + mbar + + + -20 + + + 20 + + + + + + + 1 + + + + ZH-L16 + + + + + ZH-L16+GF + + + + + + + + min + + + 9 + + + + + + + Last deco + + + lastDecoSpinBox_4 + + + + + + + % + + + 100 + + + 140 + + + 110 + + + + + + + Alt GFLow + + + + + + + false + + + % + + + 70 + + + 120 + + + 85 + + + + + + + Alt GFHigh + + + + + + + Saturation + + + saturationSpinBox_4 + + + + + + + Flip screen + + + + + + + Right button sensitivity + + + + + + + MOD warning + + + + + + + Graphical speed indicator + + + + + + + Dynamic ascent rate + + + + + + + Bottom gas consumption + + + + + + + Deco gas consumption + + + + + + + % + + + 20 + + + 100 + + + 40 + + + + + + + % + + + 20 + + + 100 + + + 40 + + + + + + + ℓ/min + + + 5 + + + 50 + + + 20 + + + + + + + ℓ/min + + + 5 + + + 50 + + + 20 + + + + + + + Temperature sensor offset + + + + + + + °C + + + 1 + + + -2.000000000000000 + + + 2.000000000000000 + + + 0.100000000000000 + + + + + + + + Gas settings + + + + + + + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %O₂ + + + + + %He + + + + + Type + + + + + Change depth + + + + + Gas 1 + + + + + Gas 2 + + + + + Gas 3 + + + + + Gas 4 + + + + + Gas 5 + + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %O₂ + + + + + %He + + + + + Type + + + + + Change depth + + + + + Dil 1 + + + + + Dil 2 + + + + + Dil 3 + + + + + Dil 4 + + + + + Dil 5 + + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Setpoint + + + + + Change depth + + + + + SP 1 + + + + + SP 2 + + + + + SP 3 + + + + + SP 4 + + + + + SP 5 + + + + + + + + O₂ in calibration gas + + + + + + + % + + + 21 + + + 100 + + + 21 + + + + + + + + Fixed setpoint + + + + + Sensor + + + + + + + + Setpoint fallback + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + cbar + + + 120 + + + 160 + + + 160 + + + + + + + cbar + + + 16 + + + 19 + + + 19 + + + + + + + pO₂ max + + + + + + + pO₂ min + + + + + + + + + + + + + + + + 0 + + + + + + + + + + device + retrieveDetails + saveSettingsPushButton + backupButton + restoreBackupButton + cancel + + + + + + + DiveComputerList + currentRowChanged(int) + dcStackedWidget + setCurrentIndex(int) + + + 20 + 20 + + + 20 + 20 + + + + + lightCheckBox + toggled(bool) + lightSpinBox + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + alarmDepthCheckBox + toggled(bool) + alarmDepthDoubleSpinBox + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + alarmTimeCheckBox + toggled(bool) + alarmTimeSpinBox + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + aGFSelectableCheckBox + toggled(bool) + aGFHighSpinBox + setEnabled(bool) + + + 340 + 229 + + + 686 + 265 + + + + + aGFSelectableCheckBox + toggled(bool) + aGFLowSpinBox + setEnabled(bool) + + + 340 + 229 + + + 686 + 229 + + + + + aGFSelectableCheckBox_3 + toggled(bool) + aGFHighSpinBox_3 + setEnabled(bool) + + + 340 + 229 + + + 686 + 265 + + + + + aGFSelectableCheckBox_3 + toggled(bool) + aGFLowSpinBox_3 + setEnabled(bool) + + + 340 + 229 + + + 686 + 229 + + + + + safetyStopCheckBox + toggled(bool) + safetyStopLengthSpinBox + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox + toggled(bool) + safetyStopStartDepthDoubleSpinBox + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox + toggled(bool) + safetyStopEndDepthDoubleSpinBox + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox + toggled(bool) + safetyStopResetDepthDoubleSpinBox + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox_3 + toggled(bool) + safetyStopLengthSpinBox_3 + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox_3 + toggled(bool) + safetyStopStartDepthDoubleSpinBox_3 + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + @@ -3140,5 +4457,101 @@ + + aGFSelectableCheckBox_4 + toggled(bool) + aGFHighSpinBox_4 + setEnabled(bool) + + + 340 + 229 + + + 686 + 265 + + + + + aGFSelectableCheckBox_4 + toggled(bool) + aGFLowSpinBox_4 + setEnabled(bool) + + + 340 + 229 + + + 686 + 229 + + + + + safetyStopCheckBox_4 + toggled(bool) + safetyStopLengthSpinBox_4 + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox_4 + toggled(bool) + safetyStopStartDepthDoubleSpinBox_4 + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox_4 + toggled(bool) + safetyStopEndDepthDoubleSpinBox_4 + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + + safetyStopCheckBox_4 + toggled(bool) + safetyStopResetDepthDoubleSpinBox_4 + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + -- cgit v1.2.3-70-g09d2