From 4dfdea1e1dd631fbd335c5dfa5ef8e7a2cbea780 Mon Sep 17 00:00:00 2001 From: Rick Walsh Date: Fri, 19 Jun 2015 20:25:03 +1000 Subject: Add planner minimum gas switch duration option Add the option for a minimum gas switch duration to the planner UI. This is not actually used yet. Signed-off-by: Rick Walsh Signed-off-by: Dirk Hohndel --- qt-models/diveplannermodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qt-models/diveplannermodel.cpp') diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index bace54e20..655f1bd8b 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -490,6 +490,12 @@ void DivePlannerPointsModel::setDropStoneMode(bool value) emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); } +void DivePlannerPointsModel::setMinSwitchDuration(int duration) +{ + prefs.min_switch_duration = duration * 60; + emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); +} + void DivePlannerPointsModel::setStartDate(const QDate &date) { startTime.setDate(date); -- cgit v1.2.3-70-g09d2