32 QML_NAMED_ELEMENT(MapCircle)
33 QML_ADDED_IN_VERSION(5, 0)
35 Q_PROPERTY(QGeoCoordinate center READ center WRITE setCenter NOTIFY centerChanged)
36 Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
37 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
38 Q_PROPERTY(QDeclarativeMapLineProperties *border READ border CONSTANT)
41 explicit QDeclarativeCircleMapItem(QQuickItem *parent =
nullptr);
42 ~QDeclarativeCircleMapItem() override;
44 void setMap(QDeclarativeGeoMap *quickMap, QGeoMap *map) override;
45 QSGNode *updateMapItemPaintNode(QSGNode *, UpdatePaintNodeData *) override;
47 QGeoCoordinate center();
48 void setCenter(
const QGeoCoordinate ¢er);
51 void setRadius(qreal radius);
54 void setColor(
const QColor &color);
56 QDeclarativeMapLineProperties *border();
58 bool contains(
const QPointF &point)
const override;
59 const QGeoShape &geoShape()
const override;
60 void setGeoShape(
const QGeoShape &shape) override;
63 void centerChanged(
const QGeoCoordinate ¢er);
64 void radiusChanged(qreal radius);
65 void colorChanged(
const QColor &color);
68 void geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry) override;
69 void updatePolish() override;
72 void markSourceDirtyAndUpdate();
73 void onLinePropertiesChanged();
74 void afterViewportChanged(
const QGeoMapViewportChangeEvent &event) override;
77 void updateCirclePath();
81 QDeclarativeMapLineProperties m_border;
83 bool m_updatingGeometry;
85 std::unique_ptr<QDeclarativeCircleMapItemPrivate> m_d;
87 friend class QDeclarativeCircleMapItemPrivate;
88 friend class QDeclarativeCircleMapItemPrivateCPU;