summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DivePlannerSetup.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-02 08:21:13 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-04 10:56:55 -0800
commitc77bad6c3e29927db83634b2b8409144ac833123 (patch)
tree86de4512572c0dd62065889f3e6e6c3df374d577 /mobile-widgets/qml/DivePlannerSetup.qml
parent80be2b570b81ff5997f9412fd1206164c60e5b36 (diff)
downloadsubsurface-c77bad6c3e29927db83634b2b8409144ac833123.tar.gz
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>
Diffstat (limited to 'mobile-widgets/qml/DivePlannerSetup.qml')
-rw-r--r--mobile-widgets/qml/DivePlannerSetup.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DivePlannerSetup.qml b/mobile-widgets/qml/DivePlannerSetup.qml
index 56e40be14..d16d02778 100644
--- a/mobile-widgets/qml/DivePlannerSetup.qml
+++ b/mobile-widgets/qml/DivePlannerSetup.qml
@@ -11,6 +11,16 @@ Kirigami.ScrollablePage {
title: qsTr("Dive planner setup")
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 {
width: parent.width
spacing: 1
@@ -35,6 +45,7 @@ Kirigami.ScrollablePage {
text: qsTr("below 75% avg. depth")
}
TemplateSpinBox {
+ id: spinAscrate75
from: 1
to: 99
stepSize: 1
@@ -50,6 +61,7 @@ Kirigami.ScrollablePage {
text: qsTr("75% to 50% avg. depth")
}
TemplateSpinBox {
+ id: spinAscrate50
from: 1
to: 99
stepSize: 1
@@ -65,6 +77,7 @@ Kirigami.ScrollablePage {
text: qsTr("50% avg. depth to 6m")
}
TemplateSpinBox {
+ id: spinAscratestops
from: 1
to: 99
stepSize: 1
@@ -80,6 +93,7 @@ Kirigami.ScrollablePage {
text: qsTr("6m to surface")
}
TemplateSpinBox {
+ id: spinAscratelast6m
from: 1
to: 99
stepSize: 1
@@ -100,6 +114,7 @@ Kirigami.ScrollablePage {
text: qsTr("Surface to the bottom")
}
TemplateSpinBox {
+ id: spinDescrate
from: 1
to: 99
stepSize: 1