diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-07-17 18:02:37 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-28 07:31:11 -0700 |
commit | a50e9866d5f42d76338a4cc9a51f54272dea65bc (patch) | |
tree | 86778e37ecf979a838ce7f638d8b6a1706a70fa6 /mobile-widgets/qmlmapwidgethelper.h | |
parent | 8b40490626e1cf52243e67c2ff76d55ccff8bf58 (diff) | |
download | subsurface-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.h')
-rw-r--r-- | mobile-widgets/qmlmapwidgethelper.h | 6 |
1 files changed, 6 insertions, 0 deletions
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
|