Class: QgsProcessingToolboxModel¶
-
class
qgis.gui.
QgsProcessingToolboxModel
(parent: QObject = None, registry: QgsProcessingRegistry = None, recentLog: QgsProcessingRecentAlgorithmLog = None)¶ Bases:
PyQt5.QtCore.QAbstractItemModel
Constructor for QgsProcessingToolboxModel, 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.A model for providers and algorithms shown within the Processing toolbox.
See QgsProcessingToolboxProxyModel for a sorted, filterable version of this model.
New in version 3.4: Enums
Methods
Returns the algorithm which corresponds to a given
index
, or a None if the index does not represent an algorithm.Returns the model node corresponding to the given
index
.Returns the index corresponding to the specified
providerId
.Returns the index corresponding to the parent of a given node.
Returns true if
index
corresponds to an algorithm.Returns the model index corresponding to the given
node
.Returns the provider which corresponds to a given
index
, or a None if the index does not represent a provider.Returns the provider ID which corresponds to a given
index
, or an empty string if the index does not represent a provider.Signals
Emitted whenever recent algorithms are added to the model.
Attributes
-
RoleAlgorithmFlags
= 257¶
-
RoleAlgorithmId
= 258¶
-
RoleAlgorithmName
= 259¶
-
RoleAlgorithmShortDescription
= 260¶
-
RoleAlgorithmTags
= 261¶
-
RoleNodeType
= 256¶
-
class
Roles
¶ Bases:
int
-
algorithmForIndex
(self, index: QModelIndex) → QgsProcessingAlgorithm¶ Returns the algorithm which corresponds to a given
index
, or a None if the index does not represent an algorithm.See also
See also
-
beginInsertColumns
()¶
-
beginInsertRows
()¶
-
beginMoveColumns
()¶
-
beginMoveRows
()¶
-
beginRemoveColumns
()¶
-
beginRemoveRows
()¶
-
beginResetModel
()¶
-
changePersistentIndex
()¶
-
changePersistentIndexList
()¶
-
childEvent
()¶
-
columnCount
(self, QModelIndex = QModelIndex()) → int¶
-
connectNotify
()¶
-
createIndex
()¶
-
customEvent
()¶
-
data
(self, index: QModelIndex, role: int = Qt.DisplayRole) → Any¶
-
decodeData
()¶
-
disconnectNotify
()¶
-
encodeData
()¶
-
endInsertColumns
()¶
-
endInsertRows
()¶
-
endMoveColumns
()¶
-
endMoveRows
()¶
-
endRemoveColumns
()¶
-
endRemoveRows
()¶
-
endResetModel
()¶
-
flags
(self, index: QModelIndex) → Qt.ItemFlags¶
-
index
(self, row: int, column: int, parent: QModelIndex = QModelIndex()) → QModelIndex¶
-
index2node
(self, index: QModelIndex) → QgsProcessingToolboxModelNode¶ Returns the model node corresponding to the given
index
.See also
-
indexForProvider
(self, providerId: str) → QModelIndex¶ Returns the index corresponding to the specified
providerId
.See also
-
indexOfParentTreeNode
(self, parentNode: QgsProcessingToolboxModelNode) → QModelIndex¶ Returns the index corresponding to the parent of a given node.
-
isAlgorithm
(self, index: QModelIndex) → bool¶ Returns true if
index
corresponds to an algorithm.See also
-
isSignalConnected
()¶
-
mimeData
(self, indexes: object) → QMimeData¶
-
node2index
(self, node: QgsProcessingToolboxModelNode) → QModelIndex¶ Returns the model index corresponding to the given
node
.See also
-
parent
(self, index: QModelIndex) → QModelIndex¶
-
persistentIndexList
()¶
-
providerForIndex
(self, index: QModelIndex) → QgsProcessingProvider¶ Returns the provider which corresponds to a given
index
, or a None if the index does not represent a provider.See also
See also
-
providerIdForIndex
(self, index: QModelIndex) → str¶ Returns the provider ID which corresponds to a given
index
, or an empty string if the index does not represent a provider.See also
See also
-
receivers
()¶
-
recentAlgorithmAdded
¶ Emitted whenever recent algorithms are added to the model. [signal]
-
resetInternalData
()¶
-
rowCount
(self, parent: QModelIndex = QModelIndex()) → int¶
-
sender
()¶
-
senderSignalIndex
()¶
-
timerEvent
()¶
-