Class: QgsModelChildAlgorithmGraphicItem¶
- class qgis.gui.QgsModelChildAlgorithmGraphicItem¶
Bases:
QgsModelComponentGraphicItem
A graphic item representing a child algorithm in the model designer.
Warning
Not stable API
Added in version 3.14.
QgsModelChildAlgorithmGraphicItem(child: Optional[QgsProcessingModelChildAlgorithm], model: Optional[QgsProcessingModelAlgorithm], parent: Optional[QGraphicsItem]) Constructor for
QgsModelChildAlgorithmGraphicItem
for the specifiedchild
, with the specifiedparent
item.The
model
argument specifies the associated processing model. Ownership ofmodel
is not transferred, and it must exist for the lifetime of this object.Ownership of
child
is transferred to the item.Methods
- rtype:
bool
- param event:
Called when the component should be edited.
- param state:
- rtype:
QPicture
- rtype:
QPixmap
- param edge:
- param edge:
Sets the
results
obtained for this child algorithm for the last model execution through the dialog.- param state:
Returns the stroke style to use while rendering the outline of the item.
- param state:
Returns the title alignment
Truncates a
text
string so that it fits nicely within the item's width, accounting for margins and interactive buttons.Updates the item's button positions, based on the current item rect.
- param pos:
- canDeleteComponent(self) bool ¶
- Return type:
bool
- childEvent(self, a0: QChildEvent | None)¶
- connectNotify(self, signal: QMetaMethod)¶
- contextMenuEvent(self, event: QGraphicsSceneContextMenuEvent | None)¶
- Parameters:
event (Optional[QGraphicsSceneContextMenuEvent])
- customEvent(self, a0: QEvent | None)¶
- deleteComponent(self)¶
- disconnectNotify(self, signal: QMetaMethod)¶
- dragEnterEvent(self, event: QGraphicsSceneDragDropEvent | None)¶
- dragLeaveEvent(self, event: QGraphicsSceneDragDropEvent | None)¶
- dragMoveEvent(self, event: QGraphicsSceneDragDropEvent | None)¶
- dropEvent(self, event: QGraphicsSceneDragDropEvent | None)¶
- editComponent(self)¶
Called when the component should be edited.
The default implementation does nothing.
- event(self, ev: QEvent | None) bool ¶
- fillColor(self, state: QgsModelComponentGraphicItem.State) QColor ¶
- Parameters:
- Return type:
QColor
- focusInEvent(self, event: QFocusEvent | None)¶
- focusOutEvent(self, event: QFocusEvent | None)¶
- iconPicture(self) QPicture ¶
- Return type:
QPicture
- iconPixmap(self) QPixmap ¶
- Return type:
QPixmap
- inputMethodEvent(self, event: QInputMethodEvent | None)¶
- inputMethodQuery(self, query: Qt.InputMethodQuery) Any ¶
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- keyPressEvent(self, event: QKeyEvent | None)¶
- keyReleaseEvent(self, event: QKeyEvent | None)¶
- 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, event: QGraphicsSceneMouseEvent | None)¶
- mousePressEvent(self, event: QGraphicsSceneMouseEvent | None)¶
- mouseReleaseEvent(self, event: QGraphicsSceneMouseEvent | None)¶
- prepareGeometryChange(self)¶
- receivers(self, signal: PYQT_SIGNAL) int ¶
- runFromHere¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...)
revision (int = ...)
arguments (Sequence = ...)
- Return type:
PYQT_SIGNAL
- runSelected¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...)
revision (int = ...)
arguments (Sequence = ...)
- Return type:
PYQT_SIGNAL
- sceneEvent(self, event: QEvent | None) bool ¶
- sceneEventFilter(self, watched: QGraphicsItem | None, event: QEvent | None) bool ¶
- sender(self) QObject | None ¶
- senderSignalIndex(self) int ¶
- setResults(self, results: QgsProcessingModelChildAlgorithmResult)¶
Sets the
results
obtained for this child algorithm for the last model execution through the dialog.- Parameters:
results (QgsProcessingModelChildAlgorithmResult)
- showLog¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...)
revision (int = ...)
arguments (Sequence = ...)
- Return type:
PYQT_SIGNAL
- showPreviousResults¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...)
revision (int = ...)
arguments (Sequence = ...)
- Return type:
PYQT_SIGNAL
- strokeColor(self, state: QgsModelComponentGraphicItem.State) QColor ¶
- Parameters:
- 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:
- Return type:
QColor
- timerEvent(self, a0: QTimerEvent | None)¶
- titleAlignment(self) Qt.Alignment ¶
Returns the title alignment
- truncatedTextForItem(self, text: str | None) 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: QPointF | QPoint, size: QSizeF)¶
- Parameters:
pos (Union[QPointF)
size (QSizeF)
- wheelEvent(self, event: QGraphicsSceneWheelEvent | None)¶