Class: QgsPluginLayerRegistry¶
-
class
qgis.core.
QgsPluginLayerRegistry
¶ Bases:
sip.wrapper
Constructor for QgsPluginLayerRegistry.
A registry of plugin layers types.
QgsPluginLayerRegistry
is not usually directly created, but rather accessed throughQgsApplication.pluginLayerRegistry()
Methods
Add plugin layer type (take ownership) and return
True
on successReturns new layer if corresponding plugin has been found else returns
None
.Returns plugin layer type metadata or
None
if doesn’t existList all known layer types
Remove plugin layer type and return
True
on success-
addPluginLayerType
(self, pluginLayerType: QgsPluginLayerType) → bool¶ Add plugin layer type (take ownership) and return
True
on success- Parameters
pluginLayerType (QgsPluginLayerType) –
- Return type
bool
-
createLayer
(self, typeName: str, uri: str = '') → QgsPluginLayer¶ Returns new layer if corresponding plugin has been found else returns
None
.Note
parameter uri has been added in QGIS 2.10
- Parameters
typeName (str) –
uri (str = '') –
- Return type
-
pluginLayerType
(self, typeName: str) → QgsPluginLayerType¶ Returns plugin layer type metadata or
None
if doesn’t exist- Parameters
typeName (str) –
- Return type
-
pluginLayerTypes
(self) → List[str]¶ List all known layer types
- Return type
List[str]
-
removePluginLayerType
(self, typeName: str) → bool¶ Remove plugin layer type and return
True
on success- Parameters
typeName (str) –
- Return type
bool
-