mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-07 20:33:23 +00:00
mobile-widgets/qml: secure text on ascent/descend get updated
When changing METERS <-> FEET, the text change automatically between "m/min" and "ft/min". Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
80be2b570b
commit
c77bad6c3e
1 changed files with 15 additions and 0 deletions
|
@ -11,6 +11,16 @@ Kirigami.ScrollablePage {
|
||||||
title: qsTr("Dive planner setup")
|
title: qsTr("Dive planner setup")
|
||||||
|
|
||||||
property string speedUnit: (PrefUnits.length === "meters") ? qsTr("m/min") : qsTr("ft/min")
|
property string speedUnit: (PrefUnits.length === "meters") ? qsTr("m/min") : qsTr("ft/min")
|
||||||
|
Connections {
|
||||||
|
target: PrefUnits
|
||||||
|
onLengthChanged: {
|
||||||
|
spinAscrate75.value = Planner.ascrate75
|
||||||
|
spinAscrate50.value = Planner.ascrate50
|
||||||
|
spinAscratestops.value = Planner.ascratestops
|
||||||
|
spinAscratelast6m.value = Planner.ascratelast6m
|
||||||
|
spinDescrate.value = Planner.descrate
|
||||||
|
}
|
||||||
|
}
|
||||||
Column {
|
Column {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: 1
|
spacing: 1
|
||||||
|
@ -35,6 +45,7 @@ Kirigami.ScrollablePage {
|
||||||
text: qsTr("below 75% avg. depth")
|
text: qsTr("below 75% avg. depth")
|
||||||
}
|
}
|
||||||
TemplateSpinBox {
|
TemplateSpinBox {
|
||||||
|
id: spinAscrate75
|
||||||
from: 1
|
from: 1
|
||||||
to: 99
|
to: 99
|
||||||
stepSize: 1
|
stepSize: 1
|
||||||
|
@ -50,6 +61,7 @@ Kirigami.ScrollablePage {
|
||||||
text: qsTr("75% to 50% avg. depth")
|
text: qsTr("75% to 50% avg. depth")
|
||||||
}
|
}
|
||||||
TemplateSpinBox {
|
TemplateSpinBox {
|
||||||
|
id: spinAscrate50
|
||||||
from: 1
|
from: 1
|
||||||
to: 99
|
to: 99
|
||||||
stepSize: 1
|
stepSize: 1
|
||||||
|
@ -65,6 +77,7 @@ Kirigami.ScrollablePage {
|
||||||
text: qsTr("50% avg. depth to 6m")
|
text: qsTr("50% avg. depth to 6m")
|
||||||
}
|
}
|
||||||
TemplateSpinBox {
|
TemplateSpinBox {
|
||||||
|
id: spinAscratestops
|
||||||
from: 1
|
from: 1
|
||||||
to: 99
|
to: 99
|
||||||
stepSize: 1
|
stepSize: 1
|
||||||
|
@ -80,6 +93,7 @@ Kirigami.ScrollablePage {
|
||||||
text: qsTr("6m to surface")
|
text: qsTr("6m to surface")
|
||||||
}
|
}
|
||||||
TemplateSpinBox {
|
TemplateSpinBox {
|
||||||
|
id: spinAscratelast6m
|
||||||
from: 1
|
from: 1
|
||||||
to: 99
|
to: 99
|
||||||
stepSize: 1
|
stepSize: 1
|
||||||
|
@ -100,6 +114,7 @@ Kirigami.ScrollablePage {
|
||||||
text: qsTr("Surface to the bottom")
|
text: qsTr("Surface to the bottom")
|
||||||
}
|
}
|
||||||
TemplateSpinBox {
|
TemplateSpinBox {
|
||||||
|
id: spinDescrate
|
||||||
from: 1
|
from: 1
|
||||||
to: 99
|
to: 99
|
||||||
stepSize: 1
|
stepSize: 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue