Class: QgsMapLayerActionRegistry¶
- class qgis.gui.QgsMapLayerActionRegistry¶
Bases:
PyQt5.QtCore.QObject
This class tracks map layer actions.
QgsMapLayerActionRegistry
is not usually directly created, but rather accessed throughQgsGui.mapLayerActionRegistry()
.QgsMapLayerActionRegistry(parent: QObject = None) Constructor for QgsMapLayerActionRegistry.
QgsMapLayerActionRegistry
is not usually directly created, but rather accessed throughQgsGui.mapLayerActionRegistry()
.Methods
Adds a map layer action to the registry
Returns the default action for a layer
Returns the map layer actions which can run on the specified layer
Removes a map layer action from the registry
Sets the default action for a layer
Signals
Triggered when an action is added or removed from the registry [signal]
- addMapLayerAction(self, action: QgsMapLayerAction)¶
Adds a map layer action to the registry
- Parameters
action (QgsMapLayerAction) –
- changed¶
Triggered when an action is added or removed from the registry [signal]
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- defaultActionForLayer(self, layer: QgsMapLayer) QgsMapLayerAction ¶
Returns the default action for a layer
- Parameters
layer (QgsMapLayer) –
- Return type
- disconnectNotify(self, QMetaMethod)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- mapLayerActions(self, layer: QgsMapLayer, targets: Union[QgsMapLayerAction.Targets, QgsMapLayerAction.Target] = QgsMapLayerAction.AllActions) List[QgsMapLayerAction] ¶
Returns the map layer actions which can run on the specified layer
- Parameters
layer (QgsMapLayer) –
targets (Union[QgsMapLayerAction.Targets) –
- Return type
List[QgsMapLayerAction]
- receivers(self, PYQT_SIGNAL) int ¶
- removeMapLayerAction(self, action: QgsMapLayerAction) bool ¶
Removes a map layer action from the registry
- Parameters
action (QgsMapLayerAction) –
- Return type
bool
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setDefaultActionForLayer(self, layer: QgsMapLayer, action: QgsMapLayerAction)¶
Sets the default action for a layer
- Parameters
layer (QgsMapLayer) –
action (QgsMapLayerAction) –
- timerEvent(self, QTimerEvent)¶