Node Item (nodeitem)

Node Item

class orangecanvas.canvas.items.nodeitem.NodeItem(widget_description=None, parent=None, **kwargs)[source]

Bases: PyQt5.QtWidgets.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)[source]

Set widget description.

setWidgetCategory(desc)[source]

Set the widget category.

setIcon(icon)[source]

Set the node item’s icon (QIcon).

setColor(color, selectedColor=None)[source]

Set the widget color.

setTitle(title)[source]

Set the node title. The title text is displayed at the bottom of the node.

title()[source]

Return the node title.

title_

Node title text.

titleEditingStarted

Title editing has started

titleEditingFinished

Title editing has finished

editTitle()[source]

Start the inline title text edit process.

setAnimationEnabled(enabled)[source]

Set the node animation enabled state.

animationEnabled()[source]

Are node animations enabled.

setProcessingState(state)[source]

Set the node processing state i.e. the node is processing (is busy) or is idle.

processingState()[source]

The node processing state.

processingState_

The node processing state.

setProgress(progress)[source]

Set the node work progress state (number between 0 and 100).

progress()[source]

Return the node work progress state.

progress_

Node progress state.

setStatusMessage(message)[source]

Set the node status message text.

This text is displayed below the node’s title.

setStateMessage(message)[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=None)[source]

Create and return a new input AnchorPoint.

removeInputAnchor(anchor)[source]

Remove input anchor.

newOutputAnchor(signal=None)[source]

Create and return a new output AnchorPoint.

removeOutputAnchor(anchor)[source]

Remove output anchor.

inputAnchors()[source]

Return a list of all input anchor points.

outputAnchors()[source]

Return a list of all output anchor points.

setAnchorRotation(angle)[source]

Set the anchor rotation.

anchorRotation()[source]

Return the anchor rotation.

boundingRect(self) QRectF[source]
shape(self) QPainterPath[source]
mousePressEvent(self, QGraphicsSceneMouseEvent)[source]
mouseDoubleClickEvent(self, QGraphicsSceneMouseEvent)[source]
contextMenuEvent(self, QGraphicsSceneContextMenuEvent)[source]
changeEvent(self, QEvent)[source]
itemChange(self, QGraphicsItem.GraphicsItemChange, Any) Any[source]
class orangecanvas.canvas.items.nodeitem.AnchorPoint(parent: Optional[PyQt5.QtWidgets.QGraphicsItem] = None, signal: Optional[Union[orangecanvas.registry.description.InputSignal, orangecanvas.registry.description.OutputSignal]] = None, **kwargs)[source]

Bases: PyQt5.QtWidgets.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.

anchorScenePos()[source]

Return anchor position in scene coordinates.

setAnchorDirection(direction)[source]

Set the preferred direction (QPointF) in item coordinates.

anchorDirection()[source]

Return the preferred anchor direction.

itemChange(self, QGraphicsItem.GraphicsItemChange, Any) Any[source]
boundingRect(self) QRectF[source]