QgsProcessingToolboxProxyModel class
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.
Contents
Public types
- enum Filter { FilterToolbox = 1 << 1, FilterModeler = 1 << 2, FilterInPlace = 1 << 3 }
- Available filter flags for filtering the model.
Constructors, destructors, conversion operators
- QgsProcessingToolboxProxyModel(QObject* parent = nullptr, QgsProcessingRegistry* registry = nullptr, QgsProcessingRecentAlgorithmLog* recentLog = nullptr) explicit
- Constructor for QgsProcessingToolboxProxyModel, with the given parent object.
Public functions
- auto filters() const -> Filters
- Returns any filters that affect how toolbox content is filtered.
- auto filterString() const -> QString
- Returns the current filter string, if set.
- void setFilters(QgsProcessingToolboxProxyModel::Filters filters)
- Set filters that affect how toolbox content is filtered.
- void setFilterString(const QString& filter)
- Sets a filter string, such that only algorithms matching the specified string will be shown.
- void setInPlaceLayer(QgsVectorLayer* layer)
- Sets the vector layer for in-place algorithm filter.
- auto toolboxModel() -> QgsProcessingToolboxModel*
- Returns the underlying source Processing toolbox model.
Enum documentation
enum QgsProcessingToolboxProxyModel:: Filter
Available filter flags for filtering the model.
| Enumerators | |
|---|---|
| FilterToolbox |
Filters out any algorithms and content which should not be shown in the toolbox. |
| FilterModeler |
Filters out any algorithms and content which should not be shown in the modeler. |
| FilterInPlace |
Only show algorithms which support in-place edits. |
Function documentation
QgsProcessingToolboxProxyModel:: QgsProcessingToolboxProxyModel(QObject* parent = nullptr,
QgsProcessingRegistry* registry = nullptr,
QgsProcessingRecentAlgorithmLog* recentLog = nullptr) explicit
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::
If recentLog is specified then it will be used to create a "Recently used" top level group containing recently used algorithms.
Filters QgsProcessingToolboxProxyModel:: filters() const
Returns any filters that affect how toolbox content is filtered.
QString QgsProcessingToolboxProxyModel:: filterString() const
Returns the current filter string, if set.
void QgsProcessingToolboxProxyModel:: setFilters(QgsProcessingToolboxProxyModel::Filters filters)
Set filters that affect how toolbox content is filtered.
void QgsProcessingToolboxProxyModel:: setFilterString(const QString& filter)
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.