summaryrefslogtreecommitdiffstats
path: root/map-widget/qml/MapWidget.qml
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-03-08 21:59:34 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-03-11 11:40:12 -0700
commit8b43633c7d22a31f882919f535a8fc332f61af62 (patch)
tree122c1e10861f040cb0882f29ea29be123be0e750 /map-widget/qml/MapWidget.qml
parentd3607e0b77d4128507ea3aed8e9d7a7c0a1cd367 (diff)
downloadsubsurface-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/qml/MapWidget.qml')
-rw-r--r--map-widget/qml/MapWidget.qml7
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: {