9#include <QtCore/QPointer>
10#include <QtCore/QTimer>
48 return d_ptr->requestTiles(tiles);
53 d_ptr->tileFetched(spec);
59 return d_ptr->m_engine->getTileTexture(spec);
66 d_ptr->tileError(tile, errorString);
95 for (;
i !=
end; ++
i) {
100 cachedTex.
insert(tile, tex);
105 const int endRange =
qMax(0, tile.
zoom() - 4);
106 for (
int z = tile.
zoom() - 1;
z >= endRange;
z--) {
107 int denominator = 1 << (tile.
zoom() -
z);
109 spec.
setX(tile.
x() / denominator);
110 spec.
setY(tile.
y() / denominator);
112 if (
t && !
t->image.isNull()) {
137 for (;
i !=
end; ++
i) {
179 requestTiles.
insert(m_tile);
191 qWarning(
"QGeoTileRequestManager: Failed to fetch tile (%d,%d,%d) 5 times, giving up. "
192 "Last error message was: '%s'",
200 int delay = (1 <<
count) * 500;
214#include "qgeotilerequestmanager.moc"
~QGeoTileRequestManagerPrivate()
QMap< QGeoTileSpec, QSharedPointer< QGeoTileTexture > > requestTiles(const QSet< QGeoTileSpec > &tiles)
QSet< QGeoTileSpec > m_requested
void tileError(const QGeoTileSpec &tile, const QString &errorString)
QPointer< QGeoTiledMappingManagerEngine > m_engine
void tileFetched(const QGeoTileSpec &spec)
QGeoTileRequestManagerPrivate(QGeoTiledMap *map, QGeoTiledMappingManagerEngine *engine)
QHash< QGeoTileSpec, QSharedPointer< RetryFuture > > m_futures
QHash< QGeoTileSpec, int > m_retries
QGeoTileRequestManager(QGeoTiledMap *map, QGeoTiledMappingManagerEngine *engine)
~QGeoTileRequestManager()
void tileFetched(const QGeoTileSpec &spec)
void tileError(const QGeoTileSpec &tile, const QString &errorString)
QMap< QGeoTileSpec, QSharedPointer< QGeoTileTexture > > requestTiles(const QSet< QGeoTileSpec > &tiles)
QSharedPointer< QGeoTileTexture > tileTexture(const QGeoTileSpec &spec)
void updateTile(const QGeoTileSpec &spec)
virtual void updateTileRequests(QGeoTiledMap *map, const QSet< QGeoTileSpec > &tilesAdded, const QSet< QGeoTileSpec > &tilesRemoved)
virtual QSharedPointer< QGeoTileTexture > getTileTexture(const QGeoTileSpec &spec)
bool remove(const Key &key)
Removes the item that has the key from the hash.
T value(const Key &key) const noexcept
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
iterator insert(const Key &key, const T &value)
QObject * parent() const
Returns a pointer to the parent object.
bool isNull() const
Returns true if the referenced object has been destroyed or if there is no referenced object; otherwi...
bool remove(const T &value)
const_iterator constBegin() const noexcept
const_iterator constEnd() const noexcept
bool contains(const T &value) const
iterator insert(const T &value)
bool isNull() const noexcept
Returns true if this object refers to \nullptr.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool singleShot
whether the timer is a single-shot timer
RetryFuture(const QGeoTileSpec &tile, QGeoTiledMap *map, QGeoTiledMappingManagerEngine *engine, QObject *parent=nullptr)
QMap< QString, QString > map
[6]
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
constexpr const T & qMax(const T &a, const T &b)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLenum GLenum GLsizei count
#define qPrintable(string)
QFuture< void > future
[5]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent