31 QML_NAMED_ELEMENT(MapCircle)
32 QML_ADDED_IN_VERSION(5, 0)
34 Q_PROPERTY(QGeoCoordinate center READ center WRITE setCenter NOTIFY centerChanged)
35 Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
36 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
37 Q_PROPERTY(QDeclarativeMapLineProperties *border READ border CONSTANT)
40 explicit QDeclarativeCircleMapItem(QQuickItem *parent =
nullptr);
41 ~QDeclarativeCircleMapItem() override;
43 void setMap(QDeclarativeGeoMap *quickMap, QGeoMap *map) override;
44 QSGNode *updateMapItemPaintNode(QSGNode *, UpdatePaintNodeData *) override;
46 QGeoCoordinate center();
47 void setCenter(
const QGeoCoordinate ¢er);
50 void setRadius(qreal radius);
53 void setColor(
const QColor &color);
55 QDeclarativeMapLineProperties *border();
57 bool contains(
const QPointF &point)
const override;
58 const QGeoShape &geoShape()
const override;
59 void setGeoShape(
const QGeoShape &shape) override;
62 void centerChanged(
const QGeoCoordinate ¢er);
63 void radiusChanged(qreal radius);
64 void colorChanged(
const QColor &color);
67 void geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry) override;
68 void updatePolish() override;
71 void markSourceDirtyAndUpdate();
72 void onLinePropertiesChanged();
73 void afterViewportChanged(
const QGeoMapViewportChangeEvent &event) override;
76 void updateCirclePath();
80 QDeclarativeMapLineProperties m_border;
82 bool m_updatingGeometry;
84 std::unique_ptr<QDeclarativeCircleMapItemPrivate> m_d;
86 friend class QDeclarativeCircleMapItemPrivate;
87 friend class QDeclarativeCircleMapItemPrivateCPU;