ewoksorange.gui.orange_utils.signal_manager.SignalManagerWithScheme#
- class ewoksorange.gui.orange_utils.signal_manager.SignalManagerWithScheme(*args, **kwargs)[source]#
Bases:
SignalManagerWithOutputTracking,WidgetsSignalManagerUsed 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(*values)#
Bases:
IntEnumSignalManager runtime state.
See Also#
SignalManager.runtime_state
- Processing = 1#
…
- Waiting = 0#
Waiting, idle state. The signal queue is empty
- as_integer_ratio()#
Return a pair of integers, whose ratio is equal to the original int.
The ratio is in lowest terms and has a positive denominator.
>>> (10).as_integer_ratio() (10, 1) >>> (-10).as_integer_ratio() (-10, 1) >>> (0).as_integer_ratio() (0, 1)
- bit_count()#
Number of ones in the binary representation of the absolute value of self.
Also known as the population count.
>>> bin(13) '0b1101' >>> (13).bit_count() 3
- bit_length()#
Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
- conjugate()#
Returns self, the complex conjugate of any int.
- denominator#
the denominator of a rational number in lowest terms
- classmethod from_bytes(bytes, byteorder='big', *, signed=False)#
Return the integer represented by the given array of bytes.
- bytes
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.
- signed
Indicates whether two’s complement is used to represent the integer.
- imag#
the imaginary part of a complex number
- is_integer()#
Returns True. Exists for duck type compatibility with float.is_integer.
- numerator#
the numerator of a rational number in lowest terms
- real#
the real part of a complex number
- to_bytes(length=1, byteorder='big', *, signed=False)#
Return an array of bytes representing an integer.
- length
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.
- signed
Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
- class State(*values)#
Bases:
IntEnumSignalManager 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
- as_integer_ratio()#
Return a pair of integers, whose ratio is equal to the original int.
The ratio is in lowest terms and has a positive denominator.
>>> (10).as_integer_ratio() (10, 1) >>> (-10).as_integer_ratio() (-10, 1) >>> (0).as_integer_ratio() (0, 1)
- bit_count()#
Number of ones in the binary representation of the absolute value of self.
Also known as the population count.
>>> bin(13) '0b1101' >>> (13).bit_count() 3
- bit_length()#
Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
- conjugate()#
Returns self, the complex conjugate of any int.
- denominator#
the denominator of a rational number in lowest terms
- classmethod from_bytes(bytes, byteorder='big', *, signed=False)#
Return the integer represented by the given array of bytes.
- bytes
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.
- signed
Indicates whether two’s complement is used to represent the integer.
- imag#
the imaginary part of a complex number
- is_integer()#
Returns True. Exists for duck type compatibility with float.is_integer.
- numerator#
the numerator of a rational number in lowest terms
- real#
the real part of a complex number
- to_bytes(length=1, byteorder='big', *, signed=False)#
Return an array of bytes representing an integer.
- length
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.
- signed
Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
- 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.
Added in version 0.1.8.
- Return type:
List[SchemeNode]
- classmethod blockSignals(self, b: bool) bool#
- blocking_nodes()#
Return a list of nodes in a blocking state.
- Return type:
List[SchemeNode]
- classmethod childEvent(self, a0: QChildEvent | None)#
- classmethod children(self) list[QObject]#
- compress_signals(signals)#
Reimplemented from
SignalManager.compress_signals().
- classmethod connectNotify(self, signal: QMetaMethod)#
- classmethod customEvent(self, a0: QEvent | None)#
- classmethod deleteLater(self)#
- destroyed#
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- classmethod disconnect(a0: QMetaObject.Connection) bool#
- classmethod disconnect(self)
- classmethod disconnectNotify(self, signal: QMetaMethod)#
- classmethod dumpObjectInfo(self)#
- classmethod dumpObjectTree(self)#
- classmethod dynamicPropertyNames(self) list[QByteArray]#
- classmethod event(self, a0: QEvent | None) bool#
- eventFilter(recv, event)#
- Parameters:
recv (
QObject)event (
QEvent)
- Return type:
bool
- classmethod findChild(self, type: type[QObjectT], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObjectT#
- classmethod findChild(self, types: tuple[type[QObjectT], ...], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObjectT
- classmethod findChildren(self, type: type[QObjectT], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) list[QObjectT]#
- classmethod findChildren(self, types: tuple[type[QObjectT], ...], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) list[QObjectT]
- classmethod findChildren(self, type: type[QObjectT], re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) list[QObjectT]
- classmethod findChildren(self, types: tuple[type[QObjectT], ...], re: QRegularExpression, options: 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(owwidget, signal_name, timeout=None)#
- Return type:
Any
- get_output_value(owwidget, signal_name, timeout=None)#
- Return type:
Any
- has_input_value(owwidget, signal_name)#
- Return type:
bool
- 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.
Added in version 0.1.8.
- type node:
SchemeNode- param node:
- has_invalidated_outputs(node)#
Does node have any explicitly invalidated outputs.
- Return type:
bool
Parameters#
node: SchemeNode
Returns#
state: bool
See also#
invalidate
Added in version 0.1.8.
- type node:
SchemeNode- param node:
- has_output_value(owwidget, signal_name)#
- Return type:
bool
- has_pending()#
Does the manager have any signals to deliver?
- Return type:
bool
- classmethod inherits(self, classname: str) bool#
- classmethod installEventFilter(self, a0: QObject | None)#
- invalidate_input_value(owwidget, signal_name)#
- Return type:
None
- invalidate_output_value(owwidget, signal_name)#
- Return type:
None
- invalidated_nodes()#
Return a list of invalidated nodes.
Added in version 0.1.8.
- Return type:
List[SchemeNode]
- classmethod isQmlExposed(self) bool#
- classmethod isQuickItemType(self) bool#
- classmethod isSignalConnected(self, signal: QMetaMethod) bool#
- classmethod isWidgetType(self) bool#
- classmethod isWindowType(self) bool#
- is_active(node)#
Is the node considered active (executing a task).
- Return type:
bool
Parameters#
node: SchemeNode
Returns#
active: bool
- type node:
SchemeNode- param node:
- 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_invalidated(node)#
Reimplemented from SignalManager
- 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
- type node:
SchemeNode- param node:
- is_ready(node)#
Reimplemented from SignalManager
- Parameters:
node (
SchemeNode)- Return type:
bool
- classmethod killTimer(self, id: int)#
- link_contents(link)#
Return the contents on the link.
- Parameters:
link (
SchemeLink)- Return type:
Dict[Any,Any]
- max_active()#
- Return type:
int
- classmethod metaObject(self) QMetaObject | None#
- classmethod 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.
- classmethod objectName(self) str#
- objectNameChanged#
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- classmethod 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 (
Any)- Return type:
None
- process_signals_for_widget(node, owwidget, signals)[source]#
Process new signals for the OWBaseWidget.
- Return type:
None
- processingFinished#
Emitted right after a SchemeNode instance has had its inputs updated.
- processingStarted#
Emitted right before a SchemeNode instance has its inputs updated.
- classmethod property(self, name: str) Any#
- purge_link(link)#
Purge the link (send None for all ids currently present)
Deprecated since version 0.1.19.
- Parameters:
link (
SchemeLink)- Return type:
None
- classmethod 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.
- classmethod receivers(self, signal: PYQT_SIGNAL) int#
- classmethod 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
Schemeinstance.- Return type:
Optional[Scheme]
- send(owwidget, signal_name, value, *args, **kwargs)[source]#
send method compatible with OWBaseWidget.
- Return type:
None
- send_to_node(node, signals)#
Implementation of SignalManager.send_to_node.
Deliver input signals to an OWBaseWidget instance.
- classmethod sender(self) QObject | None#
- classmethod senderSignalIndex(self) int#
- classmethod setObjectName(self, name: QByteArray | bytes | bytearray | memoryview | str | None)#
- classmethod setParent(self, a0: QObject | None)#
- classmethod setProperty(self, name: str, value: Any) bool#
- set_input_value(owwidget, signal_name, value)#
- Return type:
None
- set_max_active(val)#
- Parameters:
val (
int)- Return type:
None
- set_output_value(owwidget, signal_name, value)#
- Return type:
None
- set_workflow(workflow)#
Set the workflow model.
- Return type:
None
Parameters#
workflow : Scheme
- type workflow:
Scheme- param workflow:
- classmethod signalsBlocked(self) bool#
- signals_on_link(link)#
Return
Signalinstances 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.
- classmethod startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int#
- started#
Emitted when starting initial execution and when resuming after already emitting finished.
- stateChanged#
Emitted when the state of the signal manager changes.
- staticMetaObject = <PyQt6.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.
- classmethod thread(self) QThread | None#
- classmethod timerEvent(self, a0: QTimerEvent | None)#
- classmethod tr(sourceText: str, disambiguation: str = None, n: int = -1) str#
- updatesPending#
Emitted when signals are added to the queue.
- widget_is_executed(owwidget)#
- Return type:
bool
- widget_is_finished(owwidget)[source]#
Widget is executed for the last time and will not be execute again
- Return type:
bool
- workflow()#
Return the
Schemeinstance.- Return type:
Optional[Scheme]