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
qgeomaptype_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 QGEOMAPTYPE_H
5#define QGEOMAPTYPE_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 <QtCore/QObject>
19#include <QtCore/QString>
20#include <QtCore/QSharedDataPointer>
21#include <QtCore/QVariantMap>
22#include <QtLocation/private/qlocationglobal_p.h>
23#include <QtQml/qqml.h>
24
26
27class QGeoCameraCapabilities;
29QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QGeoMapTypePrivate, Q_LOCATION_EXPORT)
30
31class Q_LOCATION_EXPORT QGeoMapType
32{
33 Q_GADGET
34 QML_VALUE_TYPE(mapType)
35 QML_STRUCTURED_VALUE
36 Q_ENUMS(MapStyle)
37
38 Q_PROPERTY(MapStyle style READ style CONSTANT)
39 Q_PROPERTY(QString name READ name CONSTANT)
40 Q_PROPERTY(QString description READ description CONSTANT)
41 Q_PROPERTY(bool mobile READ mobile CONSTANT)
42 Q_PROPERTY(bool night READ night CONSTANT)
43 Q_PROPERTY(QGeoCameraCapabilities cameraCapabilities READ cameraCapabilities CONSTANT)
44 Q_PROPERTY(QVariantMap metadata READ metadata CONSTANT)
45
46 Q_MOC_INCLUDE(<QtLocation/private/qgeocameracapabilities_p.h>)
47public:
48 enum MapStyle { // ### Qt6: change this to be a QFlags instead, or remove.
49 NoMap = 0,
50 StreetMap,
51 SatelliteMapDay,
52 SatelliteMapNight,
53 TerrainMap,
54 HybridMap,
55 TransitMap,
56 GrayStreetMap,
57 PedestrianMap,
58 CarNavigationMap,
59 CycleMap,
60 CustomMap = 100
61 };
62
63 QGeoMapType();
64 QGeoMapType(const QGeoMapType &other) noexcept;
65 QGeoMapType(QGeoMapType &&other) noexcept = default;
66 QGeoMapType(MapStyle style, const QString &name, const QString &description, bool mobile,
67 bool night, int mapId, const QByteArray &pluginName,
68 const QGeoCameraCapabilities &cameraCapabilities,
69 const QVariantMap &metadata = QVariantMap());
70 ~QGeoMapType();
71
72 QGeoMapType &operator=(const QGeoMapType &other) noexcept;
73 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QGeoMapType)
74
75 void swap(QGeoMapType &other) noexcept { d_ptr.swap(other.d_ptr); }
76
77 friend inline bool operator==(const QGeoMapType &lhs, const QGeoMapType &rhs) noexcept
78 { return lhs.isEqual(rhs); }
79 friend inline bool operator!=(const QGeoMapType &lhs, const QGeoMapType &rhs) noexcept
80 { return !lhs.isEqual(rhs); }
81
82 MapStyle style() const;
83 QString name() const;
84 QString description() const;
85 bool mobile() const;
86 bool night() const;
87 int mapId() const;
88 QByteArray pluginName() const;
89 QGeoCameraCapabilities cameraCapabilities() const;
90 QVariantMap metadata() const;
91
92private:
93 QSharedDataPointer<QGeoMapTypePrivate> d_ptr;
94
95 bool isEqual(const QGeoMapType &other) const noexcept;
96};
97
104
105QT_END_NAMESPACE
106
107#endif // QGEOMAPTYPE_H
static QDoubleVector3D toDoubleVector3D(const QVector3D &in)
static bool appendZIntersects(const QDoubleVector3D &start, const QDoubleVector3D &end, double z, QList< QDoubleVector3D > &results)
static QVector3D toVector3D(const QDoubleVector3D &in)
static void addXOffset(PolygonVector &footprint, double xoff)
QList< QDoubleVector3D > PolygonVector