diff options
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeomapitembase_p.h')
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomapitembase_p.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomapitembase_p.h b/src/location/declarativemaps/qdeclarativegeomapitembase_p.h index 38a118e5..65f111f6 100644 --- a/src/location/declarativemaps/qdeclarativegeomapitembase_p.h +++ b/src/location/declarativemaps/qdeclarativegeomapitembase_p.h @@ -92,8 +92,8 @@ public: virtual void setMap(QDeclarativeGeoMap *quickMap, QGeoMap *map); virtual void setPositionOnMap(const QGeoCoordinate &coordinate, const QPointF &offset); - QDeclarativeGeoMap *quickMap() { return quickMap_; } - QGeoMap *map() { return map_; } + QDeclarativeGeoMap *quickMap() const { return quickMap_; } + QGeoMap *map() const { return map_; } virtual const QGeoShape &geoShape() const = 0; virtual void setGeoShape(const QGeoShape &shape) = 0; @@ -108,6 +108,23 @@ public: void setParentGroup(QDeclarativeGeoMapItemGroup &parentGroup); + template <typename T = QObject> + + QList<T*> quickChildren() const + { + QList<T*> res; + QObjectList kids = children(); + QList<QQuickItem *> quickKids = childItems(); + for (int i = 0; i < quickKids.count(); ++i) + kids.append(quickKids.at(i)); + for (auto kid : qAsConst(kids)) { + auto val = qobject_cast<T*>(kid); + if (val) + res.push_back(val); + } + return res; + } + Q_SIGNALS: void mapItemOpacityChanged(); Q_REVISION(12) void addTransitionFinished(); @@ -122,6 +139,7 @@ protected: float zoomLevelOpacity() const; bool childMouseEventFilter(QQuickItem *item, QEvent *event); bool isPolishScheduled() const; + virtual void setMaterialDirty(); QGeoMap::ItemType m_itemType = QGeoMap::NoItem; |