Class: QgsPluginLayer¶
Base class for plugin layers.
These can be implemented by plugins and registered in
QgsPluginLayerRegistry.
In order to be readable from project files, they should set these attributes in layer DOM node:
“type” = “plugin”
“name” = “your_layer_type”
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: QgsMapLayer.createMapRenderer(), QgsMapLayer.readSymbology(), QgsMapLayer.setTransformContext(), QgsMapLayer.writeSymbology()
Class Hierarchy¶
Base classes¶
Base class for all map layer types. |
|
Abstract Methods
Returns a new instance equivalent to this one. |
Methods
Returns plugin layer type (the same as used in |
|
Set source string. |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsPluginLayer. See the FAQ for more details.
Returns an icon for the layer. |
|
Sets extent of the layer |
- class qgis.core.QgsPluginLayer[source]¶
Bases:
QgsMapLayer- abstract clone(self) QgsPluginLayer | None[source]¶
Returns a new instance equivalent to this one.
- Return type:
Optional[QgsPluginLayer]
- Returns:
a new layer instance
- virtual icon(self) QIcon[source]¶
Returns an icon for the layer.
Added in version 3.42.
- Return type:
QIcon
- pluginLayerType(self) str[source]¶
Returns plugin layer type (the same as used in
QgsPluginLayerRegistry)- Return type:
str
- virtual setExtent(self, extent: QgsRectangle)[source]¶
Sets extent of the layer
- Parameters:
extent (QgsRectangle)