Correctly enable partial pressure threshold entry in preferences

The initial state needs to reflect the value of the checkbox. Once the
dialog is run, there is a signal/slot connection in the .ui file that
keeps things in sync.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-05-29 14:58:22 +09:00
parent 4f53ad736d
commit c78d0ad51b

View file

@ -27,8 +27,11 @@ PreferencesDialog::PreferencesDialog(QWidget* parent, Qt::WindowFlags f) : QDial
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));
ui->po2Threshold->setEnabled(ui->po2->isChecked());
ui->pn2->setChecked(B(pn2graph, pp_graphs.pn2));
ui->pn2Threshold->setEnabled(ui->pn2->isChecked());
ui->pheThreshold->setValue(D(phethreshold, pp_graphs.phe_threshold));
ui->po2Threshold->setValue(D(po2threshold, pp_graphs.po2_threshold));
ui->pn2Threshold->setValue(D(pn2threshold, pp_graphs.pn2_threshold));