summaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.cpp
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2015-06-19 20:25:03 +1000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-19 09:15:09 -0700
commit4dfdea1e1dd631fbd335c5dfa5ef8e7a2cbea780 (patch)
treee628e266d14e4d538bd4a100d4de14c863969a5f /qt-models/diveplannermodel.cpp
parentab90375c19f7e0495d964d37c7cabf23dff898e9 (diff)
downloadsubsurface-4dfdea1e1dd631fbd335c5dfa5ef8e7a2cbea780.tar.gz
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 <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r--qt-models/diveplannermodel.cpp6
1 files changed, 6 insertions, 0 deletions
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);