Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdeclarativecirclemapitem_p.h
Go to the documentation of this file.
1// Copyright (C) 2015 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QDECLARATIVECIRCLEMAPITEM_H
5#define QDECLARATIVECIRCLEMAPITEM_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtLocation/private/qlocationglobal_p.h>
19#include <QtLocation/private/qdeclarativegeomapitembase_p.h>
20#include <QtLocation/private/qdeclarativepolylinemapitem_p_p.h>
21#include <QSGGeometryNode>
22#include <QSGFlatColorMaterial>
23#include <QtPositioning/QGeoCircle>
24
26
29{
31 QML_NAMED_ELEMENT(MapCircle)
33
34 Q_PROPERTY(QGeoCoordinate center READ center WRITE setCenter NOTIFY centerChanged)
35 Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
38
39public:
41 ~QDeclarativeCircleMapItem() override;
42
43 void setMap(QDeclarativeGeoMap *quickMap, QGeoMap *map) override;
44 QSGNode *updateMapItemPaintNode(QSGNode *, UpdatePaintNodeData *) override;
45
47 void setCenter(const QGeoCoordinate &center);
48
49 qreal radius() const;
50 void setRadius(qreal radius);
51
52 QColor color() const;
53 void setColor(const QColor &color);
54
56
57 bool contains(const QPointF &point) const override;
58 const QGeoShape &geoShape() const override;
59 void setGeoShape(const QGeoShape &shape) override;
60
62 void centerChanged(const QGeoCoordinate &center);
63 void radiusChanged(qreal radius);
65
66protected:
67 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
68 void updatePolish() override;
69
70protected Q_SLOTS:
71 void markSourceDirtyAndUpdate();
72 void onLinePropertiesChanged();
73 void afterViewportChanged(const QGeoMapViewportChangeEvent &event) override;
74
76 void updateCirclePath();
77
79 QGeoCircle m_circle;
81 QColor m_color;
82 bool m_updatingGeometry;
83
85
88};
89
91
93
95
96#endif /* QDECLARATIVECIRCLEMAPITEM_H */
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtPositioning
Definition qgeocircle.h:15
\inmodule QtPositioning
\inmodule QtPositioning
Definition qgeoshape.h:17
\inmodule QtCore\reentrant
Definition qpoint.h:217
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
\inmodule QtCore\reentrant
Definition qrect.h:484
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition qsgnode.h:37
QMap< QString, QString > map
[6]
void colorChanged()
Combined button and popup list for selecting options.
static bool contains(const QJsonArray &haystack, unsigned needle)
Definition qopengl.cpp:116
GLint GLenum GLsizei GLsizei GLsizei GLint border
GLuint color
[2]
struct _cl_event * event
#define QML_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
#define explicit
myFilter setColor(QColor(128, 0, 0))