mobile: move dive planner notes access to pure interface

Make notes rates available to QML through the Backend interface.
Remove the corresponding variables from plannerShared.

Getters are from prefs. while setters are linked to diveplan model.

Remark: signals from qPrefDivePlanner is used, because the diveplanner model
sets qPrefDivePlanner but do not issue special signals.

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
jan Iversen 2020-01-20 20:10:35 +01:00 committed by Dirk Hohndel
parent e22943fa21
commit b0e46c208d
6 changed files with 49 additions and 88 deletions

View file

@ -214,51 +214,6 @@ void plannerShared::set_bestmixend(int value)
CylindersModel::instance()->updateBestMixes();
}
bool plannerShared::display_runtime()
{
return qPrefDivePlanner::display_runtime();
}
void plannerShared::set_display_runtime(bool value)
{
DivePlannerPointsModel::instance()->setDisplayRuntime(value);
}
bool plannerShared::display_duration()
{
return qPrefDivePlanner::display_duration();
}
void plannerShared::set_display_duration(bool value)
{
DivePlannerPointsModel::instance()->setDisplayDuration(value);
}
bool plannerShared::display_transitions()
{
return qPrefDivePlanner::display_transitions();
}
void plannerShared::set_display_transitions(bool value)
{
DivePlannerPointsModel::instance()->setDisplayTransitions(value);
}
bool plannerShared::verbatim_plan()
{
return qPrefDivePlanner::verbatim_plan();
}
void plannerShared::set_verbatim_plan(bool value)
{
DivePlannerPointsModel::instance()->setVerbatim(value);
}
bool plannerShared::display_variations()
{
return qPrefDivePlanner::display_variations();
}
void plannerShared::set_display_variations(bool value)
{
DivePlannerPointsModel::instance()->setDisplayVariations(value);
}
// Handle when user changes length measurement type
void plannerShared::unit_lengthChangedSlot(int value)
{