QGIS API Documentation
3.8.0-Zanzibar (11aff65)
|
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. More...
#include <qgsprocessingtoolboxmodel.h>
Public Types | |
enum | Filter { FilterToolbox = 1 << 1, FilterModeler = 1 << 2, FilterInPlace = 1 << 3, FilterShowKnownIssues = 1 << 4 } |
Available filter flags for filtering the model. More... | |
Public Member Functions | |
QgsProcessingToolboxProxyModel (QObject *parent=nullptr, QgsProcessingRegistry *registry=nullptr, QgsProcessingRecentAlgorithmLog *recentLog=nullptr) | |
Constructor for QgsProcessingToolboxProxyModel, with the given parent object. More... | |
bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override |
Filters | filters () const |
Returns any filters that affect how toolbox content is filtered. More... | |
QString | filterString () const |
Returns the current filter string, if set. More... | |
bool | lessThan (const QModelIndex &left, const QModelIndex &right) const override |
void | setFilters (QgsProcessingToolboxProxyModel::Filters filters) |
Set filters that affect how toolbox content is filtered. More... | |
void | setFilterString (const QString &filter) |
Sets a filter string, such that only algorithms matching the specified string will be shown. More... | |
void | setInPlaceLayer (QgsVectorLayer *layer) |
Sets the vector layer for in-place algorithm filter. More... | |
QgsProcessingToolboxModel * | toolboxModel () |
Returns the underlying source Processing toolbox model. More... | |
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.
Definition at line 416 of file qgsprocessingtoolboxmodel.h.
Available filter flags for filtering the model.
Definition at line 423 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.
Definition at line 649 of file qgsprocessingtoolboxmodel.cpp.
|
override |
Definition at line 687 of file qgsprocessingtoolboxmodel.cpp.
|
inline |
Returns any filters that affect how toolbox content is filtered.
Definition at line 463 of file qgsprocessingtoolboxmodel.h.
|
inline |
Returns the current filter string, if set.
Definition at line 486 of file qgsprocessingtoolboxmodel.h.
|
override |
Definition at line 778 of file qgsprocessingtoolboxmodel.cpp.
void QgsProcessingToolboxProxyModel::setFilters | ( | QgsProcessingToolboxProxyModel::Filters | filters | ) |
Set filters that affect how toolbox content is filtered.
Definition at line 668 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 681 of file qgsprocessingtoolboxmodel.cpp.
void QgsProcessingToolboxProxyModel::setInPlaceLayer | ( | QgsVectorLayer * | layer | ) |
Sets the vector layer for in-place algorithm filter.
Definition at line 674 of file qgsprocessingtoolboxmodel.cpp.
QgsProcessingToolboxModel * QgsProcessingToolboxProxyModel::toolboxModel | ( | ) |
Returns the underlying source Processing toolbox model.
Definition at line 663 of file qgsprocessingtoolboxmodel.cpp.