From a0aa27e86471ec94e00acfd874ca7cdd9c793308 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 1 Jan 2016 00:32:30 -0800 Subject: QML UI: handle editing of depth Getting closer to being able to really edit / add dives in the mobile UI. This works for manually added dives - needs a bit more thought for dives downloaded from dive computers as we don't necessarily want to change the maxdepth in conflict with the samples. Signed-off-by: Dirk Hohndel --- qt-mobile/qml/DiveDetails.qml | 2 +- qt-mobile/qml/DiveDetailsEdit.qml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'qt-mobile/qml') diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml index 4b0ee8e23..b4f30dab9 100644 --- a/qt-mobile/qml/DiveDetails.qml +++ b/qt-mobile/qml/DiveDetails.qml @@ -59,7 +59,7 @@ MobileComponents.Page { location = detailsEdit.locationText // gps = detailsEdit.gps duration = detailsEdit.durationText - // depth = detailsEdit.depthText + depth = detailsEdit.depthText airtemp = detailsEdit.airtempText watertemp = detailsEdit.watertempText suit = detailsEdit.suitText diff --git a/qt-mobile/qml/DiveDetailsEdit.qml b/qt-mobile/qml/DiveDetailsEdit.qml index e77b3234a..051e38676 100644 --- a/qt-mobile/qml/DiveDetailsEdit.qml +++ b/qt-mobile/qml/DiveDetailsEdit.qml @@ -16,6 +16,7 @@ Item { property alias divemasterText: txtDiveMaster.text property alias notesText: txtNotes.text property alias durationText: txtDuration.text + property alias depthText: txtDepth.text ColumnLayout { anchors { left: parent.left @@ -49,6 +50,15 @@ Item { // (think of someone adding a dive while on the boat or // at the dive site) + MobileComponents.Label { + Layout.alignment: Qt.AlignRight + text: "Depth:" + } + TextField { + id: txtDepth + text: depth + Layout.fillWidth: true + } MobileComponents.Label { Layout.alignment: Qt.AlignRight text: "Duration:" -- cgit v1.2.3-70-g09d2