Class: QgsModelChildAlgorithmGraphicItem

class qgis.gui.QgsModelChildAlgorithmGraphicItem

Bases: QgsModelComponentGraphicItem

A graphic item representing a child algorithm in the model designer.

Warning

Not stable API

New in version 3.14.

QgsModelChildAlgorithmGraphicItem(child: QgsProcessingModelChildAlgorithm, model: QgsProcessingModelAlgorithm, parent: QGraphicsItem) Constructor for QgsModelChildAlgorithmGraphicItem for the specified child, with the specified parent item.

The model argument specifies the associated processing model. Ownership of model is not transferred, and it must exist for the lifetime of this object.

Ownership of child is transferred to the item.

Methods

canDeleteComponent

rtype

bool

childEvent

connectNotify

contextMenuEvent

param event

customEvent

deleteComponent

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

editComponent

Called when the component should be edited.

event

fillColor

param state

focusInEvent

focusOutEvent

iconPicture

rtype

QPicture

iconPixmap

rtype

QPixmap

inputMethodEvent

inputMethodQuery

isSignalConnected

keyPressEvent

keyReleaseEvent

linkPointCount

param edge

linkPointText

param edge

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

prepareGeometryChange

receivers

sceneEvent

sceneEventFilter

sender

senderSignalIndex

setInputs

Sets the inputs used for this child algorithm for the last model execution through the dialog.

setResults

Sets the results obtained for this child algorithm for the last model execution through the dialog.

strokeColor

param state

strokeStyle

Returns the stroke style to use while rendering the outline of the item.

textColor

param state

timerEvent

titleAlignment

Returns the title alignment

truncatedTextForItem

Truncates a text string so that it fits nicely within the item’s width, accounting for margins and interactive buttons.

updateButtonPositions

Updates the item’s button positions, based on the current item rect.

updateMicroFocus

updateStoredComponentPosition

param pos

wheelEvent

canDeleteComponent(self) bool
Return type

bool

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, event: QGraphicsSceneContextMenuEvent)
Parameters

event (QGraphicsSceneContextMenuEvent) –

customEvent(self, QEvent)
deleteComponent(self)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QGraphicsSceneDragDropEvent)
dragLeaveEvent(self, QGraphicsSceneDragDropEvent)
dragMoveEvent(self, QGraphicsSceneDragDropEvent)
dropEvent(self, QGraphicsSceneDragDropEvent)
editComponent(self)

Called when the component should be edited.

The default implementation does nothing.

event(self, QEvent) bool
fillColor(self, state: QgsModelComponentGraphicItem.State) QColor
Parameters

state (QgsModelComponentGraphicItem.State) –

Return type

QColor

focusInEvent(self, QFocusEvent)
focusOutEvent(self, QFocusEvent)
iconPicture(self) QPicture
Return type

QPicture

iconPixmap(self) QPixmap
Return type

QPixmap

inputMethodEvent(self, QInputMethodEvent)
inputMethodQuery(self, Qt.InputMethodQuery) Any
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
linkPointCount(self, edge: Qt.Edge) int
Parameters

edge (Qt.Edge) –

Return type

int

linkPointText(self, edge: Qt.Edge, index: int) str
Parameters
  • edge (Qt.Edge) –

  • index (int) –

Return type

str

mouseMoveEvent(self, QGraphicsSceneMouseEvent)
mousePressEvent(self, QGraphicsSceneMouseEvent)
mouseReleaseEvent(self, QGraphicsSceneMouseEvent)
prepareGeometryChange(self)
receivers(self, PYQT_SIGNAL) int
sceneEvent(self, QEvent) bool
sceneEventFilter(self, QGraphicsItem, QEvent) bool
sender(self) QObject
senderSignalIndex(self) int
setInputs(self, inputs: Dict[str, Any])

Sets the inputs used for this child algorithm for the last model execution through the dialog.

Parameters

inputs (Dict[str) –

setResults(self, results: Dict[str, Any])

Sets the results obtained for this child algorithm for the last model execution through the dialog.

Parameters

results (Dict[str) –

strokeColor(self, state: QgsModelComponentGraphicItem.State) QColor
Parameters

state (QgsModelComponentGraphicItem.State) –

Return type

QColor

strokeStyle(self, state: QgsModelComponentGraphicItem.State) Qt.PenStyle

Returns the stroke style to use while rendering the outline of the item.

textColor(self, state: QgsModelComponentGraphicItem.State) QColor
Parameters

state (QgsModelComponentGraphicItem.State) –

Return type

QColor

timerEvent(self, QTimerEvent)
titleAlignment(self) Qt.Alignment

Returns the title alignment

truncatedTextForItem(self, text: str) str

Truncates a text string so that it fits nicely within the item’s width, accounting for margins and interactive buttons.

updateButtonPositions(self)

Updates the item’s button positions, based on the current item rect.

updateMicroFocus(self)
updateStoredComponentPosition(self, pos: Union[QPointF, QPoint], size: QSizeF)
Parameters
  • pos (Union[QPointF) –

  • size (QSizeF) –

wheelEvent(self, QGraphicsSceneWheelEvent)