diff options
Diffstat (limited to 'mobile-widgets/qml/DivePlannerSetup.qml')
-rw-r--r-- | mobile-widgets/qml/DivePlannerSetup.qml | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/mobile-widgets/qml/DivePlannerSetup.qml b/mobile-widgets/qml/DivePlannerSetup.qml index abf5de363..58bbb1ac9 100644 --- a/mobile-widgets/qml/DivePlannerSetup.qml +++ b/mobile-widgets/qml/DivePlannerSetup.qml @@ -10,7 +10,8 @@ import org.kde.kirigami 2.4 as Kirigami Kirigami.ScrollablePage { title: qsTr("Dive planner setup") - property string speedUnit: (Backend.length === Enums.METERS) ? qsTr("m/min") : qsTr("ft/min") + property string speedUnit: (Backend.length === Enums.METERS) ? qsTr(" m/min") : qsTr(" ft/min") + property string volumeUnit: (Backend.volume === Enums.LITER) ? qsTr(" l/min") : qsTr(" cuft/min") Connections { target: Backend onLengthChanged: { @@ -20,6 +21,10 @@ Kirigami.ScrollablePage { spinAscratelast6m.value = Backend.ascratelast6m spinDescrate.value = Backend.descrate } + onVolumeChanged: { + spinBottomsac.value = Planner.bottomsac + spinDecosac.value = Planner.decosac + } } Column { width: parent.width @@ -220,12 +225,13 @@ Kirigami.ScrollablePage { text: qsTr("Bottom SAC") } TemplateSpinBox { + id: spinBottomsac from: 1 to: 99 stepSize: 1 value: Planner.bottomsac textFromValue: function (value, locale) { - return value + qsTr("l/min") + return value + volumeUnit } onValueModified: { Planner.bottomsac = value @@ -235,12 +241,13 @@ Kirigami.ScrollablePage { text: qsTr("Deco SAC") } TemplateSpinBox { + id: spinDecosac from: 1 to: 99 stepSize: 1 value: Planner.decosac textFromValue: function (value, locale) { - return value + qsTr("l/min") + return value + volumeUnit } onValueModified: { Planner.decosac = value @@ -315,7 +322,7 @@ Kirigami.ScrollablePage { stepSize: 1 value: Planner.bestmixend textFromValue: function (value, locale) { - return value + qsTr("m") + return value + speedUnit } onValueModified: { Planner.bestmixend = value |