ewoksorange.bindings.owsignal_manager.SignalManagerWithScheme

class ewoksorange.bindings.owsignal_manager.SignalManagerWithScheme(*args, **kwargs)[source]

Bases: SignalManagerWithOutputTracking, WidgetsSignalManager

Used when the Orange canvas is present.

Dereference Variable types for native Orange widget inputs.

Error = 3
Paused = 2

The manager is paused. It still tracks node output changes, but does not deliver new signals to dependent nodes. The pending signals will be delivered once it enters Running state again

Processing = 1
Running = 0

The manager is running, i.e. it propagates signals

class RuntimeState(value)

Bases: IntEnum

SignalManager runtime state.

See Also

SignalManager.runtime_state

Processing = 1

Waiting = 0

Waiting, idle state. The signal queue is empty

class State(value)

Bases: IntEnum

SignalManager state flags.

See also

SignalManager.state()

Paused = 2

The manager is paused. It still tracks node output changes, but does not deliver new signals to dependent nodes. The pending signals will be delivered once it enters Running state again

Running = 0

The manager is running, i.e. it propagates signals

Stopped = 1

The manager is stopped. It does not track node output changes, and does not deliver signals to dependent nodes

Stopped = 1

The manager is stopped. It does not track node ouput changes, and does not deliver signals to dependent nodes

Waiting = 0
active_nodes()

Return a list of active nodes. :rtype: List[SchemeNode]

New in version 0.1.8.

blockSignals(self, b: bool) bool
blocking_nodes()

Return a list of nodes in a blocking state.

Return type:

List[SchemeNode]

childEvent(self, a0: QChildEvent | None)
children(self) List[QObject]
compress_signals(signals)

Reimplemented from SignalManager.compress_signals().

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent | None)
deleteLater(self)
destroyed

destroyed(self, object: Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent | None) bool
eventFilter(recv, event)
Parameters:
  • recv (QObject) –

  • event (QEvent) –

Return type:

bool

findChild(self, type: Type[QObjectT], name: str | None = '', options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) QObjectT
findChild(self, types: Tuple[Type[QObjectT], ...], name: str | None = '', options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) QObjectT
findChildren(self, type: Type[QObjectT], name: str | None = '', options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT]
findChildren(self, types: Tuple[Type[QObjectT], ...], name: str | None = '', options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT]
findChildren(self, type: Type[QObjectT], regExp: QRegExp, options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT]
findChildren(self, types: Tuple[Type[QObjectT], ...], regExp: QRegExp, options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT]
findChildren(self, type: Type[QObjectT], re: QRegularExpression, options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT]
findChildren(self, types: Tuple[Type[QObjectT], ...], re: QRegularExpression, options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT]
finished

Emitted when the execution finishes (there are no more nodes that need to run). Note: the nodes can activate again due to user interaction or other scheduled events, i.e. finished is not a definitive state. Use at your own discretion.

get_input_value(widget, signal_name, timeout=None)
get_output_value(widget, signal_name, timeout=None)
has_input_value(widget, signal_name)
has_invalidated_inputs(node)

Does the node have any immediate ancestor with invalidated outputs.

Return type:

bool

Parameters

node : SchemeNode

Returns

state: bool

Note

The node’s ancestors are only computed over enabled links.

New in version 0.1.8.

param node:

type node:

SchemeNode

has_invalidated_outputs(node)

Does node have any explicitly invalidated outputs.

Return type:

bool

Parameters

node: SchemeNode

Returns

state: bool

See also

invalidate

New in version 0.1.8.

param node:

type node:

SchemeNode

has_output_value(widget, signal_name)
has_pending()

Does the manager have any signals to deliver?

Return type:

bool

inherits(self, classname: str | None) bool
installEventFilter(self, a0: QObject | None)
invalidate(node, channel)[source]

Reimplemented from SignalManager

invalidate_input_value(widget, signal_name)
invalidate_output_value(widget, signal_name)
invalidated_nodes()

Return a list of invalidated nodes. :rtype: List[SchemeNode]

New in version 0.1.8.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
is_active(node)

Is the node considered active (executing a task).

Return type:

bool

Parameters

node: SchemeNode

Returns

active: bool

param node:

type node:

SchemeNode

is_blocking(node)

Is the node in blocking state.

Is it currently in a state where will produce new outputs and therefore no signals should be delivered to dependent nodes until it does so. Also no signals will be delivered to the node until it exits this state.

The default implementation returns False.

Deprecated since version 0.1.8: Use a combination of is_invalidated and is_ready.

Parameters:

node (SchemeNode) –

Return type:

bool

is_pending(node)

Is node (class:SchemeNode) scheduled for processing (i.e. it has incoming pending signals).

Return type:

bool

Parameters

node : SchemeNode

Returns

pending : bool

param node:

type node:

SchemeNode

killTimer(self, id: int)

Return the contents on the link.

Parameters:

link (SchemeLink) –

Return type:

Dict[Any, Any]

max_active()
Return type:

int

metaObject(self) QMetaObject | None
moveToThread(self, thread: QThread | None)
node_update_front()

Return a list of nodes on the update front, i.e. nodes scheduled for an update that have no ancestor which is either itself scheduled for update or is in a blocking state).

Return type:

Sequence[SchemeNode]

Note

The node’s ancestors are only computed over enabled links.

objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: Optional[str]) [signal]

parent(self) QObject | None
pause()

Pause the delivery of signals.

Return type:

None

pending_input_signals(node)

Return a list of pending input signals for node.

Parameters:

node (SchemeNode) –

Return type:

List[Signal]

pending_nodes()

Return a list of pending nodes.

The nodes are returned in the order they were enqueued for signal delivery.

Return type:

List[SchemeNode]

Returns

nodes : List[SchemeNode]

post_update_request()

Schedule an update pass.

Call this method whenever:

  • a node’s outputs change (note that this is already done by send)

  • any change in the node that influences its eligibility to be picked for an input update (is_ready, is_blocking …).

Multiple update requests are merged into one.

process_next()

Process queued signals.

Take the first eligible node from the pending input queue and deliver all scheduled signals for it and return True.

If no node is eligible for update do nothing and return False.

Return type:

bool

process_node(node)

Process pending input signals for node.

Parameters:

node (SchemeNode) –

Return type:

None

process_queued(max_nodes=None)

Process queued signals.

Take the first eligible node from the pending input queue and deliver all scheduled signals.

Parameters:

max_nodes (Optional[Any]) –

Return type:

None

process_signals_for_widget(node, widget, signals)[source]

Process new signals for the OWBaseWidget.

processingFinished

Emitted right after a SchemeNode instance has had its inputs updated.

processingStarted

Emitted right before a SchemeNode instance has its inputs updated.

property(self, name: str | None) Any

Purge the link (send None for all ids currently present)

Deprecated since version 0.1.19.

Parameters:

link (SchemeLink) –

Return type:

None

pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject | None)
remove_pending_signals(node)

Remove pending signals for node.

Parameters:

node (SchemeNode) –

Return type:

None

resume()

Resume the delivery of signals.

Return type:

None

runtimeStateChanged

Emitted when SignalManager’s runtime state changes.

runtime_state()

Return the runtime state. This can be SignalManager.Waiting or SignalManager.Processing.

Return type:

RuntimeState

scheme()

Return the Scheme instance.

Return type:

Optional[Scheme]

send(widget, signal_name, value, *args, **kwargs)[source]

send method compatible with OWBaseWidget.

send_to_node(node, signals)

Implementation of SignalManager.send_to_node.

Deliver input signals to an OWBaseWidget instance.

sender(self) QObject | None
senderSignalIndex(self) int
setObjectName(self, name: str | None)
setParent(self, a0: QObject | None)
setProperty(self, name: str | None, value: Any) bool
set_input_value(widget, signal_name, value)
set_max_active(val)
Parameters:

val (int) –

Return type:

None

set_output_value(widget, signal_name, value)
set_workflow(workflow)

Set the workflow model.

Return type:

None

Parameters

workflow : Scheme

param workflow:

type workflow:

Scheme

signalsBlocked(self) bool

Return Signal instances representing the current values present on the link.

Parameters:

link (SchemeLink) –

Return type:

List[Signal]

start()

Start the update loop.

Return type:

None

Note

The updates will not happen until the control reaches the Qt event loop.

startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
started

Emitted when starting initial execution and when resuming after already emitting finished.

state()

Return the current state.

Return type:

State

Return

state : SignalManager.State

stateChanged

Emitted when the state of the signal manager changes.

staticMetaObject = <PyQt5.QtCore.QMetaObject object>
step()

Deliver signals to a single node (only applicable while the state() is Paused).

Return type:

None

stop()

Stop the update loop.

Return type:

None

Note

If the SignalManager is currently in process_queues it will still update all current pending signals, but will not re-enter until start() is called again.

thread(self) QThread | None
timerEvent(self, a0: QTimerEvent | None)
tr(self, sourceText: str | None, disambiguation: str | None = None, n: int = -1) str
updatesPending

Emitted when signals are added to the queue.

widget_is_executed(widget)[source]
workflow()

Return the Scheme instance.

Return type:

Optional[Scheme]