Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qgeotilespec.cpp
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
// Qt-Security score:significant reason:default
4
5
#
include
"qgeotilespec_p.h"
6
#
include
"qgeotilespec_p_p.h"
7
8
#
include
<
QtCore
/
QDebug
>
9
10
QT_BEGIN_NAMESPACE
11
12
QT_DEFINE_QSDP_SPECIALIZATION_DTOR(QGeoTileSpecPrivate)
13
14
QGeoTileSpec::QGeoTileSpec()
15
: d(
new
QGeoTileSpecPrivate())
16
{
17
}
18
19
QGeoTileSpec::QGeoTileSpec(
const
QString &plugin,
int
mapId,
int
zoom,
int
x,
int
y,
int
version)
20
: d(
new
QGeoTileSpecPrivate(plugin, mapId, zoom, x, y, version))
21
{
22
}
23
24
QGeoTileSpec::QGeoTileSpec(
const
QGeoTileSpec &other)
noexcept
=
default
;
25
26
QGeoTileSpec::~QGeoTileSpec() =
default
;
27
28
QGeoTileSpec &QGeoTileSpec::operator=(
const
QGeoTileSpec &other)
noexcept
29
{
30
if
(
this
== &other)
31
return
*
this
;
32
33
d = other.d;
34
return
*
this
;
35
}
36
37
QString QGeoTileSpec::plugin()
const
38
{
39
return
d->plugin_;
40
}
41
42
void
QGeoTileSpec::setZoom(
int
zoom)
43
{
44
d->zoom_ = zoom;
45
}
46
47
int
QGeoTileSpec::zoom()
const
48
{
49
return
d->zoom_;
50
}
51
52
void
QGeoTileSpec::setX(
int
x)
53
{
54
d->x_ = x;
55
}
56
57
int
QGeoTileSpec::x()
const
58
{
59
return
d->x_;
60
}
61
62
void
QGeoTileSpec::setY(
int
y)
63
{
64
d->y_ = y;
65
}
66
67
int
QGeoTileSpec::y()
const
68
{
69
return
d->y_;
70
}
71
72
void
QGeoTileSpec::setMapId(
int
mapId)
73
{
74
d->mapId_ = mapId;
75
}
76
77
int
QGeoTileSpec::mapId()
const
78
{
79
return
d->mapId_;
80
}
81
82
void
QGeoTileSpec::setVersion(
int
version)
83
{
84
d->version_ = version;
85
}
86
87
int
QGeoTileSpec::version()
const
88
{
89
return
d->version_;
90
}
91
92
bool
QGeoTileSpec::isEqual(
const
QGeoTileSpec &rhs)
const
noexcept
93
{
94
return
(*(d.constData()) == *(rhs.d.constData()));
95
}
96
97
bool
QGeoTileSpec::isLess(
const
QGeoTileSpec &rhs)
const
noexcept
98
{
99
return
(*(d.constData()) < *(rhs.d.constData()));
100
}
101
102
size_t QGeoTileSpec::hash(size_t seed)
const
noexcept
103
{
104
return
d->hash(seed);
105
}
106
107
QDebug
operator
<< (QDebug dbg,
const
QGeoTileSpec &spec)
108
{
109
dbg << spec.plugin() << spec.mapId() << spec.zoom() << spec.x() << spec.y() << spec.version();
110
return
dbg;
111
}
112
113
bool
QGeoTileSpecPrivate::operator<(
const
QGeoTileSpecPrivate &rhs)
const
114
{
115
if
(plugin_ < rhs.plugin_)
116
return
true
;
117
if
(plugin_ > rhs.plugin_)
118
return
false
;
119
120
if
(mapId_ < rhs.mapId_)
121
return
true
;
122
if
(mapId_ > rhs.mapId_)
123
return
false
;
124
125
if
(zoom_ < rhs.zoom_)
126
return
true
;
127
if
(zoom_ > rhs.zoom_)
128
return
false
;
129
130
if
(x_ < rhs.x_)
131
return
true
;
132
if
(x_ > rhs.x_)
133
return
false
;
134
135
if
(y_ < rhs.y_)
136
return
true
;
137
if
(y_ > rhs.y_)
138
return
false
;
139
140
return
(version_ < rhs.version_);
141
}
142
143
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
operator<<
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
Definition
qfileinfo.cpp:1830
qtlocation
src
location
maps
qgeotilespec.cpp
Generated on
for Qt by
1.18.0