Class: QgsModelDesignerSocketGraphicItem¶
A socket allowing linking component together.
Warning
Not stable API
Added in version 3.44.
Class Hierarchy¶
Base classes¶
A flat button graphic item for use in the Processing model designer. |
|
Methods
Return the component associated to the socket. |
|
Return the parent graphic item associated to the socket. |
|
Returns on which edge this socket is: |
|
Returns the index of this socket in either QgsModelDesignerSocketGraphicItem.mInSockets or QgsModelDesignerSocketGraphicItem.mOutSockets array |
|
Returns whether the socket is an input socket or not. |
- class qgis.gui.QgsModelDesignerSocketGraphicItem[source]¶
Bases:
QgsModelDesignerFlatButtonGraphicItem- __init__(parent: QgsModelComponentGraphicItem | None, component: QgsProcessingModelComponent | None, index: int, position: QPointF | QPoint, edge: Qt.Edge, size: QSizeF = QSizeF(11, 11))
Constructor for QgsModelDesignerSocketGraphicItem, with the specified
parentitem.The
indexargument specifies whether the input or output index of this socket inside the component And theedgeargument specifies if it’s an input socket( Qt.Edge.TopEdge ) or output ( Qt.Edge.BottomEdge )The sockets will be rendered at the specified
position- Parameters:
parent (Optional[QgsModelComponentGraphicItem])
component (Optional[QgsProcessingModelComponent])
index (int)
position (Union[QPointF, QPoint])
edge (Qt.Edge)
size (QSizeF = QSizeF(11, 11))
- component(self) QgsProcessingModelComponent | None[source]¶
Return the component associated to the socket.
- Return type:
Optional[QgsProcessingModelComponent]
- componentItem(self) QgsModelComponentGraphicItem | None[source]¶
Return the parent graphic item associated to the socket.
- Return type:
Optional[QgsModelComponentGraphicItem]
- edge(self) Qt.Edge[source]¶
Returns on which edge this socket is:
Qt.Edge.TopEdge for input socket
Qt.Edge.BottomEdge for output socket
- Return type:
Qt.Edge