Class: QgsProcessingToolboxAction

A custom action to show in the Processing toolbox.

Added in version 4.4.

List of all members, including inherited members

Constructor

__init__

Methods

actionName

Returns the action's (translated, user visible) name.

data

Returns the parent toolbox widget the action will be shown in.

groupName

Returns the action's (translated, user visible) group name.

setActionName

Sets the action's (translated, user visible) name.

setData

Sets the parent toolbox widget the action will be shown in.

setGroupName

Sets the action's (translated, user visible) group name.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsProcessingToolboxAction. See the FAQ for more details.

execute

Executes the action.

getIcon

Returns the icon to use for the action.

icon

Returns the icon to use for the action.

trigger

Triggers the action.

class qgis.gui.QgsProcessingToolboxAction[source]

Bases: object

__init__(name: str | None = '', group: str | None = '')

Constructor for QgsProcessingToolboxAction.

Parameters:
  • name (str|None = '')

  • group (str|None = '')

__init__(a0: QgsProcessingToolboxAction)
Parameters:

a0 (QgsProcessingToolboxAction)

actionName(self) → str[source]

Returns the action’s (translated, user visible) name.

Return type:

str

data(self) → QgsDockWidget | None[source]

Returns the parent toolbox widget the action will be shown in.

Deprecated since version 4.4.

Return type:

QgsDockWidget|None

virtual execute(self)[source]

Executes the action.

Deprecated since version 4.4: Use trigger() instead.

virtual getIcon(self) → QIcon[source]

Returns the icon to use for the action.

Deprecated since version 4.4: Use icon() instead.

Return type:

QIcon

property group

Returns the action’s (translated, user visible) group name.

Return type:

str

groupName(self) → str[source]

Returns the action’s (translated, user visible) group name.

Return type:

str

virtual icon(self) → QIcon[source]

Returns the icon to use for the action.

Return type:

QIcon

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, widget: QgsDockWidget | None)[source]

Sets the parent toolbox widget the action will be shown in.

Deprecated since version 4.4.

Parameters:

widget (QgsDockWidget|None)

setGroupName(self, group: str | None)[source]

Sets the action’s (translated, user visible) group name.

Deprecated since version 4.4: Use the constructor setter instead.

Parameters:

group (str|None)

property toolbox

Returns the parent toolbox widget 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)