Class: QgsProcessingToolboxTreeView¶
- class qgis.gui.QgsProcessingToolboxTreeView¶
Bases:
PyQt5.QtWidgets.QTreeView
Processing toolbox tree view, showing algorithms and providers in a tree structure.
Warning
Not part of stable API and may change in future QGIS releases.
Added in version 3.4.
QgsProcessingToolboxTreeView(parent: Optional[QWidget] = None, registry: Optional[QgsProcessingRegistry] = None, recentLog: Optional[QgsProcessingRecentAlgorithmLog] = None) Constructor for
QgsProcessingToolboxTreeView
, with the specifiedparent
widget.If
registry
is set, then the view will automatically be populated with algorithms and providers from the registry. Otherwise, users must manually callsetRegistry()
to associate a registry with the view.If
recentLog
is specified then it will be used to create a “Recently used” top level group containing recently used algorithms.Methods
Returns the algorithm at the specified tree view
index
, orNone
if the index does not correspond to an algorithm.Returns the current filters controlling the view's contents.
- param event:
Returns the currently selected algorithm in the tree view, or
None
if no algorithm is currently selected.Sets a
filter
string, used to filter out the contents of the view to matching algorithms.Sets
filters
controlling the view's contents.Sets the vector
layer
for the in-place algorithmsSets the processing
registry
associated with the view.Sets the toolbox proxy model used to drive the view.
- actionEvent(self, a0: QActionEvent | None)¶
- algorithmForIndex(self, index: QModelIndex) QgsProcessingAlgorithm | None ¶
Returns the algorithm at the specified tree view
index
, orNone
if the index does not correspond to an algorithm.- Parameters:
index (QModelIndex)
- Return type:
Optional[QgsProcessingAlgorithm]
- changeEvent(self, a0: QEvent | None)¶
- childEvent(self, a0: QChildEvent | None)¶
- closeEditor(self, editor: QWidget | None, hint: QAbstractItemDelegate.EndEditHint)¶
- closeEvent(self, a0: QCloseEvent | None)¶
- columnCountChanged(self, oldCount: int, newCount: int)¶
- columnMoved(self)¶
- columnResized(self, column: int, oldSize: int, newSize: int)¶
- commitData(self, editor: QWidget | None)¶
- connectNotify(self, signal: QMetaMethod)¶
- contextMenuEvent(self, a0: QContextMenuEvent | None)¶
- create(self, window: PyQt5.sip.voidptr = None, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- currentChanged(self, current: QModelIndex, previous: QModelIndex)¶
- customEvent(self, a0: QEvent | None)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- dirtyRegionOffset(self) QPoint ¶
- disconnectNotify(self, signal: QMetaMethod)¶
- dragEnterEvent(self, e: QDragEnterEvent | None)¶
- dragLeaveEvent(self, e: QDragLeaveEvent | None)¶
- dragMoveEvent(self, event: QDragMoveEvent | None)¶
- drawBranches(self, painter: QPainter | None, rect: QRect, index: QModelIndex)¶
- drawFrame(self, a0: QPainter | None)¶
- drawRow(self, painter: QPainter | None, options: QStyleOptionViewItem, index: QModelIndex)¶
- drawTree(self, painter: QPainter | None, region: QRegion)¶
- dropEvent(self, e: QDropEvent | None)¶
- dropIndicatorPosition(self) QAbstractItemView.DropIndicatorPosition ¶
- edit(self, index: QModelIndex)¶
- edit(self, index: QModelIndex, trigger: QAbstractItemView.EditTrigger, event: QEvent | None) bool
- editorDestroyed(self, editor: QObject | None)¶
- enterEvent(self, a0: QEvent | None)¶
- event(self, event: QEvent | None) bool ¶
- eventFilter(self, object: QObject | None, event: QEvent | None) bool ¶
- executeDelayedItemsLayout(self)¶
- filters(self) QgsProcessingToolboxProxyModel.Filters ¶
Returns the current filters controlling the view’s contents.
See also
Added in version 3.8.
- Return type:
- focusInEvent(self, e: QFocusEvent | None)¶
- focusNextChild(self) bool ¶
- focusNextPrevChild(self, next: bool) bool ¶
- focusOutEvent(self, e: QFocusEvent | None)¶
- focusPreviousChild(self) bool ¶
- hideEvent(self, a0: QHideEvent | None)¶
- horizontalOffset(self) int ¶
- horizontalScrollbarAction(self, action: int)¶
- horizontalScrollbarValueChanged(self, value: int)¶
- indexRowSizeHint(self, index: QModelIndex) int ¶
- initPainter(self, painter: QPainter | None)¶
- initStyleOption(self, option: QStyleOptionFrame | None)¶
- inputMethodEvent(self, event: QInputMethodEvent | None)¶
- isIndexHidden(self, index: QModelIndex) bool ¶
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- keyPressEvent(self, event: QKeyEvent | None)¶
- Parameters:
event (Optional[QKeyEvent])
- keyReleaseEvent(self, a0: QKeyEvent | None)¶
- leaveEvent(self, a0: QEvent | None)¶
- metric(self, a0: QPaintDevice.PaintDeviceMetric) int ¶
- mouseDoubleClickEvent(self, e: QMouseEvent | None)¶
- mouseMoveEvent(self, event: QMouseEvent | None)¶
- mousePressEvent(self, e: QMouseEvent | None)¶
- mouseReleaseEvent(self, event: QMouseEvent | None)¶
- moveCursor(self, cursorAction: QAbstractItemView.CursorAction, modifiers: Qt.KeyboardModifiers | Qt.KeyboardModifier) QModelIndex ¶
- moveEvent(self, a0: QMoveEvent | None)¶
- nativeEvent(self, eventType: QByteArray | bytes | bytearray, message: PyQt5.sip.voidptr | None)¶
- paintEvent(self, e: QPaintEvent | None)¶
- receivers(self, signal: PYQT_SIGNAL) int ¶
- reexpand(self)¶
- resizeEvent(self, e: QResizeEvent | None)¶
- rowHeight(self, index: QModelIndex) int ¶
- rowsAboutToBeRemoved(self, parent: QModelIndex, start: int, end: int)¶
- rowsInserted(self, parent: QModelIndex, start: int, end: int)¶
- rowsRemoved(self, parent: QModelIndex, first: int, last: int)¶
- scheduleDelayedItemsLayout(self)¶
- scrollContentsBy(self, dx: int, dy: int)¶
- scrollDirtyRegion(self, dx: int, dy: int)¶
- selectedAlgorithm(self) QgsProcessingAlgorithm | None ¶
Returns the currently selected algorithm in the tree view, or
None
if no algorithm is currently selected.- Return type:
Optional[QgsProcessingAlgorithm]
- selectedIndexes(self) List[QModelIndex] ¶
- selectionChanged(self, selected: QItemSelection, deselected: QItemSelection)¶
- selectionCommand(self, index: QModelIndex, event: QEvent | None = None) QItemSelectionModel.SelectionFlags ¶
- sender(self) QObject | None ¶
- senderSignalIndex(self) int ¶
- setDirtyRegion(self, region: QRegion)¶
- setFilterString(self, filter: str | None)¶
Sets a
filter
string, used to filter out the contents of the view to matching algorithms.- Parameters:
filter (Optional[str])
- setFilters(self, filters: QgsProcessingToolboxProxyModel.Filters | QgsProcessingToolboxProxyModel.Filter)¶
Sets
filters
controlling the view’s contents.See also
- Parameters:
filters (Union[QgsProcessingToolboxProxyModel.Filters)
- setInPlaceLayer(self, layer: QgsVectorLayer | None)¶
Sets the vector
layer
for the in-place algorithms- Parameters:
layer (Optional[QgsVectorLayer])
- setRegistry(self, registry: QgsProcessingRegistry | None, recentLog: QgsProcessingRecentAlgorithmLog | None = None)¶
Sets the processing
registry
associated with the view.If
recentLog
is specified then it will be used to create a “Recently used” top level group containing recently used algorithms.- Parameters:
registry (Optional[QgsProcessingRegistry])
recentLog (Optional[QgsProcessingRecentAlgorithmLog] = None)
- setSelection(self, rect: QRect, command: QItemSelectionModel.SelectionFlags | QItemSelectionModel.SelectionFlag)¶
- setState(self, state: QAbstractItemView.State)¶
- setToolboxProxyModel(self, model: QgsProcessingToolboxProxyModel | None)¶
Sets the toolbox proxy model used to drive the view.
- Parameters:
model (Optional[QgsProcessingToolboxProxyModel])
- setViewportMargins(self, left: int, top: int, right: int, bottom: int)¶
- setViewportMargins(self, margins: QMargins) None
- showEvent(self, a0: QShowEvent | None)¶
- sizeHintForColumn(self, column: int) int ¶
- startDrag(self, supportedActions: Qt.DropActions | Qt.DropAction)¶
- state(self) QAbstractItemView.State ¶
- tabletEvent(self, a0: QTabletEvent | None)¶
- timerEvent(self, event: QTimerEvent | None)¶
- updateEditorData(self)¶
- updateEditorGeometries(self)¶
- updateGeometries(self)¶
- updateMicroFocus(self)¶
- verticalOffset(self) int ¶
- verticalScrollbarAction(self, action: int)¶
- verticalScrollbarValueChanged(self, value: int)¶
- viewOptions(self) QStyleOptionViewItem ¶
- viewportEvent(self, event: QEvent | None) bool ¶
- viewportMargins(self) QMargins ¶
- viewportSizeHint(self) QSize ¶
- visualRegionForSelection(self, selection: QItemSelection) QRegion ¶
- wheelEvent(self, a0: QWheelEvent | None)¶