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
qgeotilespec_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 QGEOTILESPEC_H
6#define QGEOTILESPEC_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 <QtCore/QMetaType>
21#include <QtCore/QList>
22#include <QtCore/QSet>
23#include <QString>
24
25#include <QSharedDataPointer>
26
27QT_BEGIN_NAMESPACE
28
29class QGeoTileSpecPrivate;
30QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QGeoTileSpecPrivate, Q_LOCATION_EXPORT)
31
32class Q_LOCATION_EXPORT QGeoTileSpec
33{
34public:
35 QGeoTileSpec();
36 QGeoTileSpec(const QGeoTileSpec &other) noexcept;
37 QGeoTileSpec(QGeoTileSpec &&other) noexcept = default;
38 QGeoTileSpec(const QString &plugin, int mapId, int zoom, int x, int y, int version = -1);
39 ~QGeoTileSpec();
40
41 QGeoTileSpec &operator=(const QGeoTileSpec &other) noexcept;
42 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QGeoTileSpec)
43
44 void swap(QGeoTileSpec &other) noexcept { d.swap(other.d); }
45
46 QString plugin() const;
47
48 void setZoom(int zoom);
49 int zoom() const;
50
51 void setX(int x);
52 int x() const;
53
54 void setY(int y);
55 int y() const;
56
57 void setMapId(int mapId);
58 int mapId() const;
59
60 void setVersion(int version);
61 int version() const;
62
63 friend inline bool operator==(const QGeoTileSpec &lhs, const QGeoTileSpec &rhs) noexcept
64 { return lhs.isEqual(rhs); }
65 friend inline bool operator!=(const QGeoTileSpec &lhs, const QGeoTileSpec &rhs) noexcept
66 { return !lhs.isEqual(rhs); }
67 friend inline bool operator < (const QGeoTileSpec &lhs, const QGeoTileSpec &rhs) noexcept
68 { return lhs.isLess(rhs); }
69
70private:
71 QSharedDataPointer<QGeoTileSpecPrivate> d;
72
73 bool isEqual(const QGeoTileSpec &rhs) const noexcept;
74 bool isLess(const QGeoTileSpec &rhs) const noexcept;
75};
76
77Q_LOCATION_EXPORT unsigned int qHash(const QGeoTileSpec &spec);
78
79Q_LOCATION_EXPORT QDebug operator<<(QDebug, const QGeoTileSpec &);
80
81QT_END_NAMESPACE
82
83Q_DECLARE_METATYPE(QGeoTileSpec)
84Q_DECLARE_METATYPE(QList<QGeoTileSpec>)
85Q_DECLARE_METATYPE(QSet<QGeoTileSpec>)
86
87#endif // QGEOTILESPEC_H
Combined button and popup list for selecting options.
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2582
size_t qHash(const QHashedString &string)