summaryrefslogtreecommitdiffstats
path: root/qt-ui/preferences.cpp
diff options
context:
space:
mode:
authorGravatar willem ferguson <willemferguson@zoology.up.ac.za>2015-01-20 20:13:53 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-21 17:00:18 +1200
commita700be32076225e68bfaa4b6c418cff015e2ceec (patch)
tree57c7d8b94e66279d301470b53101d2b5c05deec5 /qt-ui/preferences.cpp
parent2923329e8e47f64667c34b33eb1de64657cb6774 (diff)
downloadsubsurface-a700be32076225e68bfaa4b6c418cff015e2ceec.tar.gz
CCR option: display o2 sensor data
This patch creates the possibility of viewing the individual sensor values when the po2 button on the profile toolbar is activated. This follows exactly the procedure for optionally displaying the setpoint values while viewing po2. A checkbox in the preferences panel determines whether sensor information is shown. By default it is set to OFF. When checked, and the po2 button is activated, sensor1 values are shown in grey, sensor2 in blue and sensor3 in brown. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/preferences.cpp')
-rw-r--r--qt-ui/preferences.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index 6c4e65df8..92c46f75b 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -124,6 +124,7 @@ void PreferencesDialog::setUiFromPrefs()
ui.gfhigh->setValue(prefs.gfhigh);
ui.gf_low_at_maxdepth->setChecked(prefs.gf_low_at_maxdepth);
ui.show_ccr_setpoint->setChecked(prefs.show_ccr_setpoint);
+ ui.show_ccr_sensors->setChecked(prefs.show_ccr_sensors);
ui.defaultSetpoint->setValue((double)prefs.defaultsetpoint / 1000.0);
ui.psro2rate->setValue(prefs.o2consumption / 1000.0);
ui.pscrfactor->setValue(rint(1000.0 / prefs.pscr_ratio));
@@ -279,6 +280,7 @@ void PreferencesDialog::syncSettings()
SAVE_OR_REMOVE("gfhigh", default_prefs.gfhigh, ui.gfhigh->value());
SAVE_OR_REMOVE("gf_low_at_maxdepth", default_prefs.gf_low_at_maxdepth, ui.gf_low_at_maxdepth->isChecked());
SAVE_OR_REMOVE("show_ccr_setpoint", default_prefs.show_ccr_setpoint, ui.show_ccr_setpoint->isChecked());
+ SAVE_OR_REMOVE("show_ccr_sensors", default_prefs.show_ccr_sensors, ui.show_ccr_sensors->isChecked());
SAVE_OR_REMOVE("display_unused_tanks", default_prefs.display_unused_tanks, ui.display_unused_tanks->isChecked());
SAVE_OR_REMOVE("show_average_depth", default_prefs.show_average_depth, ui.show_average_depth->isChecked());
s.endGroup();
@@ -396,6 +398,7 @@ void PreferencesDialog::loadSettings()
GET_INT("gfhigh", gfhigh);
GET_BOOL("gf_low_at_maxdepth", gf_low_at_maxdepth);
GET_BOOL("show_ccr_setpoint",show_ccr_setpoint);
+ GET_BOOL("show_ccr_sensors",show_ccr_sensors);
GET_BOOL("zoomed_plot", zoomed_plot);
set_gf(prefs.gflow, prefs.gfhigh, prefs.gf_low_at_maxdepth);
GET_BOOL("show_sac", show_sac);