diff options
author | Jocke <j.bygdell@gmail.com> | 2018-08-06 09:34:39 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-11 11:19:07 -0700 |
commit | ae70a751c7b5292ed4a798601d17013479508d86 (patch) | |
tree | 791d634f75baad076865c336d346b62bbb70a46b /mobile-widgets/qml/DiveDetailsEdit.qml | |
parent | c33a952582b986c8d99b4a0e41701560e45dad7d (diff) | |
download | subsurface-ae70a751c7b5292ed4a798601d17013479508d86.tar.gz |
Mobile: save pressures
Save start and end pressures for used cylinders.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'mobile-widgets/qml/DiveDetailsEdit.qml')
-rw-r--r-- | mobile-widgets/qml/DiveDetailsEdit.qml | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml index b7b7f8063..2f2f681e1 100644 --- a/mobile-widgets/qml/DiveDetailsEdit.qml +++ b/mobile-widgets/qml/DiveDetailsEdit.qml @@ -31,9 +31,9 @@ Item { property alias durationText: txtDuration.text property alias depthText: txtDepth.text property alias weightText: txtWeight.text - property alias startpressureText0: txtStartPressure0.text - property alias endpressureText0: txtEndPressure0.text property var usedGas: [] + property var endpressure: [] + property var startpressure: [] property alias gpsCheckbox: checkboxGPS.checked property alias suitModel: suitBox.model property alias divemasterModel: divemasterBox.model @@ -74,22 +74,32 @@ Item { if (usedCyl[0] != null) { usedCyl[0] = cylinderBox0.currentText usedGas[0] = txtGasMix0.text + startpressure[0] = txtStartPressure0.text + endpressure[0] = txtEndPressure0.text } if (usedCyl[1] != null) { usedCyl[1] = cylinderBox1.currentText usedGas[1] = txtGasMix0.text + startpressure[1] = txtStartPressure1.text + endpressure[1] = txtEndPressure1.text } if (usedCyl[2] != null) { usedCyl[2] = cylinderBox2.currentText usedGas[2] = txtGasMix0.text + startpressure[2] = txtStartPressure2.text + endpressure[2] = txtEndPressure2.text } if (usedCyl[3] != null) { usedCyl[3] = cylinderBox3.currentText usedGas[3] = txtGasMix0.text + startpressure[3] = txtStartPressure3.text + endpressure[3] = txtEndPressure3.text } if (usedCyl[4] != null) { usedCyl[4] = cylinderBox4.currentText usedGas[4] = txtGasMix0.text + startpressure[4] = txtStartPressure4.text + endpressure[4] = txtEndPressure4.text } // apply the changes to the dive_table @@ -97,8 +107,8 @@ Item { detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText, suitBox.currentText != "" ? suitBox.currentText : suitBox.editText, buddyBox.editText, divemasterBox.currentText != "" ? divemasterBox.currentText : divemasterBox.editText, - detailsEdit.weightText, detailsEdit.notesText, detailsEdit.startpressureText, - detailsEdit.endpressureText, usedGas, usedCyl , + detailsEdit.weightText, detailsEdit.notesText, startpressure, + endpressure, usedGas, usedCyl , detailsEdit.rating, detailsEdit.visibility) // trigger the profile to be redrawn @@ -377,6 +387,7 @@ Item { } Controls.TextField { id: txtStartPressure0 + text: startpressure[0] != null ? startpressure[0] : null Layout.fillWidth: true onEditingFinished: { focus = false @@ -390,6 +401,7 @@ Item { } Controls.TextField { id: txtEndPressure0 + text: endpressure[0] != null ? endpressure[0] : null Layout.fillWidth: true onEditingFinished: { focus = false @@ -438,6 +450,7 @@ Item { Controls.TextField { visible: usedCyl[1] != null ? true : false id: txtStartPressure1 + text: startpressure[1] != null ? startpressure[1] : null Layout.fillWidth: true onEditingFinished: { focus = false @@ -453,6 +466,7 @@ Item { Controls.TextField { visible: usedCyl[1] != null ? true : false id: txtEndPressure1 + text: endpressure[1] != null ? endpressure[1] : null Layout.fillWidth: true onEditingFinished: { focus = false @@ -502,6 +516,7 @@ Item { Controls.TextField { visible: usedCyl[2] != null ? true : false id: txtStartPressure2 + text: startpressure[2] != null ? startpressure[2] : null Layout.fillWidth: true onEditingFinished: { focus = false @@ -517,6 +532,7 @@ Item { Controls.TextField { visible: usedCyl[2] != null ? true : false id: txtEndPressure2 + text: endpressure[2] != null ? endpressure[2] : null Layout.fillWidth: true onEditingFinished: { focus = false @@ -566,6 +582,7 @@ Item { Controls.TextField { visible: usedCyl[3] != null ? true : false id: txtStartPressure3 + text: startpressure[3] != null ? startpressure[3] : null Layout.fillWidth: true onEditingFinished: { focus = false @@ -581,6 +598,7 @@ Item { Controls.TextField { visible: usedCyl[3] != null ? true : false id: txtEndPressure3 + text: endpressure[3] != null ? endpressure[3] : null Layout.fillWidth: true onEditingFinished: { focus = false @@ -630,6 +648,7 @@ Item { Controls.TextField { visible: usedCyl[4] != null ? true : false id: txtStartPressure4 + text: startpressure[4] != null ? startpressure[4] : null Layout.fillWidth: true onEditingFinished: { focus = false @@ -645,6 +664,7 @@ Item { Controls.TextField { visible: usedCyl[4] != null ? true : false id: txtEndPressure4 + text: endpressure[4] != null ? endpressure[4] : null Layout.fillWidth: true onEditingFinished: { focus = false |