diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2016-08-09 13:16:49 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-01-31 09:33:41 +0000 |
commit | 9ef81d240ad8d27ea482f9a15d2647a6eee1f7f2 (patch) | |
tree | 63d54d6010fe0e34faeb93ca40f8d17044f254c1 /src/location/declarativemaps/qdeclarativegeomap_p.h | |
parent | d7936f74bda527a85d69e7d1c412d79ee952d139 (diff) | |
download | qtlocation-9ef81d240ad8d27ea482f9a15d2647a6eee1f7f2.tar.gz |
Allow to create maps with groups of map items
This patch lets a user create an external qml file, and put multiple
map items inside a parent MapItemGroup{}, and add that element to a Map
item.
QDeclarativeGeoMap gets also two associated methods: addMapItemGroup and
removeMapItemGroup to deal with item groups at runtime.
Additionally, clearMapItems now clears also added item groups.
Task-number: QTBUG-55211
Change-Id: Ie4e602e4bda65fb56422b721be5fd34c54eb7954
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeomap_p.h')
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomap_p.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomap_p.h b/src/location/declarativemaps/qdeclarativegeomap_p.h index b010bda2..1bf1ecd6 100644 --- a/src/location/declarativemaps/qdeclarativegeomap_p.h +++ b/src/location/declarativemaps/qdeclarativegeomap_p.h @@ -51,7 +51,7 @@ #include <QtLocation/private/qlocationglobal_p.h> #include <QtLocation/private/qdeclarativegeomapitemview_p.h> #include <QtLocation/private/qquickgeomapgesturearea_p.h> - +#include <QtLocation/private/qdeclarativegeomapitemgroup_p.h> #include <QtLocation/qgeoserviceprovider.h> #include <QtLocation/private/qgeocameradata_p.h> #include <QtQuick/QQuickItem> @@ -153,6 +153,9 @@ public: Q_INVOKABLE void removeMapItem(QDeclarativeGeoMapItemBase *item); Q_INVOKABLE void addMapItem(QDeclarativeGeoMapItemBase *item); + Q_INVOKABLE void addMapItemGroup(QDeclarativeGeoMapItemGroup *itemGroup); + Q_INVOKABLE void removeMapItemGroup(QDeclarativeGeoMapItemGroup *itemGroup); + Q_INVOKABLE void clearMapItems(); QList<QObject *> mapItems(); @@ -242,6 +245,7 @@ private: QGeoMap *m_map; QPointer<QDeclarativeGeoMapCopyrightNotice> m_copyrights; QList<QPointer<QDeclarativeGeoMapItemBase> > m_mapItems; + QList<QPointer<QDeclarativeGeoMapItemGroup> > m_mapItemGroups; QString m_errorString; QGeoServiceProvider::Error m_error; QGeoRectangle m_visibleRegion; |