Class: QgsProcessingToolboxProxyModel¶
- class qgis.gui.QgsProcessingToolboxProxyModel¶
Bases:
PyQt5.QtCore.QSortFilterProxyModel
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.
New in version 3.4.
QgsProcessingToolboxProxyModel(parent: QObject = None, registry:
QgsProcessingRegistry
= None, recentLog:QgsProcessingRecentAlgorithmLog
= None) Constructor forQgsProcessingToolboxProxyModel
, with the givenparent
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.Methods
beginInsertColumns
beginInsertRows
beginMoveColumns
beginMoveRows
beginRemoveColumns
beginRemoveRows
changePersistentIndex
createIndex
- param index:
decodeData
- param sourceRow:
Returns the current filter string, if set.
Returns any filters that affect how toolbox content is filtered.
- param left:
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 filterReturns the underlying source Processing toolbox model.
Attributes
- class Filter¶
Bases:
int
- FilterInPlace = 8¶
- FilterModeler = 4¶
- FilterShowKnownIssues = 16¶
- FilterToolbox = 2¶
- class Filters¶
- class Filters(Union[QgsProcessingToolboxProxyModel.Filters, QgsProcessingToolboxProxyModel.Filter])
- class Filters(QgsProcessingToolboxProxyModel.Filters)
Bases:
sip.wrapper
- baseClass¶
alias of
QgsProcessingToolboxProxyModel
- QgsProcessingToolboxProxyModel.beginInsertColumns(self, QModelIndex, int, int)
- QgsProcessingToolboxProxyModel.beginInsertRows(self, QModelIndex, int, int)
- QgsProcessingToolboxProxyModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
- QgsProcessingToolboxProxyModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
- QgsProcessingToolboxProxyModel.beginRemoveColumns(self, QModelIndex, int, int)
- QgsProcessingToolboxProxyModel.beginRemoveRows(self, QModelIndex, int, int)
- beginResetModel(self)¶
- QgsProcessingToolboxProxyModel.changePersistentIndex(self, QModelIndex, QModelIndex)
- changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])¶
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- QgsProcessingToolboxProxyModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
- customEvent(self, QEvent)¶
- data(self, index: QModelIndex, role: int = Qt.DisplayRole) Any ¶
- Parameters:
index (QModelIndex) –
role (int = Qt.DisplayRole) –
- Return type:
Any
- QgsProcessingToolboxProxyModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
- disconnectNotify(self, QMetaMethod)¶
- encodeData(self, Iterable[QModelIndex], QDataStream)¶
- endInsertColumns(self)¶
- endInsertRows(self)¶
- endMoveColumns(self)¶
- endMoveRows(self)¶
- endRemoveColumns(self)¶
- endRemoveRows(self)¶
- endResetModel(self)¶
- filterAcceptsColumn(self, int, QModelIndex) bool ¶
- filterAcceptsRow(self, sourceRow: int, sourceParent: QModelIndex) bool ¶
- Parameters:
sourceRow (int) –
sourceParent (QModelIndex) –
- Return type:
bool
- filterString(self) str ¶
Returns the current filter string, if set.
See also
- Return type:
str
- filters(self) QgsProcessingToolboxProxyModel.Filters ¶
Returns any filters that affect how toolbox content is filtered.
See also
- Return type:
- invalidateFilter(self)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- lessThan(self, left: QModelIndex, right: QModelIndex) bool ¶
- Parameters:
left (QModelIndex) –
right (QModelIndex) –
- Return type:
bool
- persistentIndexList(self) List[QModelIndex] ¶
- receivers(self, PYQT_SIGNAL) int ¶
- resetInternalData(self)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setFilterString(self, filter: str)¶
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 (str) –
- setFilters(self, filters: QgsProcessingToolboxProxyModel.Filters | QgsProcessingToolboxProxyModel.Filter)¶
Set
filters
that affect how toolbox content is filtered.See also
- Parameters:
filters (Union[QgsProcessingToolboxProxyModel.Filters) –
- setInPlaceLayer(self, layer: QgsVectorLayer)¶
Sets the vector
layer
for in-place algorithm filter- Parameters:
layer (QgsVectorLayer) –
- timerEvent(self, QTimerEvent)¶
- toolboxModel(self) QgsProcessingToolboxModel ¶
Returns the underlying source Processing toolbox model.
- Return type: