summaryrefslogtreecommitdiffstats
path: root/backend-shared/plannershared.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-23 15:40:21 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-26 08:41:07 -0800
commitd8780fdd89ca6e315e7524ab5ec7eb6bf8fc1e68 (patch)
tree24c4f8577b33ba45d548eec6ed6bcef6ac479e4b /backend-shared/plannershared.cpp
parent53958a50c66c2f48b4791e61eb3288660ed81db7 (diff)
downloadsubsurface-d8780fdd89ca6e315e7524ab5ec7eb6bf8fc1e68.tar.gz
plannerShared: add variables from plannerModel
the variables are set through set functions in DivePlannerPointsModel, but read via getters from qPrefDivePlanner. Variables: bottomsac decosac problemsolvingtime sacfactor Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'backend-shared/plannershared.cpp')
-rw-r--r--backend-shared/plannershared.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/backend-shared/plannershared.cpp b/backend-shared/plannershared.cpp
index 24ba7aae9..2093e4c4f 100644
--- a/backend-shared/plannershared.cpp
+++ b/backend-shared/plannershared.cpp
@@ -170,3 +170,43 @@ void plannerShared::set_min_switch_duration(int value)
// NO conversion, this is done in the planner model.
DivePlannerPointsModel::instance()->setMinSwitchDuration(value);
}
+
+double plannerShared::bottomsac()
+{
+ return qPrefDivePlanner::bottomsac() / 1000.0;
+}
+void plannerShared::set_bottomsac(double value)
+{
+ // NO conversion, this is done in the planner model.
+ DivePlannerPointsModel::instance()->setBottomSac(value);
+}
+
+double plannerShared::decosac()
+{
+ return qPrefDivePlanner::decosac() / 1000.0;
+}
+void plannerShared::set_decosac(double value)
+{
+ // NO conversion, this is done in the planner model.
+ DivePlannerPointsModel::instance()->setDecoSac(value);
+}
+
+int plannerShared::problemsolvingtime()
+{
+ return qPrefDivePlanner::problemsolvingtime();
+}
+void plannerShared::set_problemsolvingtime(int value)
+{
+ // NO conversion, this is done in the planner model.
+ DivePlannerPointsModel::instance()->setProblemSolvingTime(value);
+}
+
+double plannerShared::sacfactor()
+{
+ return qPrefDivePlanner::sacfactor() / 100.0;
+}
+void plannerShared::set_sacfactor(double value)
+{
+ // NO conversion, this is done in the planner model.
+ DivePlannerPointsModel::instance()->setSacFactor(value);
+}