Link Item (linkitem)¶
Link Item¶
-
class
orangecanvas.canvas.items.linkitem.LinkItem(*args)¶ Bases:
PyQt5.QtWidgets.QGraphicsObjectA Link item in the canvas that connects two
NodeItems in the canvas.The link curve connects two Anchor items (see
setSourceItem()andsetSinkItem()). Once the anchors are set the curve automatically adjusts its end points whenever the anchors move.An optional source/sink text item can be displayed above the curve’s central point (
setSourceName(),setSinkName())-
class
State¶ Bases:
enum.IntEnumFlags indicating the runtime state of a link
-
LinkItem.font()¶ Return the font for the channel names text.
-
LinkItem.isDynamic()¶ Is the link dynamic.
-
LinkItem.isDynamicEnabled()¶ Is the link dynamic enabled.
-
LinkItem.setChannelNamesVisible(visible)¶ Set the visibility of the channel name text.
-
LinkItem.setDynamic(dynamic)¶ Mark the link as dynamic (i.e. it responds to
setDynamicEnabled()).
-
LinkItem.setDynamicEnabled(enabled)¶ Set the link’s dynamic enabled state.
If the link is dynamic it will be rendered in red/green color respectively depending on the state of the dynamic enabled state.
-
LinkItem.setEnabled(enabled)¶ Reimplemented from
QGraphicsObjectSet link enabled state. When disabled the link is rendered with a dashed line.
-
LinkItem.setFont(font)¶ Set the font for the channel names text item.
-
LinkItem.setRuntimeState(state)¶ Style the link appropriate to the LinkItem.State
Parameters: state (LinkItem.State) –
-
LinkItem.setSinkItem(item, anchor=None)¶ Set the sink item (
NodeItem). Use anchor (AnchorPoint) as the curve end point (ifNonea new input anchor will be created usingitem.newInputAnchor()).Setting item to
Noneand a valid anchor is a valid operation (for instance while mouse dragging one and of the link).
-
LinkItem.setSinkName(name)¶ Set the name of the sink (used in channel name text).
-
LinkItem.setSourceItem(item, anchor=None)¶ Set the source item (
NodeItem). Use anchor (AnchorPoint) as the curve start point (ifNonea new output anchor will be created usingitem.newOutputAnchor()).Setting item to
Noneand a valid anchor is a valid operation (for instance while mouse dragging one end of the link).
-
LinkItem.setSourceName(name)¶ Set the name of the source (used in channel name text).
-
LinkItem.sinkName()¶ Return the sink name.
-
LinkItem.sourceName()¶ Return the source name.
-
class