diff options
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 19 | ||||
-rw-r--r-- | desktop-widgets/preferences/preferences_graph.cpp | 10 |
2 files changed, 15 insertions, 14 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index cc3bc7c54..e91e315f6 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -303,9 +303,10 @@ MainWindow::MainWindow() : QMainWindow(), connect(ui.profTissues, &QAction::triggered, this, &MainWindow::unsetProfHR); connect(ui.profHR, &QAction::triggered, this, &MainWindow::unsetProfTissues); - connect(ui.profPhe, &QAction::triggered, sWrapper->pp_gas, &PartialPressureGasSettings::setShowPhe); - connect(ui.profPn2, &QAction::triggered, sWrapper->pp_gas, &PartialPressureGasSettings::setShowPn2); - connect(ui.profPO2, &QAction::triggered, sWrapper->pp_gas, &PartialPressureGasSettings::setShowPo2); + auto pp_gas = qPrefPartialPressureGas::instance(); + connect(ui.profPhe, &QAction::triggered, pp_gas, &qPrefPartialPressureGas::set_phe); + connect(ui.profPn2, &QAction::triggered, pp_gas, &qPrefPartialPressureGas::set_pn2); + connect(ui.profPO2, &QAction::triggered, pp_gas, &qPrefPartialPressureGas::set_po2); connect(sWrapper->techDetails, &qPrefTechnicalDetails::calcalltissues_changed , graphics(), &ProfileWidget2::actionRequestedReplot); connect(sWrapper->techDetails, &qPrefTechnicalDetails::calcceiling_changed , graphics(), &ProfileWidget2::actionRequestedReplot); @@ -322,9 +323,9 @@ MainWindow::MainWindow() : QMainWindow(), connect(sWrapper->techDetails, &qPrefTechnicalDetails::tankbar_changed , graphics(), &ProfileWidget2::actionRequestedReplot); connect(sWrapper->techDetails, &qPrefTechnicalDetails::percentagegraph_changed , graphics(), &ProfileWidget2::actionRequestedReplot); - connect(sWrapper->pp_gas, &PartialPressureGasSettings::showPheChanged, graphics(), &ProfileWidget2::actionRequestedReplot); - connect(sWrapper->pp_gas, &PartialPressureGasSettings::showPn2Changed, graphics(), &ProfileWidget2::actionRequestedReplot); - connect(sWrapper->pp_gas, &PartialPressureGasSettings::showPo2Changed, graphics(), &ProfileWidget2::actionRequestedReplot); + connect(sWrapper->pp_gas, &qPrefPartialPressureGas::phe_changed, graphics(), &ProfileWidget2::actionRequestedReplot); + connect(sWrapper->pp_gas, &qPrefPartialPressureGas::pn2_changed, graphics(), &ProfileWidget2::actionRequestedReplot); + connect(sWrapper->pp_gas, &qPrefPartialPressureGas::po2_changed, graphics(), &ProfileWidget2::actionRequestedReplot); // now let's set up some connections connect(graphics(), &ProfileWidget2::enableToolbar ,this, &MainWindow::setEnabledToolbar); @@ -343,9 +344,9 @@ MainWindow::MainWindow() : QMainWindow(), ui.profIncrement3m->setChecked(sWrapper->techDetails->calcceiling3m()); ui.profMod->setChecked(sWrapper->techDetails->mod()); ui.profNdl_tts->setChecked(sWrapper->techDetails->calcndltts()); - ui.profPhe->setChecked(sWrapper->pp_gas->showPhe()); - ui.profPn2->setChecked(sWrapper->pp_gas->showPn2()); - ui.profPO2->setChecked(sWrapper->pp_gas->showPo2()); + ui.profPhe->setChecked(pp_gas->phe()); + ui.profPn2->setChecked(pp_gas->pn2()); + ui.profPO2->setChecked(pp_gas->po2()); ui.profHR->setChecked(sWrapper->techDetails->hrgraph()); ui.profRuler->setChecked(sWrapper->techDetails->rulergraph()); ui.profSAC->setChecked(sWrapper->techDetails->show_sac()); diff --git a/desktop-widgets/preferences/preferences_graph.cpp b/desktop-widgets/preferences/preferences_graph.cpp index 6ddd7250a..a25f818c7 100644 --- a/desktop-widgets/preferences/preferences_graph.cpp +++ b/desktop-widgets/preferences/preferences_graph.cpp @@ -58,11 +58,11 @@ void PreferencesGraph::syncSettings() general->setPscrRatio(lrint(1000.0 / ui->pscrfactor->value())); general->setAutoRecalculateThumbnails(ui->auto_recalculate_thumbnails->isChecked()); - auto pp_gas = SettingsObjectWrapper::instance()->pp_gas; - pp_gas->setPheThreshold(ui->pheThreshold->value()); - pp_gas->setPo2ThresholdMax(ui->po2ThresholdMax->value()); - pp_gas->setPo2ThresholdMin(ui->po2ThresholdMin->value()); - pp_gas->setPn2Threshold(ui->pn2Threshold->value()); + auto pp_gas = qPrefPartialPressureGas::instance(); + pp_gas->set_phe_threshold(ui->pheThreshold->value()); + pp_gas->set_po2_threshold_max(ui->po2ThresholdMax->value()); + pp_gas->set_po2_threshold_min(ui->po2ThresholdMin->value()); + pp_gas->set_pn2_threshold(ui->pn2Threshold->value()); auto tech = qPrefTechnicalDetails::instance(); tech->set_modpO2(ui->maxpo2->value()); |