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>
This commit is contained in:
Dirk Hohndel 2013-05-29 15:32:31 +09:00
parent c78d0ad51b
commit da52ff56b2
4 changed files with 87 additions and 40 deletions

View file

@ -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();