46 QML_NAMED_ELEMENT(MapQuickItem)
47 QML_ADDED_IN_VERSION(5, 0)
48 Q_PROPERTY(QGeoCoordinate coordinate READ coordinate WRITE setCoordinate NOTIFY coordinateChanged)
49 Q_PROPERTY(QPointF anchorPoint READ anchorPoint WRITE setAnchorPoint NOTIFY anchorPointChanged)
50 Q_PROPERTY(qreal zoomLevel READ zoomLevel WRITE setZoomLevel NOTIFY zoomLevelChanged)
51 Q_PROPERTY(QQuickItem *sourceItem READ sourceItem WRITE setSourceItem NOTIFY sourceItemChanged)
54 explicit QDeclarativeGeoMapQuickItem(QQuickItem *parent =
nullptr);
55 ~QDeclarativeGeoMapQuickItem();
57 void setMap(QDeclarativeGeoMap *quickMap, QGeoMap *map) override;
59 void setCoordinate(
const QGeoCoordinate &coordinate);
60 QGeoCoordinate coordinate();
62 void setSourceItem(QQuickItem *sourceItem);
63 QQuickItem *sourceItem();
65 void setAnchorPoint(
const QPointF &anchorPoint);
66 QPointF anchorPoint()
const;
68 void setZoomLevel(qreal zoomLevel);
69 qreal zoomLevel()
const;
71 const QGeoShape &geoShape()
const override;
72 void setGeoShape(
const QGeoShape &shape) override;
74 bool contains(
const QPointF &point)
const override;
77 void coordinateChanged();
78 void sourceItemChanged();
79 void anchorPointChanged();
80 void zoomLevelChanged();
83 void geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry) override;
84 void updatePolish() override;
87 void afterChildrenChanged() override;
88 void afterViewportChanged(
const QGeoMapViewportChangeEvent &event) override;
92 QGeoCoordinate coordinate_;
93 QGeoRectangle geoshape_;
94 QPointer<QQuickItem> sourceItem_;
95 QQuickItem *opacityContainer_ =
nullptr;
97 qreal zoomLevel_ = 0.0;
98 bool mapAndSourceItemSet_ =
false;
99 bool updatingGeometry_ =
false;
100 QMapQuickItemMatrix4x4 *matrix_ =
nullptr;
102 friend class QDeclarativeGeoMap;