summaryrefslogtreecommitdiffstats
path: root/backend-shared/plannershared.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-23 13:04:19 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-26 08:39:39 -0800
commit0a7e673c5f4a0268f2969a905646669850dc14e7 (patch)
tree97cca824caef491ebe96d6476979168ef824b80e /backend-shared/plannershared.cpp
parent506343126300d8465fe2732468387cf876f12816 (diff)
downloadsubsurface-0a7e673c5f4a0268f2969a905646669850dc14e7.tar.gz
plannerShared: add variables that reference qPrefDivePlanner
These are simple pass-through functions (normally optimized away by the compiler), and serve to make a consistent backend interface which have a simpler use especially in QML. 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.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/backend-shared/plannershared.cpp b/backend-shared/plannershared.cpp
index bdfc7b399..d5b5156ab 100644
--- a/backend-shared/plannershared.cpp
+++ b/backend-shared/plannershared.cpp
@@ -150,3 +150,13 @@ void plannerShared::set_switch_at_req_stop(bool value)
{
DivePlannerPointsModel::instance()->setSwitchAtReqStop(value);
}
+
+bool plannerShared::doo2breaks()
+{
+ return qPrefDivePlanner::doo2breaks();
+}
+void plannerShared::set_doo2breaks(bool value)
+{
+ qPrefDivePlanner::set_doo2breaks(value);
+ DivePlannerPointsModel::instance()->emitDataChanged();
+}