diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-05-29 15:32:31 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-29 15:32:31 +0900 |
commit | da52ff56b2cc2b4aecda03b4f21f94ce3ff0ce22 (patch) | |
tree | faf2bd2a5fc72f4f017f5b7a02285d8b835c6579 /qt-ui/preferences.cpp | |
parent | c78d0ad51b2495b4807ae999667b44432a05cb3b (diff) | |
download | subsurface-da52ff56b2cc2b4aecda03b4f21f94ce3ff0ce22.tar.gz |
Correct the ceiling preference handling
Added the red dc ceiling as preference option.
Hooked them all up together so the sub-preferences are enabled when the
master preference is set (for 3m and red ceiling).
Use the options in the profile plotting functions.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/preferences.cpp')
-rw-r--r-- | qt-ui/preferences.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index 8949a2df0..453f20c34 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -25,7 +25,6 @@ PreferencesDialog::PreferencesDialog(QWidget* parent, Qt::WindowFlags f) : QDial // Graph s.beginGroup("TecDetails"); - ui->calculated_ceiling->setChecked(B(calcceiling, profile_calc_ceiling)); ui->phe->setChecked(B(phegraph, pp_graphs.phe)); ui->pheThreshold->setEnabled(ui->phe->isChecked()); ui->po2->setChecked(B(po2graph, pp_graphs.po2)); @@ -37,8 +36,12 @@ PreferencesDialog::PreferencesDialog(QWidget* parent, Qt::WindowFlags f) : QDial ui->pn2Threshold->setValue(D(pn2threshold, pp_graphs.pn2_threshold)); ui->ead_end_eadd->setChecked(B(ead, ead)); ui->dc_reported_ceiling->setChecked(B(dcceiling, profile_dc_ceiling)); - ui->calculated_ceiling->setChecked(B(calceiling, profile_calc_ceiling)); + ui->red_ceiling->setEnabled(ui->dc_reported_ceiling->isChecked()); + ui->red_ceiling->setChecked(B(redceiling, profile_red_ceiling)); + ui->calculated_ceiling->setChecked(B(calcceiling, profile_calc_ceiling)); + ui->increment_3m->setEnabled(ui->calculated_ceiling->isChecked()); ui->increment_3m->setChecked(B(calcceiling3m, calc_ceiling_3m_incr)); + ui->gflow->setValue((int)(I(gflow, gflow))); ui->gfhigh->setValue((int)(I(gfhigh, gfhigh))); s.endGroup(); @@ -98,7 +101,6 @@ void PreferencesDialog::syncSettings() // Graph s.beginGroup("TecDetails"); - SB("calcceiling", ui->calculated_ceiling); SB("phegraph", ui->phe); SB("po2graph", ui->po2); SB("pn2graph", ui->pn2); @@ -107,7 +109,9 @@ void PreferencesDialog::syncSettings() s.setValue("pn2threshold", ui->pn2Threshold->value()); SB("ead", ui->ead_end_eadd); SB("dcceiling", ui->dc_reported_ceiling); - SB("calceiling3m", ui->increment_3m); + SB("redceiling", ui->red_ceiling); + SB("calcceiling", ui->calculated_ceiling); + SB("calcceiling3m", ui->increment_3m); s.setValue("gflow", ui->gflow->value()); s.setValue("gfhigh", ui->gfhigh->value()); s.endGroup(); |