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>
This commit is contained in:
Lubomir I. Ivanov 2018-03-08 21:59:34 +02:00 committed by Dirk Hohndel
parent d3607e0b77
commit 8b43633c7d

View file

@ -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: {