From 21243ec4f7e2b2d886ac550142afee4c0df65924 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Wed, 1 Aug 2018 21:41:42 +0200 Subject: core: activate qPrefDivePlanner remove DivePlanner from SettingsObjectWrapper and reference qPrefDivePlanner update files using SettingsObjectWrapper/DivePlanner to use qPrefDivePlanner this activated qPrefDivePlanner and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen --- desktop-widgets/diveplanner.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index 7d4f1a5f5..e2f192f8e 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -599,27 +599,27 @@ void PlannerSettingsWidget::printDecoPlan() void PlannerSettingsWidget::setAscrate75(int rate) { - SettingsObjectWrapper::instance()->planner_settings->setAscrate75(lrint(rate * UNIT_FACTOR)); + qPrefDivePlanner::instance()->set_ascrate75(lrint(rate * UNIT_FACTOR)); } void PlannerSettingsWidget::setAscrate50(int rate) { - SettingsObjectWrapper::instance()->planner_settings->setAscrate50(lrint(rate * UNIT_FACTOR)); + qPrefDivePlanner::instance()->set_ascrate50(lrint(rate * UNIT_FACTOR)); } void PlannerSettingsWidget::setAscratestops(int rate) { - SettingsObjectWrapper::instance()->planner_settings->setAscratestops(lrint(rate * UNIT_FACTOR)); + qPrefDivePlanner::instance()->set_ascratestops(lrint(rate * UNIT_FACTOR)); } void PlannerSettingsWidget::setAscratelast6m(int rate) { - SettingsObjectWrapper::instance()->planner_settings->setAscratelast6m(lrint(rate * UNIT_FACTOR)); + qPrefDivePlanner::instance()->set_ascratelast6m(lrint(rate * UNIT_FACTOR)); } void PlannerSettingsWidget::setDescrate(int rate) { - SettingsObjectWrapper::instance()->planner_settings->setDescrate(lrint(rate * UNIT_FACTOR)); + qPrefDivePlanner::instance()->set_descrate(lrint(rate * UNIT_FACTOR)); } void PlannerSettingsWidget::sacFactorChanged(const double factor) @@ -634,25 +634,25 @@ void PlannerSettingsWidget::problemSolvingTimeChanged(const int minutes) void PlannerSettingsWidget::setBottomPo2(double po2) { - SettingsObjectWrapper::instance()->planner_settings->setBottompo2((int) (po2 * 1000.0)); + qPrefDivePlanner::instance()->set_bottompo2((int) (po2 * 1000.0)); } void PlannerSettingsWidget::setDecoPo2(double po2) { pressure_t olddecopo2; olddecopo2.mbar = prefs.decopo2; - SettingsObjectWrapper::instance()->planner_settings->setDecopo2((int) (po2 * 1000.0)); + qPrefDivePlanner::instance()->set_decopo2((int) (po2 * 1000.0)); CylindersModel::instance()->updateDecoDepths(olddecopo2); } void PlannerSettingsWidget::setBestmixEND(int depth) { - SettingsObjectWrapper::instance()->planner_settings->setBestmixend(units_to_depth(depth).mm); + qPrefDivePlanner::instance()->set_bestmixend(units_to_depth(depth)); } void PlannerSettingsWidget::setBackgasBreaks(bool dobreaks) { - SettingsObjectWrapper::instance()->planner_settings->setDoo2breaks(dobreaks); + qPrefDivePlanner::instance()->set_doo2breaks(dobreaks); plannerModel->emitDataChanged(); } -- cgit v1.2.3-70-g09d2