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// Qt-Security score:significant reason:default
4
5#ifndef QGEOMAPTYPE_H
6#define QGEOMAPTYPE_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 <QtCore/QObject>
20#include <QtCore/QString>
21#include <QtCore/QSharedDataPointer>
22#include <QtCore/QVariantMap>
23#include <QtLocation/private/qlocationglobal_p.h>
24#include <QtQml/qqml.h>
25
27
28class QGeoCameraCapabilities;
30QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QGeoMapTypePrivate, Q_LOCATION_EXPORT)
31
32class Q_LOCATION_EXPORT QGeoMapType
33{
34 Q_GADGET
35 QML_VALUE_TYPE(mapType)
36 QML_STRUCTURED_VALUE
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 Q_ENUM(MapStyle)
63
64 QGeoMapType();
65 QGeoMapType(const QGeoMapType &other) noexcept;
66 QGeoMapType(QGeoMapType &&other) noexcept = default;
67 QGeoMapType(MapStyle style, const QString &name, const QString &description, bool mobile,
68 bool night, int mapId, const QByteArray &pluginName,
69 const QGeoCameraCapabilities &cameraCapabilities,
70 const QVariantMap &metadata = QVariantMap());
71 ~QGeoMapType();
72
73 QGeoMapType &operator=(const QGeoMapType &other) noexcept;
74 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QGeoMapType)
75
76 void swap(QGeoMapType &other) noexcept { d_ptr.swap(other.d_ptr); }
77
78 friend inline bool operator==(const QGeoMapType &lhs, const QGeoMapType &rhs) noexcept
79 { return lhs.isEqual(rhs); }
80 friend inline bool operator!=(const QGeoMapType &lhs, const QGeoMapType &rhs) noexcept
81 { return !lhs.isEqual(rhs); }
82
83 MapStyle style() const;
84 QString name() const;
85 QString description() const;
86 bool mobile() const;
87 bool night() const;
88 int mapId() const;
89 QByteArray pluginName() const;
90 QGeoCameraCapabilities cameraCapabilities() const;
91 QVariantMap metadata() const;
92
93private:
94 QSharedDataPointer<QGeoMapTypePrivate> d_ptr;
95
96 bool isEqual(const QGeoMapType &other) const noexcept;
97};
98
105
106QT_END_NAMESPACE
107
108#endif // QGEOMAPTYPE_H
Combined button and popup list for selecting options.
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