summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativegeomapitembase_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeomapitembase_p.h')
-rw-r--r--src/location/declarativemaps/qdeclarativegeomapitembase_p.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomapitembase_p.h b/src/location/declarativemaps/qdeclarativegeomapitembase_p.h
index 82a24233..ff887676 100644
--- a/src/location/declarativemaps/qdeclarativegeomapitembase_p.h
+++ b/src/location/declarativemaps/qdeclarativegeomapitembase_p.h
@@ -55,6 +55,7 @@
#include <QtLocation/private/qdeclarativegeomap_p.h>
#include <QtLocation/private/qlocationglobal_p.h>
+#include <QtLocation/private/qgeomap_p.h>
QT_BEGIN_NAMESPACE
@@ -95,10 +96,27 @@ public:
QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *);
virtual QSGNode *updateMapItemPaintNode(QSGNode *, UpdatePaintNodeData *);
+ virtual QGeoMap::ItemType itemType() const = 0;
+
+ // Data-related bool. Used by QGeoMaps that render the item directly.
+ bool isDirty() const;
+ bool isGeoMaterialDirty() const;
+ bool isGeoGeometryDirty() const;
+ void markClean();
+
protected Q_SLOTS:
virtual void afterChildrenChanged();
virtual void afterViewportChanged(const QGeoMapViewportChangeEvent &event) = 0;
void polishAndUpdate();
+ inline void markGeoMaterialDirty()
+ {
+ geoMaterialDirty_ = true;
+ }
+
+ inline void markGeoGeometryDirty()
+ {
+ geoGeometryDirty_ = true;
+ }
protected:
float zoomLevelOpacity() const;
@@ -108,6 +126,11 @@ protected:
private Q_SLOTS:
void baseCameraDataChanged(const QGeoCameraData &camera);
+protected:
+ // For consumption by QGeoMaps that are capable of drawing items
+ bool geoGeometryDirty_;
+ bool geoMaterialDirty_;
+
private:
QGeoMap *map_;
QDeclarativeGeoMap *quickMap_;