diff options
author | Joakim Bygdell <j.bygdell@gmail.com> | 2016-08-30 16:24:19 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-09-04 07:36:13 -0700 |
commit | 674d8331f5c15a8c3095afd1deca2b087fd82464 (patch) | |
tree | defca414c3ca03c51b8dd65840b1d5ba6dedf963 /mobile-widgets/qml/DiveDetails.qml | |
parent | 7b3665827a3fdf6717be5419b41641d8e2d95c93 (diff) | |
download | subsurface-674d8331f5c15a8c3095afd1deca2b087fd82464.tar.gz |
QML UI: Enable cylinder edit
This adds the option to select a cylinder when adding or editing a dive.
Due to limited screen size we restrict the editing to the first cylinder only.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DiveDetails.qml')
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index a66968ad1..b85b59391 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -29,6 +29,8 @@ Kirigami.Page { property alias weight: detailsEdit.weightText property alias startpressure: detailsEdit.startpressureText property alias endpressure: detailsEdit.endpressureText + property alias cylinderIndex: detailsEdit.cylinderIndex + property alias cylinderModel: detailsEdit.cylinderModel property alias gasmix: detailsEdit.gasmixText property alias gpsCheckbox: detailsEdit.gpsCheckbox property int updateCurrentIdx: manager.updateSelectedDive @@ -168,6 +170,7 @@ Kirigami.Page { startpressure = diveDetailsListView.currentItem.modelData.dive.startPressure endpressure = diveDetailsListView.currentItem.modelData.dive.endPressure gasmix = diveDetailsListView.currentItem.modelData.dive.firstGas + cylinderIndex = diveDetailsListView.currentItem.modelData.dive.cylinderList.indexOf(diveDetailsListView.currentItem.modelData.dive.getCylinder) } else { // careful when translating, this text is "magic" in DiveDetailsEdit.qml startpressure = "cannot edit multiple cylinders" |