diff options
author | Joakim Bygdell <j.bygdell@gmail.com> | 2016-05-20 18:48:36 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-05-21 07:01:53 -0700 |
commit | a6c8d0028e946b4713f5fe8c083cf728f086b3b8 (patch) | |
tree | 9045097692331e204ab861dda4180dc149de9132 /mobile-widgets | |
parent | 80274b09689dff727ffe60f9b31faab4622dbc0b (diff) | |
download | subsurface-a6c8d0028e946b4713f5fe8c083cf728f086b3b8.tar.gz |
Make autocomplete work on add dive
This sets the list models for autocompleting suit, buddy and
divemaster.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 3 | ||||
-rw-r--r-- | mobile-widgets/qml/DiveDetailsEdit.qml | 3 | ||||
-rw-r--r-- | mobile-widgets/qml/main.qml | 9 |
3 files changed, 12 insertions, 3 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index fb55706de..3dfb879fb 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -16,13 +16,16 @@ Kirigami.Page { property alias airtemp: detailsEdit.airtempText property alias watertemp: detailsEdit.watertempText property alias buddyIndex: detailsEdit.buddyIndex + property alias buddyModel: detailsEdit.buddyModel property alias divemasterIndex: detailsEdit.divemasterIndex + property alias divemasterModel: detailsEdit.divemasterModel property alias depth: detailsEdit.depthText property alias duration: detailsEdit.durationText property alias location: detailsEdit.locationText property alias gps: detailsEdit.gpsText property alias notes: detailsEdit.notesText property alias suitIndex: detailsEdit.suitIndex + property alias suitModel: detailsEdit.suitModel property alias weight: detailsEdit.weightText property alias startpressure: detailsEdit.startpressureText property alias endpressure: detailsEdit.endpressureText diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml index 5b582d11e..ad62997df 100644 --- a/mobile-widgets/qml/DiveDetailsEdit.qml +++ b/mobile-widgets/qml/DiveDetailsEdit.qml @@ -26,6 +26,9 @@ Item { property alias endpressureText: txtEndPressure.text property alias gasmixText: txtGasMix.text property alias gpsCheckbox: checkboxGPS.checked + property alias suitModel: suitBox.model + property alias divemasterModel: divemasterBox.model + property alias buddyModel: buddyBox.model function saveData() { // apply the changes to the dive_table diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index e02522404..b4c6f3610 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -71,14 +71,17 @@ Kirigami.ApplicationWindow { detailsWindow.date = manager.getDate(detailsWindow.dive_id) detailsWindow.airtemp = "" detailsWindow.watertemp = "" - detailsWindow.buddy = "" + detailsWindow.buddyModel = manager.buddyInit + detailsWindow.buddyIndex = -1 detailsWindow.depth = "" - detailsWindow.divemaster = "" + detailsWindow.divemasterModel = manager.divemasterInit + detailsWindow.divemasterIndex = -1 detailsWindow.notes = "" detailsWindow.location = "" detailsWindow.gps = "" detailsWindow.duration = "" - detailsWindow.suit = "" + detailsWindow.suitModel = manager.suitInit + detailsWindow.suitIndex = -1 detailsWindow.weight = "" detailsWindow.gasmix = "" detailsWindow.startpressure = "" |