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
qdeclarativegeomapquickitem_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 QDECLARATIVEGEOMAPQUICKITEM_H
5#define QDECLARATIVEGEOMAPQUICKITEM_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
20#include <QtQuick/QQuickItem>
21#include <QtQuick/QSGNode>
22
23#include <QtLocation/private/qdeclarativegeomap_p.h>
24#include <QtLocation/private/qdeclarativegeomapitembase_p.h>
25#include <QtPositioning/qgeoshape.h>
26
28
30{
31public:
33
34 void setMatrix(const QMatrix4x4& matrix);
35 void applyTo(QMatrix4x4 *matrix) const override;
36
38};
39
41{
43 QML_NAMED_ELEMENT(MapQuickItem)
45 Q_PROPERTY(QGeoCoordinate coordinate READ coordinate WRITE setCoordinate NOTIFY coordinateChanged)
46 Q_PROPERTY(QPointF anchorPoint READ anchorPoint WRITE setAnchorPoint NOTIFY anchorPointChanged)
47 Q_PROPERTY(qreal zoomLevel READ zoomLevel WRITE setZoomLevel NOTIFY zoomLevelChanged)
48 Q_PROPERTY(QQuickItem *sourceItem READ sourceItem WRITE setSourceItem NOTIFY sourceItemChanged)
49
50public:
53
54 void setMap(QDeclarativeGeoMap *quickMap, QGeoMap *map) override;
55
56 void setCoordinate(const QGeoCoordinate &coordinate);
57 QGeoCoordinate coordinate();
58
59 void setSourceItem(QQuickItem *sourceItem);
60 QQuickItem *sourceItem();
61
62 void setAnchorPoint(const QPointF &anchorPoint);
63 QPointF anchorPoint() const;
64
65 void setZoomLevel(qreal zoomLevel);
66 qreal zoomLevel() const;
67
68 const QGeoShape &geoShape() const override;
69 void setGeoShape(const QGeoShape &shape) override;
70
72 void coordinateChanged();
73 void sourceItemChanged();
74 void anchorPointChanged();
75 void zoomLevelChanged();
76
77protected:
78 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
79 void updatePolish() override;
80
81protected Q_SLOTS:
82 void afterChildrenChanged() override;
83 void afterViewportChanged(const QGeoMapViewportChangeEvent &event) override;
84
86 qreal scaleFactor();
87 QGeoCoordinate coordinate_;
88 QGeoRectangle geoshape_;
89 QPointer<QQuickItem> sourceItem_;
90 QQuickItem *opacityContainer_ = nullptr;
91 QPointF anchorPoint_;
92 qreal zoomLevel_ = 0.0;
93 bool mapAndSourceItemSet_ = false;
94 bool updatingGeometry_ = false;
95 QMapQuickItemMatrix4x4 *matrix_ = nullptr;
96
97 friend class QDeclarativeGeoMap;
98};
99
101
103
104#endif
\inmodule QtPositioning
\inmodule QtPositioning
\inmodule QtPositioning
Definition qgeoshape.h:17
QMapQuickItemMatrix4x4(QObject *parent=nullptr)
\qmltype MapQuickItem \instantiates QDeclarativeGeoMapQuickItem \inqmlmodule QtLocation
void applyTo(QMatrix4x4 *matrix) const override
void setMatrix(const QMatrix4x4 &matrix)
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\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
QMap< QString, QString > map
[6]
Combined button and popup list for selecting options.
struct _cl_event * event
GLuint GLenum matrix
#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