18#ifndef QGSTILEDSCENELAYER_H
19#define QGSTILEDSCENELAYER_H
80 const QString &baseName = QString(),
81 const QString &provider = QString(),
90 SIP_PYOBJECT __repr__();
92 QString str = QStringLiteral(
"<QgsTiledSceneLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider() ? sipCpp->dataProvider()->name() : QStringLiteral(
"Invalid" ) );
93 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
103 bool readSymbology( const QDomNode &node, QString &errorMessage,
144 void setDataSourcePrivate( const QString &dataSource, const QString &baseName, const QString &provider, const
QgsDataProvider::ProviderOptions &options,
Qgis::DataProviderReadFlags
flags ) override;
148 bool isReadOnly() const override;
154 std::unique_ptr<QgsTiledSceneDataProvider> mDataProvider;
155 std::unique_ptr<QgsTiledSceneRenderer> mRenderer;
Provides global constants and enumerations for use throughout the application.
Contains information about the context in which a coordinate transform is executed.
Abstract base class for spatial data provider implementations.
Base class for storage of map layer elevation properties.
Base class for utility classes that encapsulate information necessary for rendering of map layers.
QString source() const
Returns the source for the layer.
QgsMapLayer(Qgis::LayerType type=Qgis::LayerType::Vector, const QString &name=QString(), const QString &source=QString())
Constructor for QgsMapLayer.
QFlags< StyleCategory > StyleCategories
QgsCoordinateTransformContext transformContext() const
Returns the layer data provider coordinate transform context or a default transform context if the la...
QgsMapLayer::LayerFlags flags
virtual QgsMapLayer * clone() const =0
Returns a new instance equivalent to this one except for the id which is still unique.
A container for the context for various read/write operations on objects.
A rectangle specified with double values.
Contains information about the context of a rendering operation.
Base class for data providers for QgsTiledSceneLayer.
Tiled scene layer specific subclass of QgsMapLayerElevationProperties.
Qgis::MapLayerProperties properties() const override
Returns the map layer properties of this layer.
void setTransformContext(const QgsCoordinateTransformContext &transformContext) override
Sets the coordinate transform context to transformContext.
QgsTiledSceneLayer(const QString &uri=QString(), const QString &baseName=QString(), const QString &provider=QString(), const QgsTiledSceneLayer::LayerOptions &options=QgsTiledSceneLayer::LayerOptions())
Constructor for QgsTiledSceneLayer.
QString htmlMetadata() const override
Obtain a formatted HTML string containing assorted metadata for this layer.
bool readSymbology(const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) override
Read the symbology for the current layer from the DOM node supplied.
QString loadDefaultStyle(bool &resultFlag) final
Retrieve the default style for this layer if one exists (either as a .qml file on disk or as a record...
QgsRectangle extent() const override
Returns the extent of the layer.
QString decodedSource(const QString &source, const QString &dataProvider, const QgsReadWriteContext &context) const override
Called by readLayerXML(), used by derived classes to decode provider's specific data source from proj...
QgsTiledSceneLayer & operator=(QgsTiledSceneLayer const &other)=delete
void setRenderer(QgsTiledSceneRenderer *renderer)
Sets the 2D renderer for the tiled scene.
QgsMapLayerElevationProperties * elevationProperties() override
Returns the layer's elevation properties.
QgsTiledSceneLayer(const QgsTiledSceneLayer &other)=delete
QString loadDefaultMetadata(bool &resultFlag) override
Retrieve the default metadata for this layer if one exists (either as a .qmd file on disk or as a rec...
QgsTiledSceneDataProvider * dataProvider() override
Returns the layer's data provider, it may be nullptr.
bool readStyle(const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) final
Read the style for the current layer from the DOM node supplied.
bool writeSymbology(QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) const override
Write the style for the layer into the document provided.
QString encodedSource(const QString &source, const QgsReadWriteContext &context) const override
Called by writeLayerXML(), used by derived classes to encode provider's specific data source to proje...
bool writeStyle(QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) const final
Write just the symbology information for the layer into the document.
~QgsTiledSceneLayer() override
QgsTiledSceneRenderer * renderer()
Returns the 2D renderer for the tiled scene.
bool writeXml(QDomNode &layerNode, QDomDocument &doc, const QgsReadWriteContext &context) const override
Called by writeLayerXML(), used by children to write state specific to them to project files.
bool readXml(const QDomNode &layerNode, QgsReadWriteContext &context) override
Called by readLayerXML(), used by children to read state specific to them from project files.
QgsMapLayerRenderer * createMapRenderer(QgsRenderContext &rendererContext) override
Returns new instance of QgsMapLayerRenderer that will be used for rendering of given context.
Abstract base class for 2d tiled scene renderers.
Setting options for loading tiled scene layers.
bool loadDefaultStyle
Set to true if the default layer style should be loaded.
QgsCoordinateTransformContext transformContext
Coordinate transform context.
bool skipCrsValidation
Controls whether the layer is allowed to have an invalid/unknown CRS.
LayerOptions(const QgsCoordinateTransformContext &transformContext=QgsCoordinateTransformContext())
Constructor for LayerOptions with optional transformContext.