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 {
|
Item {
|
||||||
id: rootItem
|
id: rootItem
|
||||||
property int nSelectedDives: 0
|
property alias mapHelper: mapHelper
|
||||||
|
property alias map: map
|
||||||
|
|
||||||
|
signal selectedDivesChanged(var list)
|
||||||
|
|
||||||
MapWidgetHelper {
|
MapWidgetHelper {
|
||||||
id: mapHelper
|
id: mapHelper
|
||||||
map: map
|
map: map
|
||||||
editMode: false
|
editMode: false
|
||||||
onSelectedDivesChanged: nSelectedDives = list.length
|
onSelectedDivesChanged: rootItem.selectedDivesChanged(list)
|
||||||
onEditModeChanged: editMessage.isVisible = editMode === true ? 1 : 0
|
onEditModeChanged: editMessage.isVisible = editMode === true ? 1 : 0
|
||||||
onCoordinatesChanged: {}
|
onCoordinatesChanged: {}
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue