From b0e46c208dd4fb13d5c3e6010c56cbc50742b4ec Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Mon, 20 Jan 2020 20:10:35 +0100 Subject: mobile: move dive planner notes access to pure interface Make notes rates available to QML through the Backend interface. Remove the corresponding variables from plannerShared. Getters are from prefs. while setters are linked to diveplan model. Remark: signals from qPrefDivePlanner is used, because the diveplanner model sets qPrefDivePlanner but do not issue special signals. Signed-off-by: jan Iversen Signed-off-by: Dirk Hohndel --- desktop-widgets/diveplanner.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'desktop-widgets/diveplanner.cpp') diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index b3c4fe631..1d1da27f2 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -461,10 +461,10 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) connect(ui.lastStop, &QAbstractButton::toggled, plannerShared::instance(), &plannerShared::set_last_stop); connect(ui.lastStop, &QAbstractButton::toggled, this, &PlannerSettingsWidget::disableBackgasBreaks); - connect(ui.verbatim_plan, &QAbstractButton::toggled, plannerShared::instance(), &plannerShared::set_verbatim_plan); - connect(ui.display_duration, &QAbstractButton::toggled, plannerShared::instance(), &plannerShared::set_display_duration); - connect(ui.display_runtime, &QAbstractButton::toggled, plannerShared::instance(), &plannerShared::set_display_runtime); - connect(ui.display_transitions, &QAbstractButton::toggled, plannerShared::instance(), &plannerShared::set_display_transitions); + connect(ui.verbatim_plan, &QAbstractButton::toggled, plannerModel, &DivePlannerPointsModel::setVerbatim); + connect(ui.display_duration, &QAbstractButton::toggled, plannerModel, &DivePlannerPointsModel::setDisplayDuration); + connect(ui.display_runtime, &QAbstractButton::toggled, plannerModel, &DivePlannerPointsModel::setDisplayRuntime); + connect(ui.display_transitions, &QAbstractButton::toggled, plannerModel, &DivePlannerPointsModel::setDisplayTransitions); connect(ui.safetystop, &QAbstractButton::toggled, plannerShared::instance(), &plannerShared::set_safetystop); connect(ui.reserve_gas, QOverload::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_reserve_gas); connect(ui.ascRate75, QOverload::of(&QSpinBox::valueChanged), plannerModel, &DivePlannerPointsModel::setAscrate75Display); -- cgit v1.2.3-70-g09d2