From 6f3d1d3747d2cd07bac48a9107efa93c1a7b3427 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Mon, 23 Dec 2019 12:24:43 +0100 Subject: plannerShared: add variables from plannerModel the variables are set through set functions in DivePlannerPointsModel, but read via getters from qPrefDivePlanner. Variables: drop_stone_mode last_stop switch_at_req_stop Signed-off-by: Jan Iversen Signed-off-by: Dirk Hohndel --- backend-shared/plannershared.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'backend-shared/plannershared.cpp') diff --git a/backend-shared/plannershared.cpp b/backend-shared/plannershared.cpp index 9bb8ad315..bdfc7b399 100644 --- a/backend-shared/plannershared.cpp +++ b/backend-shared/plannershared.cpp @@ -123,3 +123,30 @@ void plannerShared::set_dobailout(bool value) qPrefDivePlanner::set_dobailout(value); DivePlannerPointsModel::instance()->emitDataChanged(); } + +bool plannerShared::drop_stone_mode() +{ + return qPrefDivePlanner::drop_stone_mode(); +} +void plannerShared::set_drop_stone_mode(bool value) +{ + DivePlannerPointsModel::instance()->setDropStoneMode(value); +} + +bool plannerShared::last_stop() +{ + return qPrefDivePlanner::last_stop(); +} +void plannerShared::set_last_stop(bool value) +{ + DivePlannerPointsModel::instance()->setLastStop6m(value); +} + +bool plannerShared::switch_at_req_stop() +{ + return qPrefDivePlanner::switch_at_req_stop(); +} +void plannerShared::set_switch_at_req_stop(bool value) +{ + DivePlannerPointsModel::instance()->setSwitchAtReqStop(value); +} -- cgit v1.2.3-70-g09d2