Class: QgsProcessingToolboxProxyModel

A sort/filter proxy model for providers and algorithms shown within the Processing toolbox, which automatically sorts the toolbox in a logical fashion and supports filtering the results.

Added in version 3.4.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsProcessingToolboxProxyModel

Base classes

QSortFilterProxyModel

QAbstractProxyModel

QAbstractItemModel

QObject

Enums

Filter

Available filter flags for filtering the model

Methods

filterString

Returns the current filter string, if set.

filters

Returns any filters that affect how toolbox content is filtered.

setFilterString

Sets a filter string, such that only algorithms matching the specified string will be shown.

setFilters

Set filters that affect how toolbox content is filtered.

setInPlaceLayer

Sets the vector layer for in-place algorithm filter

toolboxModel

Returns the underlying source Processing toolbox model.

class qgis.gui.QgsProcessingToolboxProxyModel[source]

Bases: QSortFilterProxyModel

__init__(parent: QObject | None = None, registry: QgsProcessingRegistry | None = None, recentLog: QgsProcessingRecentAlgorithmLog | None = None, favoriteManager: QgsProcessingFavoriteAlgorithmManager | None = None)

Constructor for QgsProcessingToolboxProxyModel, with the given parent object.

If registry is specified then the model will show providers and algorithms from the given registry. If no registry is specified, then the processing registry attached to QgsApplication.processingRegistry() will be used by the model.

If recentLog is specified then it will be used to create a “Recently used” top level group containing recently used algorithms.

If favoriteManager is specified then it will be used to create a “Favorites” top level group containing favorite algorithms. SInce QGIS 3.40

Parameters:
class Filter(*values)

Bases: IntEnum

Available filter flags for filtering the model

  • Toolbox: Filters out any algorithms and content which should not be shown in the toolbox

    Available as QgsProcessingToolboxProxyModel.FilterToolbox in older QGIS releases.

  • Modeler: Filters out any algorithms and content which should not be shown in the modeler

    Available as QgsProcessingToolboxProxyModel.FilterModeler in older QGIS releases.

  • InPlace: Only show algorithms which support in-place edits

    Available as QgsProcessingToolboxProxyModel.FilterInPlace in older QGIS releases.

  • ShowKnownIssues: Show algorithms with known issues (hidden by default)

    Available as QgsProcessingToolboxProxyModel.FilterShowKnownIssues in older QGIS releases.

class Filters
class Filters(f: QgsProcessingToolboxProxyModel.Filters | QgsProcessingToolboxProxyModel.Filter)
class Filters(a0: QgsProcessingToolboxProxyModel.Filters)

Bases: object

filterString(self) str[source]

Returns the current filter string, if set.

Return type:

str

filters(self) QgsProcessingToolboxProxyModel.Filters[source]

Returns any filters that affect how toolbox content is filtered.

See also

setFilters()

Return type:

QgsProcessingToolboxProxyModel.Filters

setFilterString(self, filter: str | None)[source]

Sets a filter string, such that only algorithms matching the specified string will be shown.

Matches are performed using a variety of tests, including checking against the algorithm name, short description, tags, etc.

See also

filterString()

Parameters:

filter (Optional[str])

setFilters(self, filters: QgsProcessingToolboxProxyModel.Filters | QgsProcessingToolboxProxyModel.Filter)[source]

Set filters that affect how toolbox content is filtered.

See also

filters()

Parameters:

filters (Union[QgsProcessingToolboxProxyModel.Filters, QgsProcessingToolboxProxyModel.Filter])

setInPlaceLayer(self, layer: QgsVectorLayer | None)[source]

Sets the vector layer for in-place algorithm filter

Parameters:

layer (Optional[QgsVectorLayer])

toolboxModel(self) QgsProcessingToolboxModel | None[source]

Returns the underlying source Processing toolbox model.

Return type:

Optional[QgsProcessingToolboxModel]