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¶
Base classes¶
Methods
Returns the algorithm at the specified tree view index, or |
|
Returns the current filters controlling the view's contents. |
|
Returns the model parameter at the specified tree view index, or |
|
Returns the currently selected algorithm in the tree view, or |
|
Returns the currently selected model parameter in the tree view, or |
|
Sets a filter string, used to filter out the contents of the view to matching algorithms. |
|
Sets filters controlling the view's contents. |
|
Sets the vector layer for the in-place algorithms |
|
Sets the processing registry associated with the view. |
|
Sets the toolbox proxy model used to drive the view. |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsProcessingToolboxTreeView. See the FAQ for more details.
Expands the tree view if a filter string is set after the view is reset. |
- 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
parentwidget.If
registryis set, then the view will automatically be populated with algorithms and providers from the registry. Otherwise, users must manually callsetRegistry()to associate a registry with the view.If
recentLogis specified then it will be used to create a “Recently used” top level group containing recently used algorithms.If
favoriteManageris specified then it will be used to create a “Favorites” top level group containing favorite algorithms. Since QGIS 3.40- Parameters:
parent (Optional[QWidget] = None)
registry (Optional[QgsProcessingRegistry] = None)
recentLog (Optional[QgsProcessingRecentAlgorithmLog] = None)
favoriteManager (Optional[QgsProcessingFavoriteAlgorithmManager] = None)
- algorithmForIndex(self, index: QModelIndex) QgsProcessingAlgorithm | None[source]¶
Returns the algorithm at the specified tree view
index, orNoneif 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
Added in version 3.8.
- Return type:
- parameterTypeForIndex(self, index: QModelIndex) QgsProcessingParameterType | None[source]¶
Returns the model parameter at the specified tree view
index, orNoneif the index does not correspond to a model parameter.Added in version 3.44.
- Parameters:
index (QModelIndex)
- Return type:
Optional[QgsProcessingParameterType]
- virtual reset(self)[source]¶
Expands the tree view if a filter string is set after the view is reset.
- selectedAlgorithm(self) QgsProcessingAlgorithm | None[source]¶
Returns the currently selected algorithm in the tree view, or
Noneif no algorithm is currently selected.- Return type:
Optional[QgsProcessingAlgorithm]
- selectedParameterType(self) QgsProcessingParameterType | None[source]¶
Returns the currently selected model parameter in the tree view, or
Noneif no model parameter is currently selected.Added in version 3.44.
- Return type:
Optional[QgsProcessingParameterType]
- setFilterString(self, filter: str | None)[source]¶
Sets a
filterstring, 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
filterscontrolling the view’s contents.See also
- Parameters:
filters (Union[QgsProcessingToolboxProxyModel.Filters, QgsProcessingToolboxProxyModel.Filter])
- setInPlaceLayer(self, layer: QgsVectorLayer | None)[source]¶
Sets the vector
layerfor 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
registryassociated with the view.If
recentLogis specified then it will be used to create a “Recently used” top level group containing recently used algorithms.If
favoriteManageris specified then it will be used to create a “Favorites” top level group containing favorite algorithms. Since QGIS 3.40- Parameters:
registry (Optional[QgsProcessingRegistry])
recentLog (Optional[QgsProcessingRecentAlgorithmLog] = None)
favoriteManager (Optional[QgsProcessingFavoriteAlgorithmManager] = None)
- setToolboxProxyModel(self, model: QgsProcessingToolboxProxyModel | None)[source]¶
Sets the toolbox proxy model used to drive the view.
- Parameters:
model (Optional[QgsProcessingToolboxProxyModel])