aboutsummaryrefslogtreecommitdiffstats
path: root/backend-shared/plannershared.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend-shared/plannershared.cpp')
-rw-r--r--backend-shared/plannershared.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/backend-shared/plannershared.cpp b/backend-shared/plannershared.cpp
index b39aa556c..9c2305e42 100644
--- a/backend-shared/plannershared.cpp
+++ b/backend-shared/plannershared.cpp
@@ -61,6 +61,17 @@ void plannerShared::set_min_switch_duration(int value)
DivePlannerPointsModel::instance()->setMinSwitchDuration(value);
}
+int plannerShared::surface_segment()
+{
+ return qPrefDivePlanner::surface_segment() / 60;
+}
+void plannerShared::set_surface_segment(int value)
+{
+ // NO conversion, this is done in the planner model.
+ DivePlannerPointsModel::instance()->setSurfaceSegment(value);
+ emit instance()->surface_segmentChanged(surface_segment());
+}
+
double plannerShared::bottomsac()
{
return (qPrefUnits::volume() == units::LITER) ?