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
qdeclarativerectanglemapitem_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QDECLARATIVERECTANGLEMAPITEM_H_
5#define QDECLARATIVERECTANGLEMAPITEM_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/qgeomapitemgeometry_p.h>
21#include <QtLocation/private/qdeclarativepolylinemapitem_p.h>
22#include <QtLocation/private/qdeclarativepolygonmapitem_p_p.h>
23#include <QtPositioning/private/qdoublevector2d_p.h>
24
25#include <QSGGeometryNode>
26#include <QSGFlatColorMaterial>
27
29
32{
34 QML_NAMED_ELEMENT(MapRectangle)
36
37 Q_PROPERTY(QGeoCoordinate topLeft READ topLeft WRITE setTopLeft NOTIFY topLeftChanged)
38 Q_PROPERTY(QGeoCoordinate bottomRight READ bottomRight WRITE setBottomRight NOTIFY bottomRightChanged)
41
42public:
45
46 void setMap(QDeclarativeGeoMap *quickMap, QGeoMap *map) override;
47 //from QuickItem
48 QSGNode *updateMapItemPaintNode(QSGNode *, UpdatePaintNodeData *) override;
49
50 QGeoCoordinate topLeft();
51 void setTopLeft(const QGeoCoordinate &center);
52
53 QGeoCoordinate bottomRight();
54 void setBottomRight(const QGeoCoordinate &center);
55
56 QColor color() const;
57 void setColor(const QColor &color);
58
60
61 bool contains(const QPointF &point) const override;
62 const QGeoShape &geoShape() const override;
63 void setGeoShape(const QGeoShape &shape) override;
64
66 void topLeftChanged(const QGeoCoordinate &topLeft);
67 void bottomRightChanged(const QGeoCoordinate &bottomRight);
69
70protected:
71 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
72 void updatePolish() override;
73
74protected Q_SLOTS:
75 void markSourceDirtyAndUpdate();
76 void onLinePropertiesChanged();
77 void afterViewportChanged(const QGeoMapViewportChangeEvent &event) override;
78
80 QGeoRectangle m_rectangle;
82 QColor m_color = Qt::transparent;
83
84 bool m_updatingGeometry = false;
85
87
90};
91
93
95
97
98#endif /* QDECLARATIVERECTANGLEMAPITEM_H_ */
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtPositioning
\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.
Definition qcompare.h:63
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
#define explicit
myFilter setColor(QColor(128, 0, 0))