Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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// Qt-Security score:significant reason:default
5
6#ifndef QDECLARATIVERECTANGLEMAPITEM_P_P_H
7#define QDECLARATIVERECTANGLEMAPITEM_P_P_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtLocation/private/qlocationglobal_p.h>
21#include <QtLocation/private/qdeclarativepolygonmapitem_p_p.h>
22#include <QtLocation/private/qdeclarativerectanglemapitem_p.h>
23#include <QtPositioning/private/qwebmercator_p.h>
24
25QT_BEGIN_NAMESPACE
26
27class QQuickShape;
28class QQuickShapePath;
29
31{
32 Q_DISABLE_COPY_MOVE(QDeclarativeRectangleMapItemPrivate)
33public:
34 QDeclarativeRectangleMapItemPrivate(QDeclarativeRectangleMapItem &rect);
35
37 virtual void onLinePropertiesChanged() = 0;
38 virtual void markSourceDirtyAndUpdate() = 0;
39 virtual void onMapSet() = 0;
40 virtual void onGeoGeometryChanged() = 0;
41 virtual void onItemGeometryChanged() = 0;
42 virtual void updatePolish() = 0;
43 virtual void afterViewportChanged() = 0;
44 virtual QSGNode * updateMapItemPaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *data) = 0;
45 virtual bool contains(const QPointF &point) const = 0;
46
47 QDeclarativeRectangleMapItem &m_rect;
48};
49
50class Q_LOCATION_EXPORT QDeclarativeRectangleMapItemPrivateCPU: public QDeclarativeRectangleMapItemPrivate
51{
52public:
53 QDeclarativeRectangleMapItemPrivateCPU(QDeclarativeRectangleMapItem &rect);
54 ~QDeclarativeRectangleMapItemPrivateCPU() override;
55
56 void onLinePropertiesChanged() override
57 {
58 // mark dirty just in case we're a width change
59 markSourceDirtyAndUpdate();
60 }
61 void markSourceDirtyAndUpdate() override
62 {
63 m_geometry.markSourceDirty();
64 m_rect.polishAndUpdate();
65 }
66 void onMapSet() override
67 {
68 markSourceDirtyAndUpdate();
69 }
70 void onGeoGeometryChanged() override
71 {
72 markSourceDirtyAndUpdate();
73 }
74 void onItemGeometryChanged() override
75 {
76 markSourceDirtyAndUpdate();
77 }
78 void afterViewportChanged() override
79 {
80 markSourceDirtyAndUpdate();
81 }
82 void updatePolish() override;
83 QSGNode * updateMapItemPaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *data) override;
84 bool contains(const QPointF &point) const override;
85
86 QGeoMapPolygonGeometry m_geometry;
87 QQuickShape *m_shape = nullptr;
88 QQuickShapePath *m_shapePath = nullptr;
89 QDeclarativeGeoMapPainterPath *m_painterPath = nullptr;
90};
91
92QT_END_NAMESPACE
93
94#endif // QDECLARATIVERECTANGLEMAPITEM_P_P_H
virtual void afterViewportChanged()=0
virtual QSGNode * updateMapItemPaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *data)=0
virtual void onItemGeometryChanged()=0
virtual void onGeoGeometryChanged()=0
virtual bool contains(const QPointF &point) const =0
virtual void onLinePropertiesChanged()=0
virtual void markSourceDirtyAndUpdate()=0
Combined button and popup list for selecting options.