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¶
Base classes¶
Enums
Available filter flags for filtering the model |
Methods
Returns the current filter string, if set. |
|
Returns any filters that affect how toolbox content is filtered. |
|
Sets a filter string, such that only algorithms matching the specified string will be shown. |
|
Set filters that affect how toolbox content is filtered. |
|
Sets the vector layer for in-place algorithm filter |
|
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 toQgsApplication.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:
parent (Optional[QObject] = None)
registry (Optional[QgsProcessingRegistry] = None)
recentLog (Optional[QgsProcessingRecentAlgorithmLog] = None)
favoriteManager (Optional[QgsProcessingFavoriteAlgorithmManager] = None)
- 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 toolboxAvailable as
QgsProcessingToolboxProxyModel.FilterToolbox
in older QGIS releases.Modeler
: Filters out any algorithms and content which should not be shown in the modelerAvailable as
QgsProcessingToolboxProxyModel.FilterModeler
in older QGIS releases.InPlace
: Only show algorithms which support in-place editsAvailable 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.
See also
- Return type:
str
- filters(self) QgsProcessingToolboxProxyModel.Filters [source]¶
Returns any filters that affect how toolbox content is filtered.
See also
- Return type:
- 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
- Parameters:
filter (Optional[str])
- setFilters(self, filters: QgsProcessingToolboxProxyModel.Filters | QgsProcessingToolboxProxyModel.Filter)[source]¶
Set
filters
that affect how toolbox content is filtered.See also
- 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]