diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/preferences.cpp | 31 | ||||
-rw-r--r-- | qt-ui/preferences.ui | 498 |
2 files changed, 116 insertions, 413 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index 2a49a43dc..5969a2d47 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -46,29 +46,11 @@ void PreferencesDialog::showEvent(QShowEvent *event) void PreferencesDialog::setUiFromPrefs() { // graphs - ui.phe->setChecked(prefs.pp_graphs.phe); - ui.pheThreshold->setEnabled(ui.phe->isChecked()); - ui.po2->setChecked(prefs.pp_graphs.po2); - ui.po2Threshold->setEnabled(ui.po2->isChecked()); - ui.pn2->setChecked(prefs.pp_graphs.pn2); - ui.pn2Threshold->setEnabled(ui.pn2->isChecked()); ui.pheThreshold->setValue(prefs.pp_graphs.phe_threshold); ui.po2Threshold->setValue(prefs.pp_graphs.po2_threshold); ui.pn2Threshold->setValue(prefs.pp_graphs.pn2_threshold); - ui.ead_end_eadd->setChecked(prefs.ead); - ui.mod->setChecked(prefs.mod); - ui.maxppo2->setEnabled(ui.mod->isChecked()); ui.maxppo2->setValue(prefs.mod_ppO2); - ui.dc_reported_ceiling->setChecked(prefs.profile_dc_ceiling); - ui.red_ceiling->setEnabled(ui.dc_reported_ceiling->isChecked()); ui.red_ceiling->setChecked(prefs.profile_red_ceiling); - ui.calculated_ceiling->setChecked(prefs.profile_calc_ceiling); - ui.increment_3m->setEnabled(ui.calculated_ceiling->isChecked()); - ui.increment_3m->setChecked(prefs.calc_ceiling_3m_incr); - ui.all_tissues->setEnabled(ui.calculated_ceiling->isChecked()); - ui.all_tissues->setChecked(prefs.calc_all_tissues); - ui.calc_ndl_tts->setEnabled(ui.calculated_ceiling->isChecked()); - ui.calc_ndl_tts->setChecked(prefs.calc_ndl_tts); ui.units_group->setEnabled(ui.personalize->isChecked()); ui.gflow->setValue(prefs.gflow); @@ -105,7 +87,6 @@ void PreferencesDialog::setUiFromPrefs() } ui.displayinvalid->setChecked(prefs.display_invalid_dives); ui.display_unused_tanks->setChecked(prefs.display_unused_tanks); - ui.show_sac->setChecked(prefs.show_sac); ui.vertical_speed_minutes->setChecked(prefs.units.vertical_speed_time == units::MINUTES); ui.vertical_speed_seconds->setChecked(prefs.units.vertical_speed_time == units::SECONDS); @@ -188,26 +169,14 @@ void PreferencesDialog::syncSettings() // Graph s.beginGroup("TecDetails"); - SB("phegraph", ui.phe); - SB("po2graph", ui.po2); - SB("pn2graph", ui.pn2); s.setValue("phethreshold", ui.pheThreshold->value()); s.setValue("po2threshold", ui.po2Threshold->value()); s.setValue("pn2threshold", ui.pn2Threshold->value()); - SB("ead", ui.ead_end_eadd); - SB("mod", ui.mod); s.setValue("modppO2", ui.maxppo2->value()); - SB("dcceiling", ui.dc_reported_ceiling); SB("redceiling", ui.red_ceiling); - SB("calcceiling", ui.calculated_ceiling); - SB("calcceiling3m", ui.increment_3m); - prefs.calc_ceiling_3m_incr = ui.increment_3m->isChecked() ? 1 : 0; - SB("calcndltts", ui.calc_ndl_tts); - SB("calcalltissues", ui.all_tissues); s.setValue("gflow", ui.gflow->value()); s.setValue("gfhigh", ui.gfhigh->value()); SB("gf_low_at_maxdepth", ui.gf_low_at_maxdepth); - SB("show_sac", ui.show_sac); SB("display_unused_tanks", ui.display_unused_tanks); s.endGroup(); diff --git a/qt-ui/preferences.ui b/qt-ui/preferences.ui index fb5a16abb..988c5484f 100644 --- a/qt-ui/preferences.ui +++ b/qt-ui/preferences.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>780</width> - <height>521</height> + <width>872</width> + <height>648</height> </rect> </property> <property name="windowTitle"> @@ -131,7 +131,7 @@ </sizepolicy> </property> <property name="currentIndex"> - <number>1</number> + <number>0</number> </property> <widget class="QWidget" name="page_2"> <layout class="QVBoxLayout" name="verticalLayout_3"> @@ -505,39 +505,19 @@ <item> <layout class="QHBoxLayout" name="horizontalLayout_4"> <item> - <widget class="QCheckBox" name="po2"> - <property name="text"> - <string>pO₂</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> <widget class="QLabel" name="label_12"> <property name="enabled"> - <bool>false</bool> + <bool>true</bool> </property> <property name="text"> - <string>threshold</string> + <string>threshold when showing pO₂</string> </property> </widget> </item> <item> <widget class="QDoubleSpinBox" name="po2Threshold"> <property name="enabled"> - <bool>false</bool> + <bool>true</bool> </property> </widget> </item> @@ -546,39 +526,19 @@ <item> <layout class="QHBoxLayout" name="horizontalLayout_5"> <item> - <widget class="QCheckBox" name="pn2"> - <property name="text"> - <string>pN₂</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> <widget class="QLabel" name="label_13"> <property name="enabled"> - <bool>false</bool> + <bool>true</bool> </property> <property name="text"> - <string>threshold</string> + <string>threshold when showing pN₂</string> </property> </widget> </item> <item> <widget class="QDoubleSpinBox" name="pn2Threshold"> <property name="enabled"> - <bool>false</bool> + <bool>true</bool> </property> </widget> </item> @@ -587,39 +547,19 @@ <item> <layout class="QHBoxLayout" name="horizontalLayout_8"> <item> - <widget class="QCheckBox" name="phe"> - <property name="text"> - <string>pHe</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_4"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> <widget class="QLabel" name="label_17"> <property name="enabled"> - <bool>false</bool> + <bool>true</bool> </property> <property name="text"> - <string>threshold</string> + <string>threshold when showing pHe</string> </property> </widget> </item> <item> <widget class="QDoubleSpinBox" name="pheThreshold"> <property name="enabled"> - <bool>false</bool> + <bool>true</bool> </property> </widget> </item> @@ -628,145 +568,33 @@ <item> <layout class="QHBoxLayout" name="horizontalLayout_9"> <item> - <widget class="QCheckBox" name="mod"> - <property name="text"> - <string>MOD</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_5"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> <widget class="QLabel" name="label_18"> <property name="enabled"> - <bool>false</bool> + <bool>true</bool> </property> <property name="text"> - <string>max ppO₂</string> + <string>max ppO₂ when showing MOD</string> </property> </widget> </item> <item> <widget class="QDoubleSpinBox" name="maxppo2"> <property name="enabled"> - <bool>false</bool> + <bool>true</bool> </property> </widget> </item> </layout> </item> <item> - <widget class="QCheckBox" name="ead_end_eadd"> - <property name="text"> - <string>EAD END EADD</string> - </property> - </widget> - </item> - <item> <layout class="QHBoxLayout" name="horizontalLayout_10b"> <item> - <widget class="QCheckBox" name="dc_reported_ceiling"> - <property name="text"> - <string>Dive computer reported ceiling</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_6b"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> <widget class="QCheckBox" name="red_ceiling"> <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>draw ceiling red</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_10"> - <item> - <widget class="QCheckBox" name="calculated_ceiling"> - <property name="text"> - <string>Calculated ceiling</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_6"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="all_tissues"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>show all tissues</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="increment_3m"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>3m increments</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="calc_ndl_tts"> - <property name="enabled"> - <bool>false</bool> + <bool>true</bool> </property> <property name="text"> - <string>Calculate NDL/TTS</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_11b"> - <item> - <widget class="QCheckBox" name="show_sac"> - <property name="text"> - <string>SAC</string> + <string>draw dive computer reported ceiling red</string> </property> </widget> </item> @@ -895,9 +723,7 @@ </item> </layout> </widget> - <resources> - <include location="../subsurface.qrc"/> - </resources> + <resources/> <connections> <connection> <sender>buttonBox</sender> @@ -948,41 +774,9 @@ </hints> </connection> <connection> - <sender>po2</sender> - <signal>clicked(bool)</signal> - <receiver>label_12</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel"> - <x>195</x> - <y>39</y> - </hint> - <hint type="destinationlabel"> - <x>195</x> - <y>39</y> - </hint> - </hints> - </connection> - <connection> - <sender>po2</sender> - <signal>clicked(bool)</signal> - <receiver>po2Threshold</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel"> - <x>195</x> - <y>39</y> - </hint> - <hint type="destinationlabel"> - <x>195</x> - <y>39</y> - </hint> - </hints> - </connection> - <connection> - <sender>pn2</sender> - <signal>clicked(bool)</signal> - <receiver>label_13</receiver> + <sender>personalize</sender> + <signal>toggled(bool)</signal> + <receiver>units_group</receiver> <slot>setEnabled(bool)</slot> <hints> <hint type="sourcelabel"> @@ -996,265 +790,205 @@ </hints> </connection> <connection> - <sender>pn2</sender> - <signal>clicked(bool)</signal> - <receiver>pn2Threshold</receiver> - <slot>setEnabled(bool)</slot> + <sender>languageSystemDefault</sender> + <signal>toggled(bool)</signal> + <receiver>languageView</receiver> + <slot>setDisabled(bool)</slot> <hints> <hint type="sourcelabel"> - <x>195</x> - <y>39</y> + <x>176</x> + <y>30</y> </hint> <hint type="destinationlabel"> - <x>195</x> - <y>39</y> + <x>171</x> + <y>79</y> </hint> </hints> </connection> <connection> - <sender>phe</sender> - <signal>clicked(bool)</signal> - <receiver>label_17</receiver> - <slot>setEnabled(bool)</slot> + <sender>languageSystemDefault</sender> + <signal>toggled(bool)</signal> + <receiver>languageFilter</receiver> + <slot>setDisabled(bool)</slot> <hints> <hint type="sourcelabel"> - <x>195</x> - <y>39</y> + <x>209</x> + <y>34</y> </hint> <hint type="destinationlabel"> - <x>195</x> - <y>39</y> + <x>599</x> + <y>33</y> </hint> </hints> </connection> <connection> - <sender>phe</sender> - <signal>clicked(bool)</signal> - <receiver>pheThreshold</receiver> - <slot>setEnabled(bool)</slot> + <sender>imperial</sender> + <signal>toggled(bool)</signal> + <receiver>feet</receiver> + <slot>setChecked(bool)</slot> <hints> <hint type="sourcelabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> <hint type="destinationlabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> </hints> </connection> <connection> - <sender>mod</sender> - <signal>clicked(bool)</signal> - <receiver>label_18</receiver> - <slot>setEnabled(bool)</slot> + <sender>metric</sender> + <signal>toggled(bool)</signal> + <receiver>meter</receiver> + <slot>setChecked(bool)</slot> <hints> <hint type="sourcelabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> <hint type="destinationlabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> </hints> </connection> <connection> - <sender>mod</sender> - <signal>clicked(bool)</signal> - <receiver>maxppo2</receiver> - <slot>setEnabled(bool)</slot> + <sender>imperial</sender> + <signal>toggled(bool)</signal> + <receiver>psi</receiver> + <slot>setChecked(bool)</slot> <hints> <hint type="sourcelabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> <hint type="destinationlabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> </hints> </connection> <connection> - <sender>calculated_ceiling</sender> - <signal>clicked(bool)</signal> - <receiver>all_tissues</receiver> - <slot>setEnabled(bool)</slot> + <sender>metric</sender> + <signal>toggled(bool)</signal> + <receiver>bar</receiver> + <slot>setChecked(bool)</slot> <hints> <hint type="sourcelabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> <hint type="destinationlabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> </hints> </connection> <connection> - <sender>calculated_ceiling</sender> - <signal>clicked(bool)</signal> - <receiver>increment_3m</receiver> - <slot>setEnabled(bool)</slot> + <sender>imperial</sender> + <signal>toggled(bool)</signal> + <receiver>cuft</receiver> + <slot>setChecked(bool)</slot> <hints> <hint type="sourcelabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> <hint type="destinationlabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> </hints> </connection> <connection> - <sender>calculated_ceiling</sender> - <signal>clicked(bool)</signal> - <receiver>calc_ndl_tts</receiver> - <slot>setEnabled(bool)</slot> + <sender>metric</sender> + <signal>toggled(bool)</signal> + <receiver>liter</receiver> + <slot>setChecked(bool)</slot> <hints> <hint type="sourcelabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> <hint type="destinationlabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> </hints> </connection> <connection> - <sender>dc_reported_ceiling</sender> - <signal>clicked(bool)</signal> - <receiver>red_ceiling</receiver> - <slot>setEnabled(bool)</slot> + <sender>imperial</sender> + <signal>toggled(bool)</signal> + <receiver>fahrenheit</receiver> + <slot>setChecked(bool)</slot> <hints> <hint type="sourcelabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> <hint type="destinationlabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> </hints> </connection> <connection> - <sender>personalize</sender> + <sender>metric</sender> <signal>toggled(bool)</signal> - <receiver>units_group</receiver> - <slot>setEnabled(bool)</slot> + <receiver>celsius</receiver> + <slot>setChecked(bool)</slot> <hints> <hint type="sourcelabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> <hint type="destinationlabel"> - <x>195</x> - <y>39</y> + <x>20</x> + <y>20</y> </hint> </hints> </connection> <connection> - <sender>languageSystemDefault</sender> + <sender>imperial</sender> <signal>toggled(bool)</signal> - <receiver>languageView</receiver> - <slot>setDisabled(bool)</slot> + <receiver>lbs</receiver> + <slot>setChecked(bool)</slot> <hints> <hint type="sourcelabel"> - <x>176</x> - <y>30</y> + <x>20</x> + <y>20</y> </hint> <hint type="destinationlabel"> - <x>171</x> - <y>79</y> + <x>20</x> + <y>20</y> </hint> </hints> </connection> <connection> - <sender>languageSystemDefault</sender> + <sender>metric</sender> <signal>toggled(bool)</signal> - <receiver>languageFilter</receiver> - <slot>setDisabled(bool)</slot> + <receiver>kg</receiver> + <slot>setChecked(bool)</slot> <hints> <hint type="sourcelabel"> - <x>209</x> - <y>34</y> + <x>20</x> + <y>20</y> </hint> <hint type="destinationlabel"> - <x>599</x> - <y>33</y> + <x>20</x> + <y>20</y> </hint> </hints> </connection> - <connection> - <sender>imperial</sender> - <signal>toggled(bool)</signal> - <receiver>feet</receiver> - <slot>setChecked(bool)</slot> - </connection> - <connection> - <sender>metric</sender> - <signal>toggled(bool)</signal> - <receiver>meter</receiver> - <slot>setChecked(bool)</slot> - </connection> - <connection> - <sender>imperial</sender> - <signal>toggled(bool)</signal> - <receiver>psi</receiver> - <slot>setChecked(bool)</slot> - </connection> - <connection> - <sender>metric</sender> - <signal>toggled(bool)</signal> - <receiver>bar</receiver> - <slot>setChecked(bool)</slot> - </connection> - <connection> - <sender>imperial</sender> - <signal>toggled(bool)</signal> - <receiver>cuft</receiver> - <slot>setChecked(bool)</slot> - </connection> - <connection> - <sender>metric</sender> - <signal>toggled(bool)</signal> - <receiver>liter</receiver> - <slot>setChecked(bool)</slot> - </connection> - <connection> - <sender>imperial</sender> - <signal>toggled(bool)</signal> - <receiver>fahrenheit</receiver> - <slot>setChecked(bool)</slot> - </connection> - <connection> - <sender>metric</sender> - <signal>toggled(bool)</signal> - <receiver>celsius</receiver> - <slot>setChecked(bool)</slot> - </connection> - <connection> - <sender>imperial</sender> - <signal>toggled(bool)</signal> - <receiver>lbs</receiver> - <slot>setChecked(bool)</slot> - </connection> - <connection> - <sender>metric</sender> - <signal>toggled(bool)</signal> - <receiver>kg</receiver> - <slot>setChecked(bool)</slot> - </connection> </connections> <buttongroups> - <buttongroup name="buttonGroup"/> + <buttongroup name="verticalSpeed"/> <buttongroup name="buttonGroup_2"/> <buttongroup name="buttonGroup_3"/> <buttongroup name="buttonGroup_4"/> <buttongroup name="buttonGroup_5"/> <buttongroup name="buttonGroup_6"/> - <buttongroup name="verticalSpeed"/> + <buttongroup name="buttonGroup"/> </buttongroups> </ui> |