marble
TileLoader.cpp
Go to the documentation of this file.
43 TileLoader::TileLoader(HttpDownloadManager * const downloadManager, const PluginManager *pluginManager) :
56 QImage TileLoader::loadTileImage( GeoSceneTextureTile const *textureLayer, TileId const & tileId, DownloadUsage const usage )
90 GeoDataDocument *TileLoader::loadTileVectorData( GeoSceneVectorTile const *textureLayer, TileId const & tileId, DownloadUsage const usage )
92 // FIXME: textureLayer->fileFormat() could be used in the future for use just that parser, instead of all available parsers
133 void TileLoader::downloadTile( GeoSceneTiled const *textureLayer, TileId const &tileId, DownloadUsage const usage )
148 const QString tilepath = themeStr.isAbsolute() ? themeStr.absoluteFilePath() : MarbleDirs::path( texture.themeStr() );
183 mDebug() << "Base tile " << texture.relativeTileFileName( id ) << " is missing for source dir " << texture.sourceDir();
191 TileLoader::TileStatus TileLoader::tileStatus( GeoSceneTiled const *textureLayer, const TileId &tileId )
231 void TileLoader::triggerDownload( GeoSceneTiled const *textureLayer, TileId const &id, DownloadUsage const usage )
235 QString const idStr = QString( "%1:%2:%3:%4" ).arg( textureLayer->sourceDir() ).arg( id.zoomLevel() ).arg( id.x() ).arg( id.y() );
239 QImage TileLoader::scaledLowerLevelTile( const GeoSceneTextureTile * textureLayer, TileId const & id )
252 mDebug() << "No level zero tile installed in map theme dir. Falling back to a transparent image for now.";
QString relativeTileFileName(const TileId &) const
Definition: GeoSceneTiled.cpp:204
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
QImage fromData(const uchar *data, int size, const char *format)
static QString path(const QString &relativePath)
Definition: MarbleDirs.cpp:59
static TileStatus tileStatus(GeoSceneTiled const *textureLayer, const TileId &tileId)
Returns the status of the downloaded tile file:
Definition: TileLoader.cpp:191
bool isEmpty() const
static bool baseTilesAvailable(GeoSceneTiled const &texture)
Returns whether the mandatory most basic tile level is fully available for the given texture layer...
Definition: TileLoader.cpp:168
static int maximumTileLevel(GeoSceneTiled const &texture)
Definition: TileLoader.cpp:138
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
int levelZeroColumns() const
Definition: GeoSceneTiled.cpp:97
Definition: GeoSceneTiled.h:43
bool isNull() const
bool exists() const
QImage copy(const QRect &rectangle) const
GeoDataDocument * loadTileVectorData(GeoSceneVectorTile const *textureLayer, TileId const &tileId, DownloadUsage const usage)
Definition: TileLoader.cpp:90
void updateTile(QByteArray const &imageData, QString const &tileId)
Definition: TileLoader.cpp:205
int maximumTileLevel() const
Definition: GeoSceneTiled.cpp:117
int size() const
Definition: TileLoader.h:51
void tileCompleted(TileId const &tileId, QImage const &tileImage)
GeoDataDocument * openFile(const QString &fileName, DocumentRole role=UserDocument, int timeout=30000)
Definition: ParsingRunnerManager.cpp:121
Definition: TileLoader.h:50
QDateTime lastModified() const
bool exists() const
Definition: TileId.h:27
QDateTime currentDateTime()
int secsTo(const QDateTime &other) const
QStringList entryList(QFlags< QDir::Filter > filters, QFlags< QDir::SortFlag > sort) const
void downloadTile(GeoSceneTiled const *textureLayer, TileId const &, DownloadUsage const )
Definition: TileLoader.cpp:133
Definition: TileLoader.h:52
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QImage loadTileImage(GeoSceneTextureTile const *textureLayer, TileId const &tileId, DownloadUsage const )
Definition: TileLoader.cpp:56
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
int expire() const
Definition: GeoSceneAbstractDataset.cpp:53
QImage scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const
This class manages scheduled downloads.
Definition: HttpDownloadManager.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.