8#include <QtCore/QDebug>
12QT_DEFINE_QSDP_SPECIALIZATION_DTOR(QGeoTileSpecPrivate)
14QGeoTileSpec::QGeoTileSpec()
15 : d(
new QGeoTileSpecPrivate())
19QGeoTileSpec::QGeoTileSpec(
const QString &plugin,
int mapId,
int zoom,
int x,
int y,
int version)
20 : d(
new QGeoTileSpecPrivate(plugin, mapId, zoom, x, y, version))
24QGeoTileSpec::QGeoTileSpec(
const QGeoTileSpec &other)
noexcept =
default;
26QGeoTileSpec::~QGeoTileSpec() =
default;
28QGeoTileSpec &QGeoTileSpec::operator=(
const QGeoTileSpec &other)
noexcept
37QString QGeoTileSpec::plugin()
const
42void QGeoTileSpec::setZoom(
int zoom)
47int QGeoTileSpec::zoom()
const
52void QGeoTileSpec::setX(
int x)
57int QGeoTileSpec::x()
const
62void QGeoTileSpec::setY(
int y)
67int QGeoTileSpec::y()
const
72void QGeoTileSpec::setMapId(
int mapId)
77int QGeoTileSpec::mapId()
const
82void QGeoTileSpec::setVersion(
int version)
84 d->version_ = version;
87int QGeoTileSpec::version()
const
92bool QGeoTileSpec::isEqual(
const QGeoTileSpec &rhs)
const noexcept
94 return (*(d.constData()) == *(rhs.d.constData()));
97bool QGeoTileSpec::isLess(
const QGeoTileSpec &rhs)
const noexcept
99 return (*(d.constData()) < *(rhs.d.constData()));
102unsigned int qHash(
const QGeoTileSpec &spec)
104 unsigned int result = (qHash(spec.plugin()) * 13) % 31;
105 result += ((spec.mapId() * 17) % 31) << 5;
106 result += ((spec.zoom() * 19) % 31) << 10;
107 result += ((spec.x() * 23) % 31) << 15;
108 result += ((spec.y() * 29) % 31) << 20;
109 result += (spec.version() % 3) << 25;
115 dbg << spec.plugin() << spec.mapId() << spec.zoom() << spec.x() << spec.y() << spec.version();
119bool QGeoTileSpecPrivate::operator<(
const QGeoTileSpecPrivate &rhs)
const
121 if (plugin_ < rhs.plugin_)
123 if (plugin_ > rhs.plugin_)
126 if (mapId_ < rhs.mapId_)
128 if (mapId_ > rhs.mapId_)
131 if (zoom_ < rhs.zoom_)
133 if (zoom_ > rhs.zoom_)
146 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)