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
qdeclarativepolygonmapitem_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 QDECLARATIVEPOLYGONMAPITEM
5#define QDECLARATIVEPOLYGONMAPITEM
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.h>
21#include <QtPositioning/qgeopolygon.h>
22
24
27{
29 QML_NAMED_ELEMENT(MapPolygon)
31
32 Q_PROPERTY(QList<QGeoCoordinate> path READ path WRITE setPath NOTIFY pathChanged)
35
36public:
39
40 void setMap(QDeclarativeGeoMap *quickMap, QGeoMap *map) override;
41 //from QuickItem
42 QSGNode *updateMapItemPaintNode(QSGNode *, UpdatePaintNodeData *) override;
43
44 Q_INVOKABLE void addCoordinate(const QGeoCoordinate &coordinate);
45 Q_INVOKABLE void removeCoordinate(const QGeoCoordinate &coordinate);
46
47 QList<QGeoCoordinate> path() const;
48 void setPath(const QList<QGeoCoordinate> &value);
49
50 QColor color() const;
51 void setColor(const QColor &color);
52
54
55 bool contains(const QPointF &point) const override;
56 const QGeoShape &geoShape() const override;
57 void setGeoShape(const QGeoShape &shape) override;
58
60 void pathChanged();
62
63protected Q_SLOTS:
64 void markSourceDirtyAndUpdate();
65 void onLinePropertiesChanged();
66 void afterViewportChanged(const QGeoMapViewportChangeEvent &event) override;
67
68protected:
69 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
70 void updatePolish() override;
71
72#ifdef QT_LOCATION_DEBUG
73public:
74#endif
79
80 std::unique_ptr<QDeclarativePolygonMapItemPrivate> m_d;
81
84};
85
87
89
90#endif /* QDECLARATIVEPOLYGONMAPITEM_H_ */
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
std::unique_ptr< QDeclarativePolygonMapItemPrivate > m_d
QDeclarativeMapLineProperties m_border
\inmodule QtPositioning
\inmodule QtPositioning
Definition qgeopolygon.h:16
\inmodule QtPositioning
Definition qgeoshape.h:17
Definition qlist.h:75
\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.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
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
GLsizei const GLchar *const * path
#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_INVOKABLE
#define Q_SLOTS
#define Q_SIGNALS
#define explicit
myFilter setColor(QColor(128, 0, 0))