45 QML_NAMED_ELEMENT(MapQuickItem)
46 QML_ADDED_IN_VERSION(5, 0)
47 Q_PROPERTY(QGeoCoordinate coordinate READ coordinate WRITE setCoordinate NOTIFY coordinateChanged)
48 Q_PROPERTY(QPointF anchorPoint READ anchorPoint WRITE setAnchorPoint NOTIFY anchorPointChanged)
49 Q_PROPERTY(qreal zoomLevel READ zoomLevel WRITE setZoomLevel NOTIFY zoomLevelChanged)
50 Q_PROPERTY(QQuickItem *sourceItem READ sourceItem WRITE setSourceItem NOTIFY sourceItemChanged)
53 explicit QDeclarativeGeoMapQuickItem(QQuickItem *parent =
nullptr);
54 ~QDeclarativeGeoMapQuickItem();
56 void setMap(QDeclarativeGeoMap *quickMap, QGeoMap *map) override;
58 void setCoordinate(
const QGeoCoordinate &coordinate);
59 QGeoCoordinate coordinate();
61 void setSourceItem(QQuickItem *sourceItem);
62 QQuickItem *sourceItem();
64 void setAnchorPoint(
const QPointF &anchorPoint);
65 QPointF anchorPoint()
const;
67 void setZoomLevel(qreal zoomLevel);
68 qreal zoomLevel()
const;
70 const QGeoShape &geoShape()
const override;
71 void setGeoShape(
const QGeoShape &shape) override;
73 bool contains(
const QPointF &point)
const override;
76 void coordinateChanged();
77 void sourceItemChanged();
78 void anchorPointChanged();
79 void zoomLevelChanged();
82 void geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry) override;
83 void updatePolish() override;
86 void afterChildrenChanged() override;
87 void afterViewportChanged(
const QGeoMapViewportChangeEvent &event) override;
91 QGeoCoordinate coordinate_;
92 QGeoRectangle geoshape_;
93 QPointer<QQuickItem> sourceItem_;
94 QQuickItem *opacityContainer_ =
nullptr;
96 qreal zoomLevel_ = 0.0;
97 bool mapAndSourceItemSet_ =
false;
98 bool updatingGeometry_ =
false;
99 QMapQuickItemMatrix4x4 *matrix_ =
nullptr;
101 friend class QDeclarativeGeoMap;