Subgroup: Plugin
Class: QgsPluginLayer¶
-
class
qgis.core.
QgsPluginLayer
¶ Bases:
qgis._core.QgsMapLayer
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”
Methods
abstract
Returns the abstract of the layer used by QGIS Server in GetCapabilities request. appendError
attribution
Returns the attribution of the layer used by QGIS Server in GetCapabilities request. attributionUrl
Returns the attribution URL of the layer used by QGIS Server in GetCapabilities request. autoRefreshInterval
Returns the auto refresh interval (in milliseconds). blendMode
Returns the current blending mode for a layer. blockSignals
childEvent
children
clone
Returns a new instance equivalent to this one. connectNotify
createMapRenderer
Return new instance of QgsMapLayerRenderer that will be used for rendering of given context crs
Returns the layer’s spatial reference system. customEvent
customProperty
Read a custom property from layer. customPropertyKeys
Returns list of all keys within custom properties. dataProvider
Returns the layer’s data provider. dataUrl
Returns the DataUrl of the layer used by QGIS Server in GetCapabilities request. dataUrlFormat
Returns the DataUrl format of the layer used by QGIS Server in GetCapabilities request. deleteLater
dependencies
Gets the list of dependencies. disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
emitStyleChanged
Triggers an emission of the styleChanged() signal. error
Get current status error. event
eventFilter
exportNamedMetadata
Export the current metadata of this layer as named metadata in a QDomDocument exportNamedStyle
Export the properties of this layer as named style in a QDomDocument exportSldStyle
Export the properties of this layer as SLD style in a QDomDocument extensionPropertyType
Returns the extension of a Property. extent
Returns the extent of the layer. findChild
findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren
findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] formatLayerName
A convenience function to capitalize and format a layer name
.hasAutoRefreshEnabled
Returns true if auto refresh is enabled for the layer. hasDependencyCycle
hasScaleBasedVisibility
Returns whether scale based visibility is enabled for the layer. htmlMetadata
Obtain a formatted HTML string containing assorted metadata for this layer. id
Returns the layer’s unique ID, which is used to access this layer from QgsProject
.importNamedMetadata
Import the metadata of this layer from a QDomDocument importNamedStyle
Import the properties of this layer from a QDomDocument inherits
installEventFilter
isEditable
Returns true if the layer can be edited. isInScaleRange
Tests whether the layer should be visible at the specified scale
.isRefreshOnNotifyEnabled
Returns true if the refresh on provider nofification is enabled isSignalConnected
isSpatial
Returns true if the layer is considered a spatial layer, ie it has some form of geometry associated with it. isValid
Return the status of the layer. isWidgetType
isWindowType
keywordList
Returns the keyword list of the layer used by QGIS Server in GetCapabilities request. killTimer
legend
Can be null. legendUrl
Returns the URL for the layer’s legend. legendUrlFormat
Returns the format for a URL based layer legend. loadDefaultMetadata
Retrieve the default metadata for this layer if one loadDefaultStyle
Retrieve the default style for this layer if one loadNamedMetadata
Retrieve a named metadata for this layer if one loadNamedMetadataFromDatabase
Retrieve a named metadata for this layer from a sqlite database. loadNamedStyle
Retrieve a named style for this layer if one loadNamedStyleFromDatabase
Retrieve a named style for this layer from a sqlite database. loadSldStyle
Attempts to style the layer using the formatting from an SLD type file. maximumScale
Returns the maximum map scale (i.e. metaObject
metadata
Returns a reference to the layer’s metadata store. metadataUri
Retrieve the metadata URI for this layer metadataUrl
Returns the metadata URL of the layer used by QGIS Server in GetCapabilities request. metadataUrlFormat
Returns the metadata format of the layer used by QGIS Server in GetCapabilities request. metadataUrlType
Returns the metadata type of the layer used by QGIS Server in GetCapabilities request. minimumScale
Returns the minimum map scale (i.e. moveToThread
name
Returns the display name of the layer. objectName
parent
pluginLayerType
Return plugin layer type (the same as used in QgsPluginLayerRegistry) property
publicSource
Gets a version of the internal layer definition that has sensitive bits removed (for example, the password). pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. readCommonStyle
readCustomProperties
readLayerXml
Sets state from Dom document readOnly
Returns if this layer is read only. readSld
readStyle
Read the style for the current layer from the Dom node supplied. readStyleManager
readSymbology
Read the symbology for the current layer from the Dom node supplied. readXml
receivers
refreshOnNotifyMessage
Returns the message that should be notified by the provider to triggerRepaint reload
Synchronises with changes in the datasource removeCustomProperty
Remove a custom property from layer. removeEventFilter
renderer3D
Returns 3D renderer associated with the layer. resolveReferences
Resolve references to other layers (kept as layer IDs after reading XML) into layer objects. saveDefaultMetadata
Save the current metadata of this layer as the default metadata saveDefaultStyle
Save the properties of this layer as the default style saveNamedMetadata
Save the current metadata of this layer as a named metadata saveNamedStyle
Save the properties of this layer as a named style saveSldStyle
Saves the properties of this layer to an SLD format file. sender
senderSignalIndex
setAbstract
Sets the abstract of the layer used by QGIS Server in GetCapabilities request. setAttribution
Sets the attribution of the layer used by QGIS Server in GetCapabilities request. setAttributionUrl
Sets the attribution URL of the layer used by QGIS Server in GetCapabilities request. setAutoRefreshEnabled
Sets whether auto refresh is enabled for the layer. setAutoRefreshInterval
Sets the auto refresh interval (in milliseconds) for the layer. setBlendMode
Set the blending mode used for rendering a layer. setCrs
Sets layer’s spatial reference system setCustomProperties
Set custom properties for layer. setCustomProperty
Set a custom property for layer. setDataUrl
Sets the DataUrl of the layer used by QGIS Server in GetCapabilities request. setDataUrlFormat
Sets the DataUrl format of the layer used by QGIS Server in GetCapabilities request. setDependencies
Sets the list of dependencies. setError
setExtent
Set extent of the layer setKeywordList
Sets the keyword list of the layer used by QGIS Server in GetCapabilities request. setLayerOrder
Reorders the previously selected sublayers of this layer from bottom to top. setLegend
Assign a legend controller to the map layer. setLegendUrl
Sets the URL for the layer’s legend. setLegendUrlFormat
Sets the format for a URL based layer legend. setMaximumScale
Sets the maximum map scale
(i.e.setMetadata
Sets the layer’s metadata
store.setMetadataUrl
Sets the metadata URL of the layer used by QGIS Server in GetCapabilities request. setMetadataUrlFormat
Sets the metadata format of the layer used by QGIS Server in GetCapabilities request. setMetadataUrlType
Set the metadata type of the layer used by QGIS Server in GetCapabilities request MetadataUrlType indicates the standard to which the metadata complies. setMinimumScale
Sets the minimum map scale
(i.e.setName
Set the display name
of the layer.setObjectName
setParent
setProperty
setRefreshOnNofifyMessage
Set the notification message that triggers repaine setRefreshOnNotifyEnabled
Set whether provider notification is connected to triggerRepaint setRenderer3D
Sets 3D renderer for the layer. setScaleBasedVisibility
Sets whether scale based visibility is enabled for the layer. setShortName
Sets the short name of the layer used by QGIS Server to identify the layer. setSource
Set source string. setSubLayerVisibility
Set the visibility of the given sublayer name. setTitle
Sets the title of the layer used by QGIS Server in GetCapabilities request. setValid
shortName
Returns the short name of the layer used by QGIS Server to identify the layer. signalsBlocked
source
Returns the source for the layer. startTimer
styleManager
Get access to the layer’s style manager. styleURI
Retrieve the style URI for this layer subLayers
Returns the sublayers of this layer. thread
timerEvent
timestamp
Time stamp of data source in the moment when data/metadata were loaded by provider title
Returns the title of the layer used by QGIS Server in GetCapabilities request. tr
triggerRepaint
Will advise the map canvas (and any other interested party) that this layer requires to be repainted. type
Returns the type of the layer. undoStack
Return pointer to layer’s undo stack undoStackStyles
Return pointer to layer’s style undo stack writeCommonStyle
writeCustomProperties
writeLayerXml
Stores state in Dom node writeStyle
Write just the style information for the layer into the document writeStyleManager
writeSymbology
Write the symbology for the layer into the docment provided. writeXml
Attributes
Metadata
PluginLayer
RasterLayer
Style
VectorLayer
autoRefreshIntervalChanged
Emitted when the auto refresh interval changes. blendModeChanged
Signal emitted when the blend mode is changed, through QgsMapLayer.setBlendMode()
[signal]configChanged
Emitted whenever the configuration is changed. crsChanged
Emit a signal that layer’s CRS has been reset [signal] dataChanged
Data of layer changed [signal] dependenciesChanged
Emitted when dependencies are changed. destroyed
destroyed(self, QObject = None) [signal] legendChanged
Signal emitted when legend of the layer has changed metadataChanged
Emitted when the layer’s metadata is changed. nameChanged
Emitted when the name has been changed objectNameChanged
objectNameChanged(self, str) [signal] recalculateExtents
This is used to send a request that any mapcanvas using this layer update its extents [signal] renderer3DChanged
Signal emitted when 3D renderer associated with the layer has changed. rendererChanged
Signal emitted when renderer is changed. repaintRequested
By emitting this signal the layer tells that either appearance or content have been changed and any view showing the rendered layer should refresh itself. staticMetaObject
statusChanged
Emit a signal with status (e.g. styleChanged
Signal emitted whenever a change affects the layer’s style. willBeDeleted
Emitted in the destructor when the layer is about to be deleted, but it is still in a perfectly valid state: the last chance for other pieces of code for some cleanup if they use the layer. -
appendError
()¶
-
childEvent
()¶
-
clone
(self) → QgsPluginLayer¶ Returns a new instance equivalent to this one.
Returns: a new layer instance New in version 3.0.
-
connectNotify
()¶
-
customEvent
()¶
-
disconnectNotify
()¶
-
hasDependencyCycle
()¶
-
isSignalConnected
()¶
-
pluginLayerType
(self) → str¶ Return plugin layer type (the same as used in QgsPluginLayerRegistry)
-
readCommonStyle
()¶
-
readCustomProperties
()¶
-
readStyleManager
()¶
-
readXml
()¶
-
receivers
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setError
()¶
-
setExtent
(self, extent: QgsRectangle)¶ Set extent of the layer
-
setSource
(self, source: str)¶ Set source string. This is used for example in layer tree to show tooltip.
New in version 2.16.
-
setValid
()¶
-
timerEvent
()¶
-
writeCommonStyle
()¶
-
writeCustomProperties
()¶
-
writeStyleManager
()¶
-
writeXml
()¶
-