diff options
-rw-r--r-- | mobile-widgets/qmlmapwidgethelper.cpp | 4 | ||||
-rw-r--r-- | mobile-widgets/qmlmapwidgethelper.h | 6 |
2 files changed, 9 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)
diff --git a/mobile-widgets/qmlmapwidgethelper.h b/mobile-widgets/qmlmapwidgethelper.h index 9fd427856..d0f450ed6 100644 --- a/mobile-widgets/qmlmapwidgethelper.h +++ b/mobile-widgets/qmlmapwidgethelper.h @@ -4,12 +4,14 @@ #include <QObject>
+class MapLocationModel;
struct dive_site;
class MapWidgetHelper : public QObject {
Q_OBJECT
Q_PROPERTY(QObject *map MEMBER m_map)
+ Q_PROPERTY(MapLocationModel *model MEMBER m_mapLocationModel NOTIFY modelChanged)
public:
explicit MapWidgetHelper(QObject *parent = NULL);
@@ -18,6 +20,10 @@ public: private:
QObject *m_map;
+ MapLocationModel *m_mapLocationModel;
+
+signals:
+ void modelChanged();
};
#endif
|