From 53958a50c66c2f48b4791e61eb3288660ed81db7 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Mon, 23 Dec 2019 13:17:18 +0100 Subject: desktop-widgets: replace var plannerModel -> plannerShared converted variables min_switch_duration are not set in diveplanner.cpp, but instead signals a slot in plannerModel. and are read from plannerShared which includes a conversion change signals to slots in plannerShared change read from prefs. to plannerShared Signed-off-by: Jan Iversen Signed-off-by: Dirk Hohndel --- desktop-widgets/diveplanner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index d31fc7ffb..dc6ae9a6e 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -455,7 +455,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) ui.o2narcotic->setChecked(prefs.o2narcotic); ui.drop_stone_mode->setChecked(prefs.drop_stone_mode); ui.switch_at_req_stop->setChecked(prefs.switch_at_req_stop); - ui.min_switch_duration->setValue(prefs.min_switch_duration / 60); + ui.min_switch_duration->setValue(plannerShared::min_switch_duration()); ui.surface_segment->setValue(prefs.surface_segment / 60); ui.recreational_deco->setChecked(prefs.planner_deco_mode == RECREATIONAL); ui.buehlmann_deco->setChecked(prefs.planner_deco_mode == BUEHLMANN); @@ -500,7 +500,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) connect(ui.bailout, SIGNAL(toggled(bool)), plannerShared::instance(), SLOT(set_bailout(bool))); connect(ui.o2narcotic, SIGNAL(toggled(bool)), this, SLOT(setO2narcotic(bool))); connect(ui.switch_at_req_stop, SIGNAL(toggled(bool)), plannerShared::instance(), SLOT(set_switch_at_req_stop(bool))); - connect(ui.min_switch_duration, SIGNAL(valueChanged(int)), plannerModel, SLOT(setMinSwitchDuration(int))); + connect(ui.min_switch_duration, SIGNAL(valueChanged(int)), plannerShared::instance(), SLOT(set_min_switch_duration()(int))); connect(ui.surface_segment, SIGNAL(valueChanged(int)), plannerModel, SLOT(setSurfaceSegment(int))); connect(ui.rebreathermode, SIGNAL(currentIndexChanged(int)), plannerModel, SLOT(setRebreatherMode(int))); connect(ui.rebreathermode, SIGNAL(currentIndexChanged(int)), this, SLOT(setBailoutVisibility(int))); -- cgit v1.2.3-70-g09d2