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>
This commit is contained in:
Lubomir I. Ivanov 2017-07-17 18:02:37 +03:00 committed by Dirk Hohndel
parent 8b40490626
commit a50e9866d5
2 changed files with 9 additions and 1 deletions

View file

@ -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)