Class: QgsProcessingToolboxContextAction¶
A custom action to show in the context menu for the Processing toolbox.
Added in version 4.4.
List of all members, including inherited members
Constructor
Methods
Returns the action's (translated, user visible) name. |
|
Returns the associated algorithm the action will be shown for. |
|
Returns the parent toolbox the action will be shown in. |
|
Returns |
|
Sets the action's (translated, user visible) name. |
|
Sets the associated algorithm and toolbox the action will be shown for. |
|
Sets whether the action is a separator action. |
|
Sets the associated algorithm the action will be shown for. |
|
Sets the parent toolbox the action will be shown in. |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsProcessingToolboxContextAction. See the FAQ for more details.
Executes the action. |
|
Returns the icon to use for the action. |
|
Returns |
|
Returns |
|
Triggers the action. |
- class qgis.gui.QgsProcessingToolboxContextAction[source]¶
Bases:
object- __init__(name: str | None = '')¶
Constructor for QgsProcessingToolboxContextAction.
- Parameters:
name (str|None = '')
- __init__(a0: QgsProcessingToolboxContextAction)
- Parameters:
- actionName(self) str[source]¶
Returns the action’s (translated, user visible) name.
- Return type:
str
- virtual execute(self)[source]¶
Executes the action.
Deprecated since version 4.4: Use
trigger()instead.
- getItemData(self) QgsProcessingAlgorithm | None[source]¶
Returns the associated algorithm the action will be shown for.
Deprecated since version 4.4.
- Return type:
- getToolbox(self) QgsDockWidget | None[source]¶
Returns the parent toolbox the action will be shown in.
Deprecated since version 4.4.
- Return type:
QgsDockWidget|None
- virtual isCompatibleWithAlgorithm(self, providerId: str | None, algorithmName: str | None) bool[source]¶
Returns
Trueif the action is compatible with the specified provider and algorithm.- Parameters:
providerId (str|None)
algorithmName (str|None)
- Return type:
bool
- virtual isEnabled(self) bool[source]¶
Returns
Trueif the action is enabled.Deprecated since version 4.4.
- Return type:
bool
- isSeparator(self) bool[source]¶
Returns
Trueif the action is a separator action.See also
- Return type:
bool
- property is_separator¶
Returns
Trueif the action is a separator action.See also
- Return type:
bool
- property itemData¶
Returns the associated algorithm the action will be shown for.
Deprecated since version 4.4.
- Return type:
- setActionName(self, name: str | None)[source]¶
Sets the action’s (translated, user visible) name.
Deprecated since version 4.4: Use the constructor setter instead.
- Parameters:
name (str|None)
- setData(self, data: QgsProcessingAlgorithm | None, toolbox: QgsDockWidget | None)[source]¶
Sets the associated algorithm and toolbox the action will be shown for.
Deprecated since version 4.4.
- Parameters:
data (QgsProcessingAlgorithm|None)
toolbox (QgsDockWidget|None)
- setIsSeparator(self, isSeparator: bool)[source]¶
Sets whether the action is a separator action.
See also
- Parameters:
isSeparator (bool)
- setItemData(self, data: QgsProcessingAlgorithm | None)[source]¶
Sets the associated algorithm the action will be shown for.
Deprecated since version 4.4.
- Parameters:
data (QgsProcessingAlgorithm|None)
- setToolbox(self, toolbox: QgsDockWidget | None)[source]¶
Sets the parent toolbox the action will be shown in.
Deprecated since version 4.4.
- Parameters:
toolbox (QgsDockWidget|None)
- property toolbox¶
Returns the parent toolbox the action will be shown in.
Deprecated since version 4.4.
- Return type:
QgsDockWidget|None
- virtual trigger(self, context: QgsProcessingActionContext)[source]¶
Triggers the action.
- Parameters:
context (QgsProcessingActionContext)