From a50e9866d5f42d76338a4cc9a51f54272dea65bc Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Mon, 17 Jul 2017 18:02:37 +0300 Subject: 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 --- mobile-widgets/qmlmapwidgethelper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mobile-widgets/qmlmapwidgethelper.cpp') 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 -#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) -- cgit v1.2.3-70-g09d2