7#include <QtCore/QDebug>
11QT_DEFINE_QSDP_SPECIALIZATION_DTOR(QGeoTileSpecPrivate)
13QGeoTileSpec::QGeoTileSpec()
14 : d(
new QGeoTileSpecPrivate())
18QGeoTileSpec::QGeoTileSpec(
const QString &plugin,
int mapId,
int zoom,
int x,
int y,
int version)
19 : d(
new QGeoTileSpecPrivate(plugin, mapId, zoom, x, y, version))
23QGeoTileSpec::QGeoTileSpec(
const QGeoTileSpec &other)
noexcept =
default;
25QGeoTileSpec::~QGeoTileSpec() =
default;
27QGeoTileSpec &QGeoTileSpec::operator=(
const QGeoTileSpec &other)
noexcept
36QString QGeoTileSpec::plugin()
const
41void QGeoTileSpec::setZoom(
int zoom)
46int QGeoTileSpec::zoom()
const
51void QGeoTileSpec::setX(
int x)
56int QGeoTileSpec::x()
const
61void QGeoTileSpec::setY(
int y)
66int QGeoTileSpec::y()
const
71void QGeoTileSpec::setMapId(
int mapId)
76int QGeoTileSpec::mapId()
const
81void QGeoTileSpec::setVersion(
int version)
83 d->version_ = version;
86int QGeoTileSpec::version()
const
91bool QGeoTileSpec::isEqual(
const QGeoTileSpec &rhs)
const noexcept
93 return (*(d.constData()) == *(rhs.d.constData()));
96bool QGeoTileSpec::isLess(
const QGeoTileSpec &rhs)
const noexcept
98 return (*(d.constData()) < *(rhs.d.constData()));
101unsigned int qHash(
const QGeoTileSpec &spec)
103 unsigned int result = (qHash(spec.plugin()) * 13) % 31;
104 result += ((spec.mapId() * 17) % 31) << 5;
105 result += ((spec.zoom() * 19) % 31) << 10;
106 result += ((spec.x() * 23) % 31) << 15;
107 result += ((spec.y() * 29) % 31) << 20;
108 result += (spec.version() % 3) << 25;
114 dbg << spec.plugin() << spec.mapId() << spec.zoom() << spec.x() << spec.y() << spec.version();
118bool QGeoTileSpecPrivate::operator<(
const QGeoTileSpecPrivate &rhs)
const
120 if (plugin_ < rhs.plugin_)
122 if (plugin_ > rhs.plugin_)
125 if (mapId_ < rhs.mapId_)
127 if (mapId_ > rhs.mapId_)
130 if (zoom_ < rhs.zoom_)
132 if (zoom_ > rhs.zoom_)
145 return (version_ < rhs.version_);
Combined button and popup list for selecting options.
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
size_t qHash(const QHashedString &string)