Node Item (nodeitem
)
Node Item
- class orangecanvas.canvas.items.nodeitem.NodeItem(widget_description: WidgetDescription | None = None, parent: QGraphicsItem | None = None, **kwargs: Any)[source]
Bases:
QGraphicsWidget
An widget node item in the canvas.
- positionChanged
Signal emitted when the scene position of the node has changed.
- anchorGeometryChanged
Signal emitted when the geometry of the channel anchors changes.
- activated
Signal emitted when the item has been activated (by a mouse double click or a keyboard)
- selectedChanged
Signal emitted the the item’s selection state changes.
- ANCHOR_SPAN_ANGLE = 90
Span of the anchor in degrees
- Z_VALUE = 100
Z value of the item
- setWidgetDescription(desc: WidgetDescription) None [source]
Set widget description.
- setWidgetCategory(desc: CategoryDescription) None [source]
Set the widget category.
- setTitle(title: str) None [source]
Set the node title. The title text is displayed at the bottom of the node.
- titleEditingStarted
Title editing has started
- titleEditingFinished
Title editing has finished
- setProcessingState(state: int) None [source]
Set the node processing state i.e. the node is processing (is busy) or is idle.
- setProgress(progress: float) None [source]
Set the node work progress state (number between 0 and 100).
- setStatusMessage(message: str) None [source]
Set the node status message text.
This text is displayed below the node’s title.
- setStateMessage(message: UserMessage) None [source]
Set a state message to display over the item.
- Parameters:
message (UserMessage) – Message to display. message.severity is used to determine the icon and message.contents is used as a tool tip.
- newInputAnchor(signal: InputSignal | None = None) AnchorPoint [source]
Create and return a new input
AnchorPoint
.
- removeInputAnchor(anchor: AnchorPoint) None [source]
Remove input anchor.
- newOutputAnchor(signal: OutputSignal | None = None) AnchorPoint [source]
Create and return a new output
AnchorPoint
.
- removeOutputAnchor(anchor: AnchorPoint) None [source]
Remove output anchor.
- inputAnchors() List[AnchorPoint] [source]
Return a list of all input anchor points.
- outputAnchors() List[AnchorPoint] [source]
Return a list of all output anchor points.
- class orangecanvas.canvas.items.nodeitem.AnchorPoint(parent: QGraphicsItem | None = None, signal: InputSignal | OutputSignal | None = None, **kwargs)[source]
Bases:
QGraphicsObject
A anchor indicator on the
NodeAnchorItem
.- scenePositionChanged(QPointF)
Signal emitted when the item’s scene position changes.
- anchorDirectionChanged(QPointF)
Signal emitted when the item’s anchorDirection changes.
- signalChanged
Signal emitted when anchor’s Input/Output channel changes.