summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2019-03-25 22:40:59 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-03-29 06:51:12 -0700
commit178eaa9a67f73195aac0ad195a428e899973a2df (patch)
tree91f20a2882961184513fea59866aaa34c08e823d /qt-models
parent5e494ce76106fe16f614e163c2bc6b8bf6903c86 (diff)
downloadsubsurface-178eaa9a67f73195aac0ad195a428e899973a2df.tar.gz
Add UI element for final surface segment in planner
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/diveplannermodel.cpp6
-rw-r--r--qt-models/diveplannermodel.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index bab57e0df..2dfeff7eb 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -625,6 +625,12 @@ void DivePlannerPointsModel::setMinSwitchDuration(int duration)
emitDataChanged();
}
+void DivePlannerPointsModel::setSurfaceSegment(int duration)
+{
+ qPrefDivePlanner::set_surface_segment(duration * 60);
+ emitDataChanged();
+}
+
void DivePlannerPointsModel::setStartDate(const QDate &date)
{
startTime.setDate(date);
diff --git a/qt-models/diveplannermodel.h b/qt-models/diveplannermodel.h
index 3ac5009fe..d3b2c9274 100644
--- a/qt-models/diveplannermodel.h
+++ b/qt-models/diveplannermodel.h
@@ -93,6 +93,7 @@ slots:
void setReserveGas(int reserve);
void setSwitchAtReqStop(bool value);
void setMinSwitchDuration(int duration);
+ void setSurfaceSegment(int duration);
void setSacFactor(double factor);
void setProblemSolvingTime(int minutes);
void setAscrate75(int rate);