diff options
author | Joakim Bygdell <j.bygdell@gmail.com> | 2016-02-13 18:34:31 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-02-13 10:04:05 -0800 |
commit | ae116c5bc80f152f4eb5061252f52e70903398c6 (patch) | |
tree | 0d52f673e387b6e47f7c93757e990a1750e19c25 /qt-mobile/qml/DiveDetailsEdit.qml | |
parent | 8cc4463a1af4bbce2dd5ea61d6ab8a5b107fb3b7 (diff) | |
download | subsurface-ae116c5bc80f152f4eb5061252f52e70903398c6.tar.gz |
QML UI: enable edit of gasmix
First cylinder only, show warning if there are more than one cylinder defined.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml/DiveDetailsEdit.qml')
-rw-r--r-- | qt-mobile/qml/DiveDetailsEdit.qml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/qt-mobile/qml/DiveDetailsEdit.qml b/qt-mobile/qml/DiveDetailsEdit.qml index f2b046258..ae943ca03 100644 --- a/qt-mobile/qml/DiveDetailsEdit.qml +++ b/qt-mobile/qml/DiveDetailsEdit.qml @@ -24,6 +24,7 @@ Item { property alias weightText: txtWeight.text property alias startpressureText: txtStartPressure.text property alias endpressureText: txtEndPressure.text + property alias gasmixText: txtGasMix.text height: editArea.height ColumnLayout { @@ -147,6 +148,16 @@ Item { MobileComponents.Label { Layout.alignment: Qt.AlignRight + text: "Gas mix:" + } + TextField { + id: txtGasMix + readOnly: (text == "cannot edit multiple gases" ? true : false) + Layout.fillWidth: true + } + + MobileComponents.Label { + Layout.alignment: Qt.AlignRight text: "Start Pressure:" } TextField { @@ -192,7 +203,7 @@ Item { manager.commitChanges(dive_id, detailsEdit.dateText, detailsEdit.locationText, detailsEdit.gpsText, detailsEdit.durationText, detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText, detailsEdit.suitText, detailsEdit.buddyText, detailsEdit.divemasterText, detailsEdit.weightText, detailsEdit.notesText, - detailsEdit.startpressureText, detailsEdit.endpressureText) + detailsEdit.startpressureText, detailsEdit.endpressureText, detailsEdit.gasmixText) // apply the changes to the dive detail view - since the edit could have changed the order // first make sure that we are looking at the correct dive - our model allows us to look // up the index based on the unique dive_id |