diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-03-08 21:59:34 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-03-11 11:40:12 -0700 |
commit | 8b43633c7d22a31f882919f535a8fc332f61af62 (patch) | |
tree | 122c1e10861f040cb0882f29ea29be123be0e750 /map-widget | |
parent | d3607e0b77d4128507ea3aed8e9d7a7c0a1cd367 (diff) | |
download | subsurface-8b43633c7d22a31f882919f535a8fc332f61af62.tar.gz |
mapwidget.qml: emit a signal when the marker changed
The signal to emit is selectedDivesChanged() and it accepts
a list if diveIds. The 'nSelectedDives' counter is redundant.
Also expose the 'map' and 'mapHelper' objects as aliases.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'map-widget')
-rw-r--r-- | map-widget/qml/MapWidget.qml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/map-widget/qml/MapWidget.qml b/map-widget/qml/MapWidget.qml index a8b35083c..9d7fad37c 100644 --- a/map-widget/qml/MapWidget.qml +++ b/map-widget/qml/MapWidget.qml @@ -6,13 +6,16 @@ import org.subsurfacedivelog.mobile 1.0 Item { id: rootItem - property int nSelectedDives: 0 + property alias mapHelper: mapHelper + property alias map: map + + signal selectedDivesChanged(var list) MapWidgetHelper { id: mapHelper map: map editMode: false - onSelectedDivesChanged: nSelectedDives = list.length + onSelectedDivesChanged: rootItem.selectedDivesChanged(list) onEditModeChanged: editMessage.isVisible = editMode === true ? 1 : 0 onCoordinatesChanged: {} Component.onCompleted: { |