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