summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmapwidgethelper.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-07-17 18:02:37 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 07:31:11 -0700
commita50e9866d5f42d76338a4cc9a51f54272dea65bc (patch)
tree86778e37ecf979a838ce7f638d8b6a1706a70fa6 /mobile-widgets/qmlmapwidgethelper.cpp
parent8b40490626e1cf52243e67c2ff76d55ccff8bf58 (diff)
downloadsubsurface-a50e9866d5f42d76338a4cc9a51f54272dea65bc.tar.gz
qmlmapwidgethelper: maintain an instance of MapLocationModel
The idea here is that the QML code should be able to fetch a model from the MapWidgetHelper instance which is instantiated inside the QML code; fetch it in the lines of "mapHelper.model". This way, updates at the backend would be reflected on the Map QML widget. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'mobile-widgets/qmlmapwidgethelper.cpp')
-rw-r--r--mobile-widgets/qmlmapwidgethelper.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmapwidgethelper.cpp b/mobile-widgets/qmlmapwidgethelper.cpp
index e56d670d3..3a0e4aa71 100644
--- a/mobile-widgets/qmlmapwidgethelper.cpp
+++ b/mobile-widgets/qmlmapwidgethelper.cpp
@@ -1,12 +1,14 @@
// SPDX-License-Identifier: GPL-2.0
#include <QDebug>
-#include "qmlmapwidgethelper.h"
+#include "qmlmapwidgethelper.h"
#include "core/dive.h"
#include "core/divesite.h"
+#include "qt-models/maplocationmodel.h"
MapWidgetHelper::MapWidgetHelper(QObject *parent) : QObject(parent)
{
+ m_mapLocationModel = new MapLocationModel(this);
}
void MapWidgetHelper::centerOnDiveSite(struct dive_site *ds)