Marble
TileLoader.cpp
33TileLoader::TileLoader(HttpDownloadManager *const downloadManager, const PluginManager *pluginManager)
38 connect(downloadManager, SIGNAL(downloadComplete(QString, QString)), SLOT(updateTile(QString, QString)));
39 connect(downloadManager, SIGNAL(downloadComplete(QByteArray, QString)), SLOT(updateTile(QByteArray, QString)));
50QImage TileLoader::loadTileImage(GeoSceneTextureTileDataset const *textureLayer, TileId const &tileId, DownloadUsage const usage)
84GeoDataDocument *TileLoader::loadTileVectorData(GeoSceneVectorTileDataset const *textureLayer, TileId const &tileId, DownloadUsage const usage)
86 // FIXME: textureLayer->fileFormat() could be used in the future for use just that parser, instead of all available parsers
124void TileLoader::downloadTile(GeoSceneTileDataset const *tileData, TileId const &tileId, DownloadUsage const usage)
139 const QString tilepath = themeStr.isAbsolute() ? themeStr.absoluteFilePath() : MarbleDirs::path(tileData.themeStr());
141 QStringList leveldirs = QDir(tilepath).entryList(QDir::AllDirs | QDir::NoSymLinks | QDir::NoDotAndDotDot);
173 mDebug() << "Base tile " << tileData.relativeTileFileName(id) << " is missing for source dir " << tileData.sourceDir();
181TileLoader::TileStatus TileLoader::tileStatus(GeoSceneTileDataset const *tileData, const TileId &tileId)
244void TileLoader::triggerDownload(GeoSceneTileDataset const *tileData, TileId const &id, DownloadUsage const usage)
247 int minValue = tileData->maximumTileLevel() == -1 ? id.zoomLevel() : qMin(id.zoomLevel(), tileData->maximumTileLevel());
257 QStringLiteral("%1:%2:%3:%4:%5").arg(QString::fromLatin1(tileData->nodeType()), tileData->sourceDir()).arg(id.zoomLevel()).arg(id.x()).arg(id.y());
261QImage TileLoader::scaledLowerLevelTile(const GeoSceneTextureTileDataset *textureData, TileId const &id)
272 TileId const replacementTileId(id.mapThemeIdHash(), level, id.x() >> deltaLevel, id.y() >> deltaLevel);
276 QImage toScale = (!fileName.isEmpty() && QFile::exists(fileName)) ? QImage(fileName) : QImage();
279 mDebug() << "No level zero tile installed in map theme dir. Falling back to a transparent image for now.";
326 mDebug() << "Unable to open vector tile " << fileName << ": No suitable plugin registered to parse this file format";
This class manages scheduled downloads.
Definition HttpDownloadManager.h:39
Q_SCRIPTABLE CaptureState status()
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
QStringView level(QStringView ifopt)
KGuiItem ok()
const QList< QKeySequence > & end()
Binds a QML item to a specific geodetic location in screen coordinates.
Definition AbstractDataPlugin.cpp:23
QDateTime currentDateTime()
qint64 secsTo(const QDateTime &other) const const
AllDirs
QStringList entryList(Filters filters, SortFlags sort) const const
bool exists(const QString &fileName)
bool exists() const const
QImage fromData(QByteArrayView data, const char *format)
bool isNull() const const
const_iterator constBegin() const const
const_iterator constEnd() const const
qsizetype size() const const
QString arg(Args &&... args) const const
QString fromLatin1(QByteArrayView str)
bool isEmpty() const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QString toLower() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
SkipEmptyParts
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:10 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:10 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.