From 5b9014aeb7d02d9db9677f81d20109ec67afa0c0 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Mon, 23 Dec 2019 13:15:07 +0100 Subject: plannerShared: add variables from plannerModel with conversion the variables are set through set functions in DivePlannerPointsModel, but read via getters from qPrefDivePlanner and converted Variables: min_switch_duration Signed-off-by: Jan Iversen Signed-off-by: Dirk Hohndel --- backend-shared/plannershared.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'backend-shared/plannershared.cpp') diff --git a/backend-shared/plannershared.cpp b/backend-shared/plannershared.cpp index d5b5156ab..24ba7aae9 100644 --- a/backend-shared/plannershared.cpp +++ b/backend-shared/plannershared.cpp @@ -160,3 +160,13 @@ void plannerShared::set_doo2breaks(bool value) qPrefDivePlanner::set_doo2breaks(value); DivePlannerPointsModel::instance()->emitDataChanged(); } + +int plannerShared::min_switch_duration() +{ + return qPrefDivePlanner::min_switch_duration() / 60; +} +void plannerShared::set_min_switch_duration(int value) +{ + // NO conversion, this is done in the planner model. + DivePlannerPointsModel::instance()->setMinSwitchDuration(value); +} -- cgit v1.2.3-70-g09d2