summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mobile-widgets/qml/MapWidget.qml4
-rw-r--r--mobile-widgets/qmlmapwidgethelper.cpp3
-rw-r--r--mobile-widgets/qmlmapwidgethelper.h1
3 files changed, 6 insertions, 2 deletions
diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml
index 34731e490..647754223 100644
--- a/mobile-widgets/qml/MapWidget.qml
+++ b/mobile-widgets/qml/MapWidget.qml
@@ -13,6 +13,10 @@ Item {
MapWidgetHelper {
id: mapHelper
map: map
+ onSelectedDivesChanged: {
+ // 'list' contains a list of dive list indexes
+ console.log("onSelectedDivesChanged: " + list.length);
+ }
}
Map {
diff --git a/mobile-widgets/qmlmapwidgethelper.cpp b/mobile-widgets/qmlmapwidgethelper.cpp
index 415cc2483..be3ede0bc 100644
--- a/mobile-widgets/qmlmapwidgethelper.cpp
+++ b/mobile-widgets/qmlmapwidgethelper.cpp
@@ -73,8 +73,7 @@ void MapWidgetHelper::selectedLocationChanged(MapLocation *location)
if (locationCoord.distanceTo(dsCoord) < m_smallCircleRadius)
m_selectedDiveIds.append(idx);
}
-
- qDebug() << "selectedDiveIds:" << m_selectedDiveIds;
+ emit selectedDivesChanged(m_selectedDiveIds);
}
/*
diff --git a/mobile-widgets/qmlmapwidgethelper.h b/mobile-widgets/qmlmapwidgethelper.h
index 514a52161..91e95f4f9 100644
--- a/mobile-widgets/qmlmapwidgethelper.h
+++ b/mobile-widgets/qmlmapwidgethelper.h
@@ -34,6 +34,7 @@ private slots:
signals:
void modelChanged();
+ void selectedDivesChanged(QList<int> list);
};
extern "C" const char *printGPSCoords(int lat, int lon);