summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Jocke <j.bygdell@gmail.com>2018-07-28 15:07:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-11 11:19:07 -0700
commit9c9450748b088c7ffe2ab7c74e6b3d6e1688b104 (patch)
tree3306412f45518166afee90509f1f513f7d8514a5 /mobile-widgets
parentf9e81c73269d9205ed4851cd86e946a24a8f5b5b (diff)
downloadsubsurface-9c9450748b088c7ffe2ab7c74e6b3d6e1688b104.tar.gz
Mobile: display all used gases on the edit page
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DiveDetails.qml4
-rw-r--r--mobile-widgets/qml/DiveDetailsEdit.qml7
2 files changed, 8 insertions, 3 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml
index 5f88e6a48..8ef7d608d 100644
--- a/mobile-widgets/qml/DiveDetails.qml
+++ b/mobile-widgets/qml/DiveDetails.qml
@@ -40,7 +40,7 @@ Kirigami.Page {
property alias cylinderIndex2: detailsEdit.cylinderIndex2
property alias cylinderIndex3: detailsEdit.cylinderIndex3
property alias cylinderIndex4: detailsEdit.cylinderIndex4
- property alias gasmix0: detailsEdit.gasmixText0
+ property alias usedGas: detailsEdit.usedGas
property alias gpsCheckbox: detailsEdit.gpsCheckbox
property int updateCurrentIdx: manager.updateSelectedDive
property alias rating: detailsEdit.rating
@@ -264,7 +264,7 @@ Kirigami.Page {
}
startpressure0 = currentItem.modelData.dive.startPressure
endpressure0 = currentItem.modelData.dive.endPressure
- gasmix0 = currentItem.modelData.dive.firstGas
+ usedGas = currentItem.modelData.dive.firstGas
usedCyl = currentItem.modelData.dive.getCylinder
cylinderIndex0 = currentItem.modelData.dive.cylinderList.indexOf(usedCyl[0])
cylinderIndex1 = currentItem.modelData.dive.cylinderList.indexOf(usedCyl[1])
diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml
index 7de718b82..e144918ec 100644
--- a/mobile-widgets/qml/DiveDetailsEdit.qml
+++ b/mobile-widgets/qml/DiveDetailsEdit.qml
@@ -33,7 +33,7 @@ Item {
property alias weightText: txtWeight.text
property alias startpressureText0: txtStartPressure0.text
property alias endpressureText0: txtEndPressure0.text
- property alias gasmixText0: txtGasMix0.text
+ property var usedGas: []
property alias gpsCheckbox: checkboxGPS.checked
property alias suitModel: suitBox.model
property alias divemasterModel: divemasterBox.model
@@ -357,6 +357,7 @@ Item {
}
Controls.TextField {
id: txtGasMix0
+ text: usedGas[0] != null ? usedGas[0] : null
Layout.fillWidth: true
validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/i }
onEditingFinished: {
@@ -415,6 +416,7 @@ Item {
Controls.TextField {
visible: usedCyl[1] != null ? true : false
id: txtGasMix1
+ text: usedGas[1] != null ? usedGas[1] : null
Layout.fillWidth: true
validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/i }
onEditingFinished: {
@@ -478,6 +480,7 @@ Item {
Controls.TextField {
visible: usedCyl[2] != null ? true : false
id: txtGasMix2
+ text: usedGas[2] != null ? usedGas[2] : null
Layout.fillWidth: true
validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/i }
onEditingFinished: {
@@ -541,6 +544,7 @@ Item {
Controls.TextField {
visible: usedCyl[3] != null ? true : false
id: txtGasMix3
+ text: usedGas[3] != null ? usedGas[3] : null
Layout.fillWidth: true
validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/i }
onEditingFinished: {
@@ -604,6 +608,7 @@ Item {
Controls.TextField {
visible: usedCyl[4] != null ? true : false
id: txtGasMix4
+ text: usedGas[4] != null ? usedGas[4] : null
Layout.fillWidth: true
validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/i }
onEditingFinished: {