summaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/DiveDetailsEdit.qml
diff options
context:
space:
mode:
authorGravatar Joakim Bygdell <j.bygdell@gmail.com>2016-02-09 17:20:17 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-09 12:11:09 -0800
commit8c9883cfcf66de99f6a563161918927ae0fb2f00 (patch)
tree98c5d25a377cf89a7d1a758b6eb91cb684d0eabf /qt-mobile/qml/DiveDetailsEdit.qml
parentf3b35d175a381a57447b2ff33a8cd6d0db69b924 (diff)
downloadsubsurface-8c9883cfcf66de99f6a563161918927ae0fb2f00.tar.gz
QML UI: enable edit of cylinder pressures
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.qml26
1 files changed, 25 insertions, 1 deletions
diff --git a/qt-mobile/qml/DiveDetailsEdit.qml b/qt-mobile/qml/DiveDetailsEdit.qml
index 90ca304e5..f2b046258 100644
--- a/qt-mobile/qml/DiveDetailsEdit.qml
+++ b/qt-mobile/qml/DiveDetailsEdit.qml
@@ -22,6 +22,8 @@ Item {
property alias durationText: txtDuration.text
property alias depthText: txtDepth.text
property alias weightText: txtWeight.text
+ property alias startpressureText: txtStartPressure.text
+ property alias endpressureText: txtEndPressure.text
height: editArea.height
ColumnLayout {
@@ -144,6 +146,27 @@ Item {
}
MobileComponents.Label {
+ Layout.alignment: Qt.AlignRight
+ text: "Start Pressure:"
+ }
+ TextField {
+ id: txtStartPressure
+ readOnly: (text == "cannot edit multiple cylinders" ? true : false)
+ Layout.fillWidth: true
+ }
+
+ MobileComponents.Label {
+ Layout.alignment: Qt.AlignRight
+ text: "End Pressure:"
+ }
+ TextField {
+ id: txtEndPressure
+ readOnly: (text == "cannot edit multiple cylinders" ? true : false)
+ Layout.fillWidth: true
+ }
+
+
+ MobileComponents.Label {
Layout.columnSpan: 2
Layout.alignment: Qt.AlignLeft
text: "Notes:"
@@ -168,7 +191,8 @@ Item {
// apply the changes to the dive_table
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.buddyText, detailsEdit.divemasterText, detailsEdit.weightText, detailsEdit.notesText,
+ detailsEdit.startpressureText, detailsEdit.endpressureText)
// 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