mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
d3607e0b77
commit
8b43633c7d
1 changed files with 5 additions and 2 deletions
|
@ -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: {
|
||||
|
|
Loading…
Add table
Reference in a new issue