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_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 Paolo Angelelli <paolo.angelelli@gmail.com>
2// Copyright (C) 2022 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QDECLARATIVERECTANGLEMAPITEM_P_P_H
6#define QDECLARATIVERECTANGLEMAPITEM_P_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtLocation/private/qlocationglobal_p.h>
20#include <QtLocation/private/qdeclarativepolygonmapitem_p_p.h>
21#include <QtLocation/private/qdeclarativerectanglemapitem_p.h>
22#include <QtPositioning/private/qwebmercator_p.h>
23
25
26class QQuickShape;
27class QQuickShapePath;
28
30{
31 Q_DISABLE_COPY_MOVE(QDeclarativeRectangleMapItemPrivate)
32public:
34
36 virtual void onLinePropertiesChanged() = 0;
37 virtual void markSourceDirtyAndUpdate() = 0;
38 virtual void onMapSet() = 0;
39 virtual void onGeoGeometryChanged() = 0;
40 virtual void onItemGeometryChanged() = 0;
41 virtual void updatePolish() = 0;
42 virtual void afterViewportChanged() = 0;
44 virtual bool contains(const QPointF &point) const = 0;
45
47};
48
50{
51public:
54
56 {
57 // mark dirty just in case we're a width change
58 markSourceDirtyAndUpdate();
59 }
61 {
62 m_geometry.markSourceDirty();
63 m_rect.polishAndUpdate();
64 }
65 void onMapSet() override
66 {
67 markSourceDirtyAndUpdate();
68 }
69 void onGeoGeometryChanged() override
70 {
71 markSourceDirtyAndUpdate();
72 }
73 void onItemGeometryChanged() override
74 {
75 markSourceDirtyAndUpdate();
76 }
77 void afterViewportChanged() override
78 {
79 markSourceDirtyAndUpdate();
80 }
81 void updatePolish() override;
82 QSGNode * updateMapItemPaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *data) override;
83 bool contains(const QPointF &point) const override;
84
86 QQuickShape *m_shape = nullptr;
87 QQuickShapePath *m_shapePath = nullptr;
88 QDeclarativeGeoMapPainterPath *m_painterPath = nullptr;
89};
90
92
93#endif // QDECLARATIVERECTANGLEMAPITEM_P_P_H
94
virtual void onLinePropertiesChanged()=0
virtual bool contains(const QPointF &point) const =0
virtual QSGNode * updateMapItemPaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *data)=0
virtual void markSourceDirtyAndUpdate()=0
\inmodule QtCore\reentrant
Definition qpoint.h:217
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition qsgnode.h:37
rect
[4]
Combined button and popup list for selecting options.
static bool contains(const QJsonArray &haystack, unsigned needle)
Definition qopengl.cpp:116
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data