diff options
Diffstat (limited to 'backend-shared/plannershared.cpp')
-rw-r--r-- | backend-shared/plannershared.cpp | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/backend-shared/plannershared.cpp b/backend-shared/plannershared.cpp index ff95b9e0e..2420fdedc 100644 --- a/backend-shared/plannershared.cpp +++ b/backend-shared/plannershared.cpp @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 #include "plannershared.h" -#include "core/pref.h" #include "core/settings/qPrefDivePlanner.h" - +#include "core/settings/qPrefTechnicalDetails.h" +#include "qt-models/diveplannermodel.h" plannerShared *plannerShared::instance() { @@ -59,3 +59,57 @@ void plannerShared::set_descrate(int value) qPrefDivePlanner::set_descrate(value * TO_MM_BY_SEC); } +// Planning values +deco_mode plannerShared::planner_deco_mode() +{ + return qPrefDivePlanner::planner_deco_mode(); +} +void plannerShared::set_planner_deco_mode(deco_mode value) +{ + DivePlannerPointsModel::instance()->setDecoMode(value); +} + +int plannerShared::reserve_gas() +{ + return qPrefDivePlanner::reserve_gas(); +} +void plannerShared::set_reserve_gas(int value) +{ + DivePlannerPointsModel::instance()->setReserveGas(value); +} + +bool plannerShared::safetystop() +{ + return qPrefDivePlanner::safetystop(); +} +void plannerShared::set_safetystop(bool value) +{ + DivePlannerPointsModel::instance()->setSafetyStop(value); +} + +int plannerShared::gflow() +{ + return qPrefTechnicalDetails::gflow(); +} +void plannerShared::set_gflow(int value) +{ + DivePlannerPointsModel::instance()->setGFLow(value); +} + +int plannerShared::gfhigh() +{ + return qPrefTechnicalDetails::gflow(); +} +void plannerShared::set_gfhigh(int value) +{ + DivePlannerPointsModel::instance()->setGFHigh(value); +} + +int plannerShared::vpmb_conservatism() +{ + return qPrefTechnicalDetails::vpmb_conservatism(); +} +void plannerShared::set_vpmb_conservatism(int value) +{ + DivePlannerPointsModel::instance()->setVpmbConservatism(value); +} |