diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2017-03-24 19:11:31 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-28 11:17:03 -0700 |
commit | bb31c77597f28976eb4784318fa7b01a28f3942b (patch) | |
tree | fc3c7c04dc0dcf89d51554289dd5537f9ff5c95e /desktop-widgets | |
parent | 1d0281c9234e44ce4804f8c7f376cd9d4ee68f54 (diff) | |
download | subsurface-bb31c77597f28976eb4784318fa7b01a28f3942b.tar.gz |
minimal pO2 threshold: split max threshold into min and max
Nothing really special here. Just a split of the only p02 max threshold into
a min threshold and max threshold, and the adaptation of the UI. Change of
translatable strings included.
ref: https://github.com/Subsurface-divelog/subsurface/issues/259
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/preferences/preferences_graph.cpp | 6 | ||||
-rw-r--r-- | desktop-widgets/preferences/preferences_graph.ui | 234 |
2 files changed, 127 insertions, 113 deletions
diff --git a/desktop-widgets/preferences/preferences_graph.cpp b/desktop-widgets/preferences/preferences_graph.cpp index 03f09166c..b4fd81fd1 100644 --- a/desktop-widgets/preferences/preferences_graph.cpp +++ b/desktop-widgets/preferences/preferences_graph.cpp @@ -20,7 +20,8 @@ PreferencesGraph::~PreferencesGraph() void PreferencesGraph::refreshSettings() { ui->pheThreshold->setValue(prefs.pp_graphs.phe_threshold); - ui->po2Threshold->setValue(prefs.pp_graphs.po2_threshold); + ui->po2ThresholdMax->setValue(prefs.pp_graphs.po2_threshold_max); + ui->po2ThresholdMin->setValue(prefs.pp_graphs.po2_threshold_min); ui->pn2Threshold->setValue(prefs.pp_graphs.pn2_threshold); ui->maxpo2->setValue(prefs.modpO2); ui->red_ceiling->setChecked(prefs.redceiling); @@ -56,7 +57,8 @@ void PreferencesGraph::syncSettings() auto pp_gas = SettingsObjectWrapper::instance()->pp_gas; pp_gas->setPheThreshold(ui->pheThreshold->value()); - pp_gas->setPo2Threshold(ui->po2Threshold->value()); + pp_gas->setPo2ThresholdMax(ui->po2ThresholdMax->value()); + pp_gas->setPo2ThresholdMin(ui->po2ThresholdMin->value()); pp_gas->setPn2Threshold(ui->pn2Threshold->value()); auto tech = SettingsObjectWrapper::instance()->techDetails; diff --git a/desktop-widgets/preferences/preferences_graph.ui b/desktop-widgets/preferences/preferences_graph.ui index 881c057ec..4b4cccb0d 100644 --- a/desktop-widgets/preferences/preferences_graph.ui +++ b/desktop-widgets/preferences/preferences_graph.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>650</width> - <height>581</height> + <height>634</height> </rect> </property> <property name="windowTitle"> @@ -26,12 +26,12 @@ <bool>true</bool> </property> <property name="text"> - <string>Threshold for pO₂</string> + <string>Threshold for pO₂ (minimum, maximum)</string> </property> </widget> </item> - <item row="0" column="1"> - <widget class="QDoubleSpinBox" name="po2Threshold"> + <item row="1" column="1"> + <widget class="QDoubleSpinBox" name="pn2Threshold"> <property name="enabled"> <bool>true</bool> </property> @@ -49,12 +49,19 @@ <bool>true</bool> </property> <property name="text"> - <string>Threshold for pN₂</string> + <string>Threshold for pN₂ (maximum only)</string> </property> </widget> </item> - <item row="1" column="1"> - <widget class="QDoubleSpinBox" name="pn2Threshold"> + <item row="4" column="0"> + <widget class="QLabel" name="label_26"> + <property name="text"> + <string>CCR options:</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QDoubleSpinBox" name="pheThreshold"> <property name="enabled"> <bool>true</bool> </property> @@ -66,18 +73,8 @@ </property> </widget> </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_17"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="text"> - <string>Threshold for pHe</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QDoubleSpinBox" name="pheThreshold"> + <item row="3" column="1"> + <widget class="QDoubleSpinBox" name="maxpo2"> <property name="enabled"> <bool>true</bool> </property> @@ -89,33 +86,30 @@ </property> </widget> </item> - <item row="3" column="0"> - <widget class="QLabel" name="label_18"> + <item row="2" column="0"> + <widget class="QLabel" name="label_17"> <property name="enabled"> <bool>true</bool> </property> <property name="text"> - <string>pO₂ in calculating MOD</string> + <string>Threshold for pHe (maximum only)</string> </property> </widget> </item> - <item row="3" column="1"> - <widget class="QDoubleSpinBox" name="maxpo2"> + <item row="3" column="0"> + <widget class="QLabel" name="label_18"> <property name="enabled"> <bool>true</bool> </property> - <property name="suffix"> - <string>bar</string> - </property> - <property name="singleStep"> - <double>0.100000000000000</double> + <property name="text"> + <string>pO₂ in calculating MOD (maximum only )</string> </property> </widget> </item> - <item row="4" column="0"> - <widget class="QLabel" name="label_26"> + <item row="5" column="1" colspan="2"> + <widget class="QCheckBox" name="show_ccr_setpoint"> <property name="text"> - <string>CCR options:</string> + <string>Show setpoints when viewing pO₂</string> </property> </widget> </item> @@ -142,13 +136,6 @@ </property> </widget> </item> - <item row="5" column="1" colspan="2"> - <widget class="QCheckBox" name="show_ccr_setpoint"> - <property name="text"> - <string>Show setpoints when viewing pO₂</string> - </property> - </widget> - </item> <item row="6" column="1" colspan="2"> <widget class="QCheckBox" name="show_ccr_sensors"> <property name="text"> @@ -156,42 +143,41 @@ </property> </widget> </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox_5"> - <property name="title"> - <string>Ceiling display setup</string> - </property> - <layout class="QGridLayout" name="gridLayout_3"> - <item row="0" column="0" colspan="2"> - <widget class="QCheckBox" name="red_ceiling"> + <item row="0" column="2"> + <widget class="QDoubleSpinBox" name="po2ThresholdMax"> <property name="enabled"> <bool>true</bool> </property> - <property name="text"> - <string>Draw dive computer reported ceiling red</string> + <property name="suffix"> + <string>bar</string> + </property> + <property name="singleStep"> + <double>0.100000000000000</double> </property> </widget> </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_22"> + <item row="0" column="1"> + <widget class="QDoubleSpinBox" name="po2ThresholdMin"> <property name="enabled"> <bool>true</bool> </property> - <property name="text"> - <string>Algorithm for calculated ceiling:</string> + <property name="suffix"> + <string>bar</string> </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QRadioButton" name="vpmb"> - <property name="text"> - <string>VPM-B</string> + <property name="singleStep"> + <double>0.010000000000000</double> </property> </widget> </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_5"> + <property name="title"> + <string>Ceiling display setup</string> + </property> + <layout class="QGridLayout" name="gridLayout_3"> <item row="2" column="1"> <widget class="QLabel" name="label_VPMB"> <property name="text"> @@ -202,29 +188,46 @@ </property> </widget> </item> - <item row="2" column="2"> - <widget class="QSpinBox" name="vpmb_conservatism"> - <property name="prefix"> - <string>+</string> - </property> - <property name="minimum"> - <number>0</number> + <item row="1" column="0"> + <widget class="QLabel" name="label_22"> + <property name="enabled"> + <bool>true</bool> </property> - <property name="maximum"> - <number>4</number> + <property name="text"> + <string>Algorithm for calculated ceiling:</string> </property> </widget> </item> <item row="3" column="0"> <widget class="QRadioButton" name="buehlmann"> <property name="text"> - <string>Bühlmann</string> + <string>B&ühlmann</string> </property> <property name="checked"> <bool>true</bool> </property> </widget> </item> + <item row="0" column="0" colspan="2"> + <widget class="QCheckBox" name="red_ceiling"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Draw dive computer reported ceiling red</string> + </property> + </widget> + </item> + <item row="5" column="4"> + <widget class="QSpinBox" name="pscrfactor"> + <property name="suffix"> + <string/> + </property> + <property name="prefix"> + <string>1:</string> + </property> + </widget> + </item> <item row="3" column="3"> <widget class="QLabel" name="label_GFhigh"> <property name="text"> @@ -235,8 +238,18 @@ </property> </widget> </item> - <item row="3" column="4"> - <widget class="QSpinBox" name="gfhigh"> + <item row="5" column="2"> + <widget class="QDoubleSpinBox" name="psro2rate"> + <property name="suffix"> + <string>ℓ/min</string> + </property> + <property name="decimals"> + <number>3</number> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QSpinBox" name="gflow"> <property name="suffix"> <string>%</string> </property> @@ -248,26 +261,23 @@ </property> </widget> </item> - <item row="3" column="1"> - <widget class="QLabel" name="label_GFlow"> + <item row="5" column="1"> + <widget class="QLabel" name="MetabolicRate"> <property name="text"> - <string>GFLow</string> + <string>Metabolic rate O₂</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> </property> </widget> </item> - <item row="3" column="2"> - <widget class="QSpinBox" name="gflow"> - <property name="suffix"> - <string>%</string> - </property> - <property name="minimum"> - <number>1</number> + <item row="5" column="3"> + <widget class="QLabel" name="label_28"> + <property name="text"> + <string>Dilution ratio</string> </property> - <property name="maximum"> - <number>150</number> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -278,6 +288,19 @@ </property> </widget> </item> + <item row="2" column="2"> + <widget class="QSpinBox" name="vpmb_conservatism"> + <property name="prefix"> + <string>+</string> + </property> + <property name="minimum"> + <number>0</number> + </property> + <property name="maximum"> + <number>4</number> + </property> + </widget> + </item> <item row="5" column="0"> <widget class="QLabel" name="pSCR"> <property name="text"> @@ -285,46 +308,36 @@ </property> </widget> </item> - <item row="5" column="1"> - <widget class="QLabel" name="MetabolicRate"> + <item row="2" column="0"> + <widget class="QRadioButton" name="vpmb"> <property name="text"> - <string>Metabolic rate O₂</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> + <string>&VPM-B</string> </property> </widget> </item> - <item row="5" column="2"> - <widget class="QDoubleSpinBox" name="psro2rate"> + <item row="3" column="4"> + <widget class="QSpinBox" name="gfhigh"> <property name="suffix"> - <string>ℓ/min</string> + <string>%</string> </property> - <property name="decimals"> - <number>3</number> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>150</number> </property> </widget> </item> - <item row="5" column="3"> - <widget class="QLabel" name="label_28"> + <item row="3" column="1"> + <widget class="QLabel" name="label_GFlow"> <property name="text"> - <string>Dilution ratio</string> + <string>GFLow</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> </property> </widget> </item> - <item row="5" column="4"> - <widget class="QSpinBox" name="pscrfactor"> - <property name="suffix"> - <string/> - </property> - <property name="prefix"> - <string>1:</string> - </property> - </widget> - </item> </layout> </widget> </item> @@ -367,7 +380,6 @@ </layout> </widget> <tabstops> - <tabstop>po2Threshold</tabstop> <tabstop>pn2Threshold</tabstop> <tabstop>pheThreshold</tabstop> <tabstop>maxpo2</tabstop> |