|
QGIS API Documentation 4.1.0-Master (5bf3c20f3c9)
|
A proxy model for providers and algorithms shown within the Processing toolbox. More...
#include <qgsprocessingtoolboxmodel.h>

Public Types | |
| enum class | Filter : int { Toolbox = 1 << 1 , Modeler = 1 << 2 , InPlace = 1 << 3 , ShowKnownIssues = 1 << 4 } |
| Available filter flags for filtering the model. More... | |
| typedef QFlags< Filter > | Filters |
Public Member Functions | |
| QgsProcessingToolboxProxyModel (QObject *parent=nullptr, QgsProcessingRegistry *registry=nullptr, QgsProcessingRecentAlgorithmLog *recentLog=nullptr, QgsProcessingFavoriteAlgorithmManager *favoriteManager=nullptr) | |
| Constructor for QgsProcessingToolboxProxyModel, with the given parent object. | |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override |
| Filters | filters () const |
| Returns any filters that affect how toolbox content is filtered. | |
| QString | filterString () const |
| Returns the current filter string, if set. | |
| bool | lessThan (const QModelIndex &left, const QModelIndex &right) const override |
| 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. | |
| QgsProcessingToolboxModel * | toolboxModel () |
| Returns the underlying source Processing toolbox model. | |
| const QgsProcessingToolboxModel * | toolboxModel () const |
| Returns the underlying source Processing toolbox model. | |
A proxy model for providers and algorithms shown within the Processing toolbox.
The model automatically sorts the toolbox in a logical fashion and supports filtering the results.
Definition at line 516 of file qgsprocessingtoolboxmodel.h.
| typedef QFlags< Filter > QgsProcessingToolboxProxyModel::Filters |
Definition at line 532 of file qgsprocessingtoolboxmodel.h.
|
strong |
Available filter flags for filtering the model.
| Enumerator | |
|---|---|
| Toolbox | Filters out any algorithms and content which should not be shown in the toolbox. |
| Modeler | Filters out any algorithms and content which should not be shown in the modeler. |
| InPlace | Only show algorithms which support in-place edits. |
| ShowKnownIssues | Show algorithms with known issues (hidden by default). |
Definition at line 524 of file qgsprocessingtoolboxmodel.h.
|
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::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
Definition at line 830 of file qgsprocessingtoolboxmodel.cpp.
|
override |
Definition at line 1056 of file qgsprocessingtoolboxmodel.cpp.
|
override |
Definition at line 875 of file qgsprocessingtoolboxmodel.cpp.
|
inline |
Returns any filters that affect how toolbox content is filtered.
Definition at line 578 of file qgsprocessingtoolboxmodel.h.
|
inline |
Returns the current filter string, if set.
Definition at line 601 of file qgsprocessingtoolboxmodel.h.
|
override |
Definition at line 1004 of file qgsprocessingtoolboxmodel.cpp.
| void QgsProcessingToolboxProxyModel::setFilters | ( | QgsProcessingToolboxProxyModel::Filters | filters | ) |
Set filters that affect how toolbox content is filtered.
Definition at line 856 of file qgsprocessingtoolboxmodel.cpp.
| 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.
Definition at line 869 of file qgsprocessingtoolboxmodel.cpp.
| void QgsProcessingToolboxProxyModel::setInPlaceLayer | ( | QgsVectorLayer * | layer | ) |
Sets the vector layer for in-place algorithm filter.
Definition at line 862 of file qgsprocessingtoolboxmodel.cpp.
| QgsProcessingToolboxModel * QgsProcessingToolboxProxyModel::toolboxModel | ( | ) |
Returns the underlying source Processing toolbox model.
Definition at line 846 of file qgsprocessingtoolboxmodel.cpp.
| const QgsProcessingToolboxModel * QgsProcessingToolboxProxyModel::toolboxModel | ( | ) | const |
Returns the underlying source Processing toolbox model.
Definition at line 851 of file qgsprocessingtoolboxmodel.cpp.