diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-07-19 02:50:07 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-28 07:31:11 -0700 |
commit | a920d683a196ff28be3e8fa9bbaaab2a67b05553 (patch) | |
tree | 77d00cb209998d6887c47c8b4ae4fbefe8c629d3 /mobile-widgets/qmlmapwidgethelper.cpp | |
parent | f2608edc5662f4e2c5afeb83eb395c25bfc4a18a (diff) | |
download | subsurface-a920d683a196ff28be3e8fa9bbaaab2a67b05553.tar.gz |
mapwidgethelper: add a slot to handle marker selection from the model
When MapLocationModel updates the selected marker, MapWidgetHelper now
receives a signal. The slot is named selectedLocationChanged().
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'mobile-widgets/qmlmapwidgethelper.cpp')
-rw-r--r-- | mobile-widgets/qmlmapwidgethelper.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmapwidgethelper.cpp b/mobile-widgets/qmlmapwidgethelper.cpp index 264b62abb..801e46620 100644 --- a/mobile-widgets/qmlmapwidgethelper.cpp +++ b/mobile-widgets/qmlmapwidgethelper.cpp @@ -9,6 +9,8 @@ MapWidgetHelper::MapWidgetHelper(QObject *parent) : QObject(parent)
{
m_mapLocationModel = new MapLocationModel(this);
+ connect(m_mapLocationModel, SIGNAL(selectedLocationChanged(MapLocation *)),
+ this, SLOT(selectedLocationChanged(MapLocation *)));
}
void MapWidgetHelper::centerOnDiveSite(struct dive_site *ds)
@@ -38,3 +40,8 @@ void MapWidgetHelper::reloadMapLocations() }
m_mapLocationModel->addList(locationList);
}
+
+void MapWidgetHelper::selectedLocationChanged(MapLocation *location)
+{
+ qDebug() << location;
+}
|