summaryrefslogtreecommitdiffstats
path: root/qt-ui/preferences.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-11-12 23:09:57 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-13 11:55:19 +0900
commit4bb8368a20ad03cb5c1c9134df0a55a653c10cf0 (patch)
treefe870f50d62077dbf762cc93a4c2790e86b94e4e /qt-ui/preferences.cpp
parentdbd4a471ecfa2901b1384f361549c6bbadc84c55 (diff)
downloadsubsurface-4bb8368a20ad03cb5c1c9134df0a55a653c10cf0.tar.gz
Introduce an on/off switch for calculating ndl/tts
Let the user choose if the calculation of ndl and tts is worth the time it takes. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/preferences.cpp')
-rw-r--r--qt-ui/preferences.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index 4ba8739a3..f35901709 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -46,6 +46,8 @@ void PreferencesDialog::setUiFromPrefs()
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.groupBox->setEnabled(ui.personalize->isChecked());
ui.gflow->setValue(prefs.gflow);
@@ -104,6 +106,7 @@ void PreferencesDialog::setPrefsFromUi()
SP(profile_red_ceiling, ui.red_ceiling);
SP(profile_calc_ceiling, ui.calculated_ceiling);
SP(calc_ceiling_3m_incr, ui.increment_3m);
+ SP(calc_ndl_tts, ui.calc_ndl_tts);
SP(calc_all_tissues, ui.all_tissues);
prefs.gflow = ui.gflow->value();
prefs.gfhigh = ui.gfhigh->value();
@@ -142,6 +145,7 @@ void PreferencesDialog::syncSettings()
SB("redceiling", ui.red_ceiling);
SB("calcceiling", ui.calculated_ceiling);
SB("calcceiling3m", ui.increment_3m);
+ SB("calcndltts", ui.calc_ndl_tts);
SB("calcalltissues", ui.all_tissues);
s.setValue("gflow", ui.gflow->value());
s.setValue("gfhigh", ui.gfhigh->value());