Class: QgsProcessingToolboxTreeView

Processing toolbox tree view, showing algorithms and providers in a tree structure.

Warning

Not part of stable API and may change in future QGIS releases.

Added in version 3.4.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsProcessingToolboxTreeView

Base classes

QTreeView

QAbstractItemView

QAbstractScrollArea

QFrame

QWidget

QObject

QPaintDevice

Methods

algorithmForIndex

Returns the algorithm at the specified tree view index, or None if the index does not correspond to an algorithm.

filters

Returns the current filters controlling the view's contents.

selectedAlgorithm

Returns the currently selected algorithm in the tree view, or None if no algorithm is currently selected.

setFilterString

Sets a filter string, used to filter out the contents of the view to matching algorithms.

setFilters

Sets filters controlling the view's contents.

setInPlaceLayer

Sets the vector layer for the in-place algorithms

setRegistry

Sets the processing registry associated with the view.

setToolboxProxyModel

Sets the toolbox proxy model used to drive the view.

class qgis.gui.QgsProcessingToolboxTreeView[source]

Bases: QTreeView

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

Constructor for QgsProcessingToolboxTreeView, with the specified parent widget.

If registry is set, then the view will automatically be populated with algorithms and providers from the registry. Otherwise, users must manually call setRegistry() to associate a registry with the view.

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:
algorithmForIndex(self, index: QModelIndex) QgsProcessingAlgorithm | None[source]

Returns the algorithm at the specified tree view index, or None if the index does not correspond to an algorithm.

Parameters:

index (QModelIndex)

Return type:

Optional[QgsProcessingAlgorithm]

filters(self) QgsProcessingToolboxProxyModel.Filters[source]

Returns the current filters controlling the view’s contents.

See also

setFilters()

Added in version 3.8.

Return type:

QgsProcessingToolboxProxyModel.Filters

selectedAlgorithm(self) QgsProcessingAlgorithm | None[source]

Returns the currently selected algorithm in the tree view, or None if no algorithm is currently selected.

Return type:

Optional[QgsProcessingAlgorithm]

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

Sets a filter string, used to filter out the contents of the view to matching algorithms.

Parameters:

filter (Optional[str])

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

Sets filters controlling the view’s contents.

See also

filters()

Parameters:

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

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

Sets the vector layer for the in-place algorithms

Parameters:

layer (Optional[QgsVectorLayer])

setRegistry(self, registry: QgsProcessingRegistry | None, recentLog: QgsProcessingRecentAlgorithmLog | None = None, favoriteManager: QgsProcessingFavoriteAlgorithmManager | None = None)[source]

Sets the processing registry associated with the view.

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:
setToolboxProxyModel(self, model: QgsProcessingToolboxProxyModel | None)[source]

Sets the toolbox proxy model used to drive the view.

Parameters:

model (Optional[QgsProcessingToolboxProxyModel])