From ae116c5bc80f152f4eb5061252f52e70903398c6 Mon Sep 17 00:00:00 2001 From: Joakim Bygdell Date: Sat, 13 Feb 2016 18:34:31 +0100 Subject: QML UI: enable edit of gasmix First cylinder only, show warning if there are more than one cylinder defined. Signed-off-by: Joakim Bygdell Signed-off-by: Dirk Hohndel --- qt-mobile/qml/DiveDetails.qml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-mobile/qml/DiveDetails.qml') diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml index 5a39576e8..c906ba268 100644 --- a/qt-mobile/qml/DiveDetails.qml +++ b/qt-mobile/qml/DiveDetails.qml @@ -24,6 +24,7 @@ MobileComponents.Page { property alias weight: detailsEdit.weightText property alias startpressure: detailsEdit.startpressureText property alias endpressure: detailsEdit.endpressureText + property alias gasmix: detailsEdit.gasmixText state: "view" @@ -128,10 +129,12 @@ MobileComponents.Page { if (diveDetailsListView.currentItem.modelData.dive.getCylinder != "Multiple" ) { startpressure = diveDetailsListView.currentItem.modelData.dive.startPressure endpressure = diveDetailsListView.currentItem.modelData.dive.endPressure + gasmix = diveDetailsListView.currentItem.modelData.dive.firstGas } else { // careful when translating, this text is "magic" in DiveDetailsEdit.qml startpressure = "cannot edit multiple cylinders" endpressure = "cannot edit multiple cylinders" + gasmix = "cannot edit multiple gases" } diveDetailsPage.state = "edit" -- cgit v1.2.3-70-g09d2