Orange Canvas Core
  • Overview
  • Orange Canvas Reference
    • GUI elements (gui)
    • Scheme (scheme)
      • Scheme
      • Scheme (scheme)
      • Scheme Node (node)
      • Scheme Link (link)
        • Scheme Link
        • SchemeLink
      • Scheme Annotations (annotations)
      • Scheme Serialization (readwrite)
      • WidgetManager (widgetmanager)
      • SignalManager (signalmanager)
      • SignalManager
      • Signal
      • Workflow Events (events)
    • Registry (registry)
    • Canvas (canvas)
    • Document (document)
    • Application (application)
Orange Canvas Core
  • Orange Canvas Reference
  • Scheme (scheme)
  • Scheme Link (link)
  • View page source

Scheme Link (link)

Scheme Link

class orangecanvas.scheme.link.SchemeLink(source_node: Node, source_channel: Output, sink_node: Node, sink_channel: Input, enabled: bool = True, properties: dict = None, parent: QObject = None)[source]

Bases: QObject

A instantiation of a link between two SchemeNode instances in a Scheme.

Parameters:
  • source_node (SchemeNode) – Source node.

  • source_channel (OutputSignal) – The source widget’s signal.

  • sink_node (SchemeNode) – The sink node.

  • sink_channel (InputSignal) – The sink widget’s input signal.

  • properties (dict) – Additional link properties.

enabled_changed(enabled)

The link enabled state has changed

dynamic_enabled_changed(enabled)

The link dynamic enabled state has changed.

state_changed

Runtime link state has changed

class State(value)[source]

Bases: IntEnum

Flags indicating the runtime state of a link

NoState = 0

The link has no associated state (e.g. is not associated with any execution contex)

Empty = 1

A link is empty when it has no value on it.

Active = 2

A link is active when the source node provides a value on output.

Pending = 4

A link is pending when it’s sink node has not yet been notified of a change (note that Empty|Pending is a valid state)

Invalidated = 8

The link’s source node has invalidated the source channel. The execution manager should not propagate this links source value until this flag is cleared.

Added in version 0.1.8.

source_type() → type[source]

Return the type of the source channel.

Deprecated since version 0.1.5: Use source_types() instead.

source_types() → Tuple[type, ...][source]

Return the type(s) of the source channel.

sink_type() → type[source]

Return the type of the sink channel.

Deprecated since version 0.1.5: Use sink_types() instead.

sink_types() → Tuple[type, ...][source]

Return the type(s) of the sink channel.

is_dynamic() → bool[source]

Is this link dynamic.

set_enabled(enabled: bool) → None[source]

Enable/disable the link.

is_enabled() → bool[source]

Is this link enabled.

set_dynamic_enabled(enabled: bool) → None[source]

Enable/disable the dynamic link. Has no effect if the link is not dynamic.

is_dynamic_enabled() → bool[source]

Is this a dynamic link and is dynamic_enabled set to True

set_runtime_state(state: State | int) → None[source]

Set the link’s runtime state.

Parameters:

state (SchemeLink.State)

runtime_state() → State | int[source]
Returns:

state

Return type:

SchemeLink.State

set_runtime_state_flag(flag: State, on: bool) → None[source]

Set/unset runtime state flag.

Parameters:
  • flag (SchemeLink.State)

  • on (bool)

test_runtime_state(flag: State) → bool[source]

Test if runtime state flag is on/off

Parameters:

flag (SchemeLink.State) – State flag to test

Returns:

on – True if flag is set; False otherwise.

Return type:

bool

set_tool_tip(tool_tip: str) → None[source]

Set the link tool tip.

Previous Next

© Copyright 2019, Bioinformatics Laboratory, FRI UL.

Built with Sphinx using a theme provided by Read the Docs.