summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-01 21:41:42 +0200
committerGravatar Robert C. Helling <helling@atdotde.de>2018-08-08 14:29:50 +0200
commit21243ec4f7e2b2d886ac550142afee4c0df65924 (patch)
tree684a092f482e478f2e586a996d4c967a0fe90779 /desktop-widgets
parent357510b9cd1eec9fdd598ebd6103f62f30e29807 (diff)
downloadsubsurface-21243ec4f7e2b2d886ac550142afee4c0df65924.tar.gz
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 <jani@apache.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/diveplanner.cpp18
1 files changed, 9 insertions, 9 deletions
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();
}