plannerShared: add variables from plannerModel with conversion

the variables are set through set functions in DivePlannerPointsModel,
but read via getters from qPrefDivePlanner and converted

Variables:
min_switch_duration

Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
jan Iversen 2019-12-23 13:15:07 +01:00 committed by Dirk Hohndel
parent 316e56f4f7
commit 5b9014aeb7
2 changed files with 14 additions and 0 deletions

View file

@ -160,3 +160,13 @@ void plannerShared::set_doo2breaks(bool value)
qPrefDivePlanner::set_doo2breaks(value);
DivePlannerPointsModel::instance()->emitDataChanged();
}
int plannerShared::min_switch_duration()
{
return qPrefDivePlanner::min_switch_duration() / 60;
}
void plannerShared::set_min_switch_duration(int value)
{
// NO conversion, this is done in the planner model.
DivePlannerPointsModel::instance()->setMinSwitchDuration(value);
}