Link Item (linkitem)¶
Link Item¶
-
class
orangecanvas.canvas.items.linkitem.LinkItem(*args)¶ Bases:
PyQt4.QtGui.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())-
Z_VALUE= 0¶ Z value of the item
-
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).
-
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).
-
setFont(font)¶ Set the font for the channel names text item.
-
font()¶ Return the font for the channel names text.
-
setChannelNamesVisible(visible)¶ Set the visibility of the channel name text.
-
setSourceName(name)¶ Set the name of the source (used in channel name text).
-
sourceName()¶ Return the source name.
-
setSinkName(name)¶ Set the name of the sink (used in channel name text).
-
sinkName()¶ Return the sink name.
-
setEnabled(enabled)¶ Reimplemented from
QGraphicsObjectSet link enabled state. When disabled the link is rendered with a dashed line.
-
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.
-
isDynamicEnabled()¶ Is the link dynamic enabled.
-
setDynamic(dynamic)¶ Mark the link as dynamic (i.e. it responds to
setDynamicEnabled()).
-
isDynamic()¶ Is the link dynamic.
-