aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/preferences/preferences_graph.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2016-10-03 16:25:48 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-10-11 21:58:41 -0700
commit0d20344c901c697d109d2ac071293bcb47db039a (patch)
tree57c7196135655e73f90c40e7b5c1f51affee2fa6 /desktop-widgets/preferences/preferences_graph.cpp
parentb5de08b709819783e5d79ffffa333cea05f5186f (diff)
downloadsubsurface-0d20344c901c697d109d2ac071293bcb47db039a.tar.gz
Add preference to change deco model
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/preferences/preferences_graph.cpp')
-rw-r--r--desktop-widgets/preferences/preferences_graph.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/desktop-widgets/preferences/preferences_graph.cpp b/desktop-widgets/preferences/preferences_graph.cpp
index c13915e37..8f3e5e7bf 100644
--- a/desktop-widgets/preferences/preferences_graph.cpp
+++ b/desktop-widgets/preferences/preferences_graph.cpp
@@ -25,6 +25,13 @@ void PreferencesGraph::refreshSettings()
ui->maxpo2->setValue(prefs.modpO2);
ui->red_ceiling->setChecked(prefs.redceiling);
+ if (prefs.deco_mode == BUEHLMANN) {
+ ui->buehlmann->setChecked(true);
+ ui->vpmb->setChecked(false);
+ } else {
+ ui->buehlmann->setChecked(false);
+ ui->vpmb->setChecked(false);
+ }
ui->gflow->setValue(prefs.gflow);
ui->gfhigh->setValue(prefs.gfhigh);
ui->vpmb_conservatism->setValue(prefs.vpmb_conservatism);
@@ -54,6 +61,7 @@ void PreferencesGraph::syncSettings()
auto tech = SettingsObjectWrapper::instance()->techDetails;
tech->setModp02(ui->maxpo2->value());
tech->setRedceiling(ui->red_ceiling->isChecked());
+ tech->setBuehlmann(ui->buehlmann->isChecked());
tech->setGflow(ui->gflow->value());
tech->setGfhigh(ui->gfhigh->value());
tech->setVpmbConservatism(ui->vpmb_conservatism->value());
@@ -73,4 +81,13 @@ void PreferencesGraph::on_gfhigh_valueChanged(int gf)
{
ui->gfhigh->setStyleSheet(DANGER_GF);
}
+
+void PreferencesGraph::on_buehlmann_toggled(bool buehlmann)
+{
+ ui->gfhigh->setEnabled(buehlmann);
+ ui->gflow->setEnabled(buehlmann);
+ ui->gf_low_at_maxdepth->setEnabled(buehlmann);
+ ui->vpmb_conservatism->setEnabled(!buehlmann);
+}
+
#undef DANGER_GF