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>
This commit is contained in:
Rick Walsh 2015-06-19 20:25:03 +10:00 committed by Dirk Hohndel
parent ab90375c19
commit 4dfdea1e1d
6 changed files with 41 additions and 2 deletions

View file

@ -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);