summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
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 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);
diff --git a/qt-models/diveplannermodel.h b/qt-models/diveplannermodel.h
index 4d1ef3227..883103f22 100644
--- a/qt-models/diveplannermodel.h
+++ b/qt-models/diveplannermodel.h
@@ -90,6 +90,7 @@ slots:
void emitDataChanged();
void setRebreatherMode(int mode);
void setReserveGas(int reserve);
+ void setMinSwitchDuration(int duration);
signals:
void planCreated();