mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
8b40490626
commit
a50e9866d5
2 changed files with 9 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue