16#ifndef QGSVECTORTILEDATAPROVIDER_H
17#define QGSVECTORTILEDATAPROVIDER_H
25#include <QReadWriteLock>
127 return { { QString(), sourcePath() } };
146 virtual bool supportsAsync()
const;
171 virtual QVariantMap styleDefinition()
const;
179 virtual QString styleUrl()
const;
187 virtual QVariantMap spriteDefinition()
const;
194 virtual QImage spriteImage()
const;
198 std::shared_ptr<QgsVectorTileDataProviderSharedData>
mShared;
QFlags< DataProviderReadFlag > DataProviderReadFlags
Flags which control data provider construction.
QFlags< VectorTileProviderCapability > VectorTileProviderCapabilities
Vector tile data provider capabilities.
RendererUsage
Usage of the renderer.
@ Unknown
Renderer used for unknown usage.
QFlags< VectorTileProviderFlag > VectorTileProviderFlags
Vector tile data provider flags.
Abstract base class for spatial data provider implementations.
virtual bool renderInPreview(const QgsDataProvider::PreviewContext &context)
Returns whether the layer must be rendered in preview jobs.
virtual QgsRectangle extent() const =0
Returns the extent of the layer.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
A rectangle specified with double values.
Defines a set of tile matrices for multiple zoom levels.
Stores coordinates of a tile in a tile matrix set.
Shared data class for vector tile layer data providers.
QgsVectorTileDataProviderSharedData()
void storeCachedTileData(const QgsVectorTileRawData &data)
Stores raw tile data in the shared cache.
QCache< QgsTileXYZ, QgsVectorTileRawData > mTileCache
bool getCachedTileData(QgsVectorTileRawData &data, QgsTileXYZ id)
Retrieves previously cached raw tile data for a tile with matching id.
QMutex mMutex
Access to all data members is guarded by the mutex.
Base class for vector tile layer data providers.
virtual QString sourcePath() const =0
Returns the source path for the data.
virtual QgsVectorTileDataProvider * clone() const =0
Returns a clone of the data provider.
virtual QList< QgsVectorTileRawData > readTiles(const QgsTileMatrixSet &tileMatrixSet, const QVector< QgsTileXYZ > &tiles, QgsFeedback *feedback=nullptr, Qgis::RendererUsage usage=Qgis::RendererUsage::Unknown) const =0
Returns raw tile data for a range of tiles.
QgsVectorTileDataProvider & operator=(const QgsVectorTileDataProvider &other)=delete
static int DATA_ZOOM
Role to set zoom attribute in the request so it can be retrieved later.
virtual const QgsVectorTileMatrixSet & tileMatrixSet() const =0
Returns the tile matrix set associated with the provider.
static int DATA_ROW
Role to set row attribute in the request so it can be retrieved later.
virtual QgsStringMap sourcePaths() const
Returns the list of source paths for the data.
static int DATA_SOURCE_ID
Role to set source ID attribute in the request so it can be retrieved later.
virtual QgsVectorTileRawData readTile(const QgsTileMatrixSet &tileMatrixSet, const QgsTileXYZ &id, QgsFeedback *feedback=nullptr) const =0
Returns raw tile data for a single tile.
static int DATA_COLUMN
Role to set column attribute in the request so it can be retrieved later.
std::shared_ptr< QgsVectorTileDataProviderSharedData > mShared
Mutable data shared between provider instances.
Encapsulates properties of a vector tile matrix set, including tile origins and scaling information.
Keeps track of raw tile data from one or more sources that need to be decoded.
QMap< QString, QString > QgsStringMap
Stores settings related to the context in which a preview job runs.
Setting options for creating vector data providers.