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

@ -331,37 +331,37 @@ Kirigami.ScrollablePage {
TemplateCheckBox {
text: qsTr("Display runtime")
checked: Planner.display_runtime
checked: Backend.display_runtime
onClicked: {
Planner.display_runtime = checked
Backend.display_runtime = checked
}
}
TemplateCheckBox {
text: qsTr("Display segment duration")
checked: Planner.display_duration
checked: Backend.display_duration
onClicked: {
Planner.display_duration = checked
Backend.display_duration = checked
}
}
TemplateCheckBox {
text: qsTr("Display transitions in deco")
checked: Planner.display_transitions
checked: Backend.display_transitions
onClicked: {
Planner.display_transitions = checked
Backend.display_transitions = checked
}
}
TemplateCheckBox {
text: qsTr("Verbatim dive plan")
checked: Planner.verbatim_plan
checked: Backend.verbatim_plan
onClicked: {
Planner.verbatim_plan = checked
Backend.verbatim_plan = checked
}
}
TemplateCheckBox {
text: qsTr("Display plan variations")
checked: Planner.display_variations
checked: Backend.display_variations
onClicked: {
Planner.display_variations = checked
Backend.display_variations = checked
}
}
}