5#include <QtLocation/private/qgeotilespec_p.h>
14 const QString &offlineDirectory,
17 m_offlineDirectory(offlineDirectory),
19 m_providers(providers)
22 if (!offlineDirectory.
isEmpty()) {
27 for (
int i = 0;
i < providers.
size();
i++) {
28 providers[
i]->setParent(
this);
87 if (
p->mapType().mapId() > max)
88 max =
p->mapType().mapId();
100 if (spec.
zoom() == -1)
119 int providerId = spec.
mapId() - 1;
125 if (!validTiles.size())
135 if (!
image.loadFromData(bytes)) {
149 if (k.mapId() == mapId)
154 if (k.mapId() == mapId)
159 if (k.mapId() == mapId)
171 for (
int i = 0;
i <
files.size(); ++
i) {
173 if (spec.
zoom() == -1 || spec.
mapId() != mapId)
182 int providerId = spec.
mapId() - 1;
221 if (parts.length() != 2)
227 int length = fields.length();
236 int value = fields.at(
i).toInt(&
ok);
248 else if (!highDpi && fields.at(1) !=
QLatin1Char(
'l'))
267 if (
p->isResolved()) {
270 qInfo() <<
"provider for " <<
p->mapType().name() <<
" timestamp: " <<
p->timestamp()
static QString baseLocationCacheDirectory()
virtual void handleError(const QGeoTileSpec &spec, const QString &errorString)
void remove(const Key &key, bool force=false)
QList< Key > keys() const
QStringList entryList(Filters filters=NoFilter, SortFlags sort=NoSort) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QDir root()
Returns the root directory.
bool exists() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool mkpath(const QString &dirPath) const
Creates the directory path dirPath.
QString absoluteFilePath(const QString &fileName) const
Returns the absolute path name of a file in the directory.
void close() override
Calls QFileDevice::flush() and closes the file.
\inmodule QtCore \reentrant
QDateTime lastModified() const
Returns the date and time when the file was last modified.
bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
void onProviderResolutionError(const QGeoTileProviderOsm *provider, QNetworkReply::NetworkError error)
QList< QDateTime > m_maxMapIdTimestamps
QSharedPointer< QGeoTileTexture > getFromOfflineStorage(const QGeoTileSpec &spec)
QList< QGeoTileProviderOsm * > m_providers
void mapDataUpdated(int mapId)
void dropTiles(int mapId)
QGeoTileSpec filenameToTileSpec(const QString &filename) const override
QString tileSpecToFilename(const QGeoTileSpec &spec, const QString &format, int providerId) const
QGeoFileTileCacheOsm(const QList< QGeoTileProviderOsm * > &providers, const QString &offlineDirectory=QString(), const QString &directory=QString(), QObject *parent=nullptr)
QSharedPointer< QGeoTileTexture > get(const QGeoTileSpec &spec) override
void clearObsoleteTiles(const QGeoTileProviderOsm *p)
void onProviderResolutionFinished(const QGeoTileProviderOsm *provider)
QCache3Q< QGeoTileSpec, QGeoCachedTileMemory > memoryCache_
QSharedPointer< QGeoTileTexture > getFromDisk(const QGeoTileSpec &spec)
QSharedPointer< QGeoTileTexture > addToTextureCache(const QGeoTileSpec &spec, const QImage &image)
QCache3Q< QGeoTileSpec, QGeoTileTexture > textureCache_
void addToMemoryCache(const QGeoTileSpec &spec, const QByteArray &bytes, const QString &format)
QString directory() const
void clearMapId(int mapId)
QCache3Q< QGeoTileSpec, QGeoCachedTileDisk, QCache3QTileEvictionPolicy > diskCache_
QSharedPointer< QGeoCachedTileDisk > addToDiskCache(const QGeoTileSpec &spec, const QString &filename)
QSharedPointer< QGeoTileTexture > getFromMemory(const QGeoTileSpec &spec)
void resolutionFinished(const QGeoTileProviderOsm *provider)
void resolutionError(const QGeoTileProviderOsm *provider)
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
qsizetype size() const noexcept
qsizetype length() const noexcept
const_reference at(qsizetype i) const noexcept
void resize(qsizetype size)
void append(parameter_type t)
NetworkError
Indicates all possible error conditions found during the processing of the request.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
\macro QT_RESTRICTED_CAST_FROM_ASCII
QStringList split(const QString &sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the string into substrings wherever sep occurs, and returns the list of those strings.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLuint GLenum GLsizei length
GLint GLsizei GLsizei GLenum format
QLatin1StringView QLatin1String
#define QStringLiteral(str)
QFileInfo fi("c:/temp/foo")
[newstuff]
\inmodule QtCore \reentrant
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent