ewoksorange.tests.test_execute_task.OneThreadTestWidget#
- class ewoksorange.tests.test_execute_task.OneThreadTestWidget(*args, recorded_calls, failures, **kw)[source]#
Bases:
PatchCalls,OWEwoksWidgetOneThread- Parameters:
recorded_calls (
List[str])failures (
Dict[str,Exception])
- Accepted = 1#
- class DialogCode(*values)#
Bases:
IntEnum- Accepted = 1#
- Rejected = 0#
- 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.
- DrawChildren = 2#
- DrawWindowBackground = 1#
- class Error(widget)#
Bases:
MessageGroupBase class for groups of error messages in widgets
- activate_msg(msg, msg_id=None)#
Activate a message and emit the signal messageActivated
- Args:
msg (_BoundMsg): the message to activate msg_id (int): id for old-style message (to be removed in the future)
- property active#
Sequence[_BoundMsg]: Sequence of all currently active messages.
- add_message(name, msg='{}')#
Add and bind message to a group that is already instantiated and bound.
If the message with that name already exists, the method does nothing. The method is used by helpers like this (simplified) one:
def check_results(results, msg_group): msg_group.add_message("invalid_results", "Results do not include any data") msg_group.invalid_results.clear() if results.data is None: msg_group.invalid_results()
The helper is called from several widgets with check_results(results, self.Error)
- Args:
name (str): the name of the member with the message msg (str or UnboundMsg): message text or instance (default “{}”)
- bar_background = '#ffc6c6'#
- bar_icon = 11#
- clear(*, owner=None)#
Deactivate all active message from this group.
- deactivate_msg(msg)#
Deactivate a message and emit the signal messageDeactivated.
- Args:
msg (_BoundMsg): the message to deactivate
- severity = 3#
- IgnoreMask = 4#
- class Information(widget)#
Bases:
MessageGroupBase class for groups of information messages in widgets
- activate_msg(msg, msg_id=None)#
Activate a message and emit the signal messageActivated
- Args:
msg (_BoundMsg): the message to activate msg_id (int): id for old-style message (to be removed in the future)
- property active#
Sequence[_BoundMsg]: Sequence of all currently active messages.
- add_message(name, msg='{}')#
Add and bind message to a group that is already instantiated and bound.
If the message with that name already exists, the method does nothing. The method is used by helpers like this (simplified) one:
def check_results(results, msg_group): msg_group.add_message("invalid_results", "Results do not include any data") msg_group.invalid_results.clear() if results.data is None: msg_group.invalid_results()
The helper is called from several widgets with check_results(results, self.Error)
- Args:
name (str): the name of the member with the message msg (str or UnboundMsg): message text or instance (default “{}”)
- bar_background = '#ceceff'#
- bar_icon = 9#
- clear(*, owner=None)#
Deactivate all active message from this group.
- deactivate_msg(msg)#
Deactivate a message and emit the signal messageDeactivated.
- Args:
msg (_BoundMsg): the message to deactivate
- severity = 1#
- class Inputs#
Bases:
object- a = Input(name='a', type=<class 'object'>, handler='a_ewoks_input_setter', ...)#
- b = Input(name='b', type=<class 'object'>, handler='b_ewoks_input_setter', ...)#
- failures = Input(name='failures', type=<class 'object'>, handler='failures_ewoks_input_setter', ...)#
- recorded_calls = Input(name='recorded_calls', type=<class 'object'>, handler='recorded_calls_ewoks_input_setter', ...)#
- class PaintDeviceMetric(*values)#
Bases:
Enum- PdmDepth = 6#
- PdmDevicePixelRatio = 11#
- PdmDevicePixelRatioF_EncodedA = 13#
- PdmDevicePixelRatioF_EncodedB = 14#
- PdmDevicePixelRatioScaled = 12#
- PdmDpiX = 7#
- PdmDpiY = 8#
- PdmHeight = 2#
- PdmHeightMM = 4#
- PdmNumColors = 5#
- PdmPhysicalDpiX = 9#
- PdmPhysicalDpiY = 10#
- PdmWidth = 1#
- PdmWidthMM = 3#
- PdmDepth = 6#
- PdmDevicePixelRatio = 11#
- PdmDevicePixelRatioF_EncodedA = 13#
- PdmDevicePixelRatioF_EncodedB = 14#
- PdmDevicePixelRatioScaled = 12#
- PdmDpiX = 7#
- PdmDpiY = 8#
- PdmHeight = 2#
- PdmHeightMM = 4#
- PdmNumColors = 5#
- PdmPhysicalDpiX = 9#
- PdmPhysicalDpiY = 10#
- PdmWidth = 1#
- PdmWidthMM = 3#
- Rejected = 0#
- UserAdviceMessages = []#
A list of advice messages to display to the user. (when a widget is first shown a message from this list is selected for display. If a user accepts (clicks ‘Ok. Got it’) the choice is recorded and the message is never shown again (closing the message will not mark it as seen). Messages can be displayed again by pressing Shift + F1)
- class Warning(widget)#
Bases:
MessageGroupBase class for groups of warning messages in widgets
- activate_msg(msg, msg_id=None)#
Activate a message and emit the signal messageActivated
- Args:
msg (_BoundMsg): the message to activate msg_id (int): id for old-style message (to be removed in the future)
- property active#
Sequence[_BoundMsg]: Sequence of all currently active messages.
- add_message(name, msg='{}')#
Add and bind message to a group that is already instantiated and bound.
If the message with that name already exists, the method does nothing. The method is used by helpers like this (simplified) one:
def check_results(results, msg_group): msg_group.add_message("invalid_results", "Results do not include any data") msg_group.invalid_results.clear() if results.data is None: msg_group.invalid_results()
The helper is called from several widgets with check_results(results, self.Error)
- Args:
name (str): the name of the member with the message msg (str or UnboundMsg): message text or instance (default “{}”)
- bar_background = '#ffffc9'#
- bar_icon = 10#
- clear(*, owner=None)#
Deactivate all active message from this group.
- deactivate_msg(msg)#
Deactivate a message and emit the signal messageDeactivated.
- Args:
msg (_BoundMsg): the message to deactivate
- severity = 2#
- a_ewoks_input_setter(value)#
- classmethod accept(self)#
- classmethod acceptDrops(self) bool#
- accepted#
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 accessibleDescription(self) str#
- classmethod accessibleIdentifier(self) str#
- classmethod accessibleName(self) str#
- actionEvent(event)#
- Parameters:
event (
QActionEvent)- Return type:
None
- classmethod actions(self) list[QAction]#
- classmethod activateWindow(self)#
- classmethod addAction(self, icon: QIcon, text: str | None) QAction | None#
- classmethod addAction(self, icon: QIcon, text: str | None, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection) QAction | None
- classmethod addAction(self, icon: QIcon, text: str | None, shortcut: QKeySequence | QKeySequence.StandardKey | str | None | int) QAction | None
- classmethod addAction(self, icon: QIcon, text: str | None, shortcut: QKeySequence | QKeySequence.StandardKey | str | None | int, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection) QAction | None
- classmethod addAction(self, text: str | None) QAction | None
- classmethod addAction(self, text: str | None, shortcut: QKeySequence | QKeySequence.StandardKey | str | None | int) QAction | None
- classmethod addAction(self, text: str | None, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection) QAction | None
- classmethod addAction(self, text: str | None, shortcut: QKeySequence | QKeySequence.StandardKey | str | None | int, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection) QAction | None
- classmethod addAction(self, action: QAction | None)
- classmethod addActions(self, actions: Iterable[QAction])#
- classmethod adjustSize(self)#
- classmethod autoFillBackground(self) bool#
- b_ewoks_input_setter(value)#
- classmethod backgroundRole(self) QPalette.ColorRole#
- classmethod baseSize(self) QSize#
- classmethod blockSignals(self, b: bool) bool#
- blockingStateChanged#
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.
- buttons_area_orientation = 1#
Orientation of the buttonsArea box; valid only if want_control_area is True. Possible values are Qt.Horizontal, Qt.Vertical and None for no buttons area
- cancel_running_task()#
Request cancellation of a running task.
- captionTitle = ''#
- category = None#
Explicitly set widget category, should it not already be part of a package.
- classmethod changeEvent(self, a0: QEvent | None)#
- classmethod childAt(self, p: QPoint) QWidget | None#
- classmethod childAt(self, p: QPointF) QWidget | None
- classmethod childAt(self, ax: int, ay: int) QWidget | None
- classmethod childEvent(self, a0: QChildEvent | None)#
- classmethod children(self) list[QObject]#
- classmethod childrenRect(self) QRect#
- classmethod childrenRegion(self) QRegion#
- classmethod clearFocus(self)#
- classmethod clearMask(self)#
- clear_downstream()#
Propagate INVALIDATION_DATA to all downstream outputs.
Useful to indicate that this node’s outputs are invalid (e.g., after failure).
- Return type:
None
- clear_messages()#
Clear all messages
- classmethod close(self) bool#
- closeContext()#
Save the current settings and close the current context.
Widgets that have context settings must call this method before reinitializing the user interface (e.g. combo boxes) with the new data.
- closeEvent(event)#
Overloaded to save the geometry when the widget is closed
- classmethod colorCount(self) int#
- combo_value(combo)#
Add the value of a combo box to the report.
The methods assumes that the combo box was created by
Orange.widget.gui.comboBox. If the value of the combo equals combo.emptyString, this function returns None.
- classmethod connectNotify(self, signal: QMetaMethod)#
- connect_control(name, func)#
Add func to the list of functions called when the value of the attribute name is set.
If the name includes a dot, it is assumed that the part the before the first dot is a name of an attribute containing an instance of a component, and the call is transferred to its conntect_control. For instance, calling `obj.connect_control(“graph.attr_x”, f) is equivalent to obj.graph.connect_control(“attr_x”, f).
- Args:
name (str): attribute name func (callable): callback function
- classmethod contentsMargins(self) QMargins#
- classmethod contentsRect(self) QRect#
- contextAboutToBeOpened#
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.
- contextClosed#
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 contextMenuEvent(self, a0: QContextMenuEvent | None)#
- classmethod contextMenuPolicy(self) Qt.ContextMenuPolicy#
- contextOpened#
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.
- controlAreaVisible = Setting "None"#
- classmethod convert_signals()#
Maintenance and sanity checks for signals.
Convert tuple descriptions into old-style signals for backwards compatibility
For new-style in classes, copy attribute name to id, if id is not set explicitly
Check that all input signals have handlers
Check that the same name and/or does not refer to different signals.
This method is called from the meta-class.
- copy_to_clipboard()#
- classmethod create(self, window: PyQt6.sip.voidptr = None, initializeWindow: bool = True, destroyOldWindow: bool = True)#
- classmethod createWindowContainer(window: QWindow | None, parent: QWidget | None = None, flags: Qt.WindowType = Qt.WindowFlags()) QWidget#
- create_report_html()#
Start a new section in report and call
send_reportmethod to add content.
- classmethod cursor(self) QCursor#
- customContextMenuRequested#
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 customEvent(self, a0: QEvent | None)#
- default_inputs = Setting "None"#
- classmethod deleteLater(self)#
- classmethod depth(self) int#
- description = ''#
Short widget description, displayed in canvas help tooltips.
- classmethod destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)#
- 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 devType(self) int#
- classmethod devicePixelRatio(self) float#
- classmethod devicePixelRatioF(self) float#
- classmethod devicePixelRatioFScale() float#
- classmethod disconnect(a0: QMetaObject.Connection) bool#
- classmethod disconnect(self)
- classmethod disconnectNotify(self, signal: QMetaMethod)#
- classmethod done(self, a0: int)#
- classmethod dragEnterEvent(self, a0: QDragEnterEvent | None)#
- classmethod dragLeaveEvent(self, a0: QDragLeaveEvent | None)#
- classmethod dragMoveEvent(self, a0: QDragMoveEvent | None)#
- classmethod dropEvent(self, a0: QDropEvent | None)#
- classmethod dumpObjectInfo(self)#
- classmethod dumpObjectTree(self)#
- classmethod dynamicPropertyNames(self) list[QByteArray]#
- classmethod effectiveWinId(self) PyQt6.sip.voidptr#
- classmethod ensurePolished(self)#
- classmethod enterEvent(self, event: QEnterEvent | None)#
- error(text_or_id=None, text=None, shown=True)#
- classmethod event(self, a0: QEvent | None) bool#
- classmethod eventFilter(self, a0: QObject | None, a1: QEvent | None) bool#
- ewokstaskclass#
alias of
TaskForTesting
- classmethod exec(self) int#
- execute_ewoks_task(log_missing_inputs=True)#
Execute the Ewoks task and propagate downstream on completion.
- Parameters:
log_missing_inputs (
bool) – Whether missing inputs should be logged.- Return type:
None
- execute_ewoks_task_without_propagation()#
Execute the Ewoks task without propagating outputs downstream.
- Return type:
None
- failures_ewoks_input_setter(value)#
- classmethod find(a0: PyQt6.sip.voidptr) QWidget | None#
- 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#
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 focusInEvent(self, a0: QFocusEvent | None)#
- classmethod focusNextChild(self) bool#
- classmethod focusNextPrevChild(self, next: bool) bool#
- classmethod focusOutEvent(self, a0: QFocusEvent | None)#
- classmethod focusPolicy(self) Qt.FocusPolicy#
- classmethod focusPreviousChild(self) bool#
- classmethod focusProxy(self) QWidget | None#
- classmethod focusWidget(self) QWidget | None#
- classmethod font(self) QFont#
- classmethod fontInfo(self) QFontInfo#
- classmethod fontMetrics(self) QFontMetrics#
- classmethod foregroundRole(self) QPalette.ColorRole#
- classmethod frameGeometry(self) QRect#
- classmethod frameSize(self) QSize#
- classmethod geometry(self) QRect#
- get_default_input_names(include_missing=False, exclude_hidden=False)#
Return input names that have default values (or all input names).
- Parameters:
include_missing (
bool) – If True return all defined input names.exclude_hidden (
bool)
- Return type:
Set[str]- Returns:
Set of input names.
- get_default_input_value(name, default=None)#
Get a default input value saved in the pydantic models then updated by the widget settings.
- Parameters:
name (
str) – Input name.default (
Any) – Fallback if the value is not present.
- Return type:
Any- Returns:
The default value or provided fallback.
- get_default_input_values(include_missing=False, defaults=None, exclude_hidden=False)#
Return default input values or a mapping including missing markers.
- Parameters:
include_missing (
bool) – If True include all input names set to INVALIDATION_DATA initially.defaults (
Optional[Mapping]) – Optional mapping of default overrides.exclude_hidden (
bool)
- Return type:
dict- Returns:
Dict of input name -> value or missing marker.
- get_dynamic_input_names(include_missing=False, exclude_hidden=False)#
Return input names that have dynamic variables (or all input names).
- Parameters:
include_missing (
bool) – If True return all defined input names.exclude_hidden (
bool)
- Return type:
set- Returns:
Set of input names.
- get_dynamic_input_value(name, default=None)#
Get a dynamic input value provided by upstream nodes.
- Parameters:
name (
str) – Input name.default (
Any) – Fallback if not present.
- Return type:
Any- Returns:
The dynamic value or provided fallback.
- get_dynamic_input_values(include_missing=False, defaults=None, exclude_hidden=False)#
Return dynamic input values or a mapping including missing markers.
- Parameters:
include_missing (
bool) – If True include all input names set to INVALIDATION_DATA initially.defaults (
Optional[Mapping]) – Optional mapping of default overrides.exclude_hidden (
bool)
- Return type:
dict- Returns:
Dict of input name -> value or missing marker.
- classmethod get_flags()#
- classmethod get_input_names(exclude_hidden=False)#
Return Ewoks task input names for the bound task class.
- Return type:
Set[str]- Returns:
Iterable of input name strings.
- Parameters:
exclude_hidden (
bool)
- classmethod get_output_names(exclude_hidden=False)#
Return Ewoks task output names for the bound task class.
- Return type:
Set[str]- Returns:
Iterable of output name strings.
- Parameters:
exclude_hidden (
bool)
- classmethod get_signals(direction, ignore_old_style=False)#
Return a list of InputSignal or OutputSignal needed for the widget description. For old-style signals, the method returns the original list. New-style signals are collected into a list.
Parameters#
direction (str): “inputs” or “outputs”
Returns#
list of InputSignal or OutputSignal
- get_task_input_value(name, default=<MISSING_DATA>)#
Retrieve a single task input value by name, returning default if missing.
- Parameters:
name (
str) – Input name.default (
Any) – Fallback when missing.
- Return type:
Any- Returns:
The extracted input value or default.
- get_task_input_values(exclude_hidden=False)#
Return all task input values (dynamic or default when missing).
- Return type:
dict- Returns:
Dict of input name -> plain value.
- Parameters:
exclude_hidden (
bool)
- get_task_inputs(exclude_hidden=False)#
Merge default and dynamic inputs producing the inputs mapping used by tasks.
- Return type:
dict- Returns:
Mapping of input name -> Variable or value (may include missing markers).
- Parameters:
exclude_hidden (
bool)
- get_task_output_value(name, default=<MISSING_DATA>)#
Retrieve a single task output value by name, returning default if missing.
- Parameters:
name – Output name.
default (
Any) – Fallback when missing.
- Return type:
Any- Returns:
The extracted output value or default.
- get_task_output_values(exclude_hidden=False)#
Return all task output values extracted from Variables.
- Return type:
dict- Returns:
Dict of output name -> plain value (missing replaced).
- Parameters:
exclude_hidden (
bool)
- get_task_outputs(exclude_hidden=False)#
Return task output variables.
Subclasses must implement this to return a dict-like mapping of output name to Variable.
- Parameters:
exclude_hidden (
bool)- Return type:
dict
- classmethod get_widget_description()#
- get_widget_name_extension()#
Return the text that is added to the section name in the report.
For instance, the Distribution widget adds the name of the attribute whose distribution is shown.
- Returns:
str or None
- classmethod grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(-1, -1))) QPixmap#
- classmethod grabGesture(self, type: Qt.GestureType, flags: Qt.GestureFlag = Qt.GestureFlags())#
- classmethod grabKeyboard(self)#
- classmethod grabMouse(self)#
- classmethod grabMouse(self, a0: QCursor | Qt.CursorShape)
- classmethod grabShortcut(self, key: QKeySequence | QKeySequence.StandardKey | str | None | int, context: Qt.ShortcutContext = Qt.WindowShortcut) int#
- graph_name = None#
Widget painted by Save graph button
- graph_writers = [<class 'orangewidget.io.PngFormat'>, <class 'orangewidget.io.SvgFormat'>, <class 'orangewidget.io.PdfFormat'>]#
- classmethod graphicsEffect(self) QGraphicsEffect | None#
- classmethod graphicsProxyWidget(self) QGraphicsProxyWidget | None#
- handleNewSignals()#
Called by Orange after all signal handlers have run to set dynamic inputs.
Default implementation triggers task execution (with propagation).
- Return type:
None
- classmethod hasFocus(self) bool#
- classmethod hasHeightForWidth(self) bool#
- classmethod hasMouseTracking(self) bool#
- classmethod hasTabletTracking(self) bool#
- classmethod height(self) int#
- classmethod heightForWidth(self, a0: int) int#
- classmethod heightMM(self) int#
- classmethod hide(self)#
- hideEvent(event)#
Overloaded to save the geometry when the widget is hidden
- icon = 'icons/Unknown.png'#
Widget icon path, relative to the defining module.
- id = None#
- property info: StateInfo#
A namespace for reporting I/O, state … related messages.
Added in version 3.19.
Returns#
namespace : StateInfo
- information(text_or_id=None, text=None, shown=True)#
- classmethod inherits(self, classname: str) bool#
- classmethod initPainter(self, painter: QPainter | None)#
- classmethod inputMethodEvent(self, a0: QInputMethodEvent | None)#
- classmethod inputMethodHints(self) Qt.InputMethodHint#
- classmethod inputMethodQuery(self, a0: Qt.InputMethodQuery) Any#
- inputs = []#
- classmethod insertAction(self, before: QAction | None, action: QAction | None)#
- classmethod insertActions(self, before: QAction | None, actions: Iterable[QAction])#
- insert_message_bar()#
Insert message bar into the widget.
This method must be called at the appropriate place in the widget layout setup by any widget that is using this mixin.
- classmethod installEventFilter(self, a0: QObject | None)#
- invalidatedStateChanged#
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 isActiveWindow(self) bool#
- classmethod isAncestorOf(self, child: QWidget | None) bool#
- isBlocking()#
Is this widget blocking signal processing.
- classmethod isEnabled(self) bool#
- classmethod isEnabledTo(self, a0: QWidget | None) bool#
- classmethod isFullScreen(self) bool#
- classmethod isHidden(self) bool#
- isInvalidated()#
Return the widget’s invalidated flag.
- Return type:
bool
- classmethod isLeftToRight(self) bool#
- classmethod isMaximized(self) bool#
- classmethod isMinimized(self) bool#
- classmethod isModal(self) bool#
- classmethod isQmlExposed(self) bool#
- classmethod isQuickItemType(self) bool#
- isReady()#
Return the widget’s ready state
- Return type:
bool
- classmethod isRightToLeft(self) bool#
- classmethod isSignalConnected(self, signal: QMetaMethod) bool#
- classmethod isSizeGripEnabled(self) bool#
- classmethod isVisible(self) bool#
- classmethod isVisibleTo(self, a0: QWidget | None) bool#
- classmethod isWidgetType(self) bool#
- classmethod isWindow(self) bool#
- classmethod isWindowModified(self) bool#
- classmethod isWindowType(self) bool#
- keyPressEvent(e)#
- Parameters:
e (
QKeyEvent)- Return type:
None
- keyReleaseEvent(event)#
- Parameters:
event (
QKeyEvent)- Return type:
None
- classmethod keyboardGrabber() QWidget | None#
- keywords = []#
Widget keywords, used for finding it in the quick menu.
- classmethod killTimer(self, id: int)#
- classmethod layout(self) QLayout | None#
- classmethod layoutDirection(self) Qt.LayoutDirection#
- classmethod leaveEvent(self, a0: QEvent | None)#
- classmethod locale(self) QLocale#
- classmethod logicalDpiX(self) int#
- classmethod logicalDpiY(self) int#
- classmethod lower(self)#
- mainArea_width_height_ratio = 1.1#
Ratio between width and height for mainArea widgets, set to None for super().sizeHint()
- classmethod mapFrom(self, a0: QWidget | None, a1: QPoint) QPoint#
- classmethod mapFrom(self, a0: QWidget | None, a1: QPointF) QPointF
- classmethod mapFromGlobal(self, a0: QPoint) QPoint#
- classmethod mapFromGlobal(self, a0: QPointF) QPointF
- classmethod mapFromParent(self, a0: QPoint) QPoint#
- classmethod mapFromParent(self, a0: QPointF) QPointF
- classmethod mapTo(self, a0: QWidget | None, a1: QPoint) QPoint#
- classmethod mapTo(self, a0: QWidget | None, a1: QPointF) QPointF
- classmethod mapToGlobal(self, a0: QPoint) QPoint#
- classmethod mapToGlobal(self, a0: QPointF) QPointF
- classmethod mapToParent(self, a0: QPoint) QPoint#
- classmethod mapToParent(self, a0: QPointF) QPointF
- classmethod mask(self) QRegion#
- classmethod maximumHeight(self) int#
- classmethod maximumSize(self) QSize#
- classmethod maximumWidth(self) int#
- Return type:
QMenuBar
- messageActivated#
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.
- messageDeactivated#
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 metaObject(self) QMetaObject | None#
- classmethod metric(self, a0: QPaintDevice.PaintDeviceMetric) int#
- classmethod migrate_context(context, version)#
Fix contexts to work with the current version of widgets
Parameters#
- contextContext
Context object
- versionOptional[int]
version of the saved context or None if context was created before migrations
- classmethod migrate_settings(settings, version)#
Fix settings to work with the current version of widgets
Parameters#
- settingsdict
dict of name - value mappings
- versionOptional[int]
version of the saved settings or None if settings were created before migrations
- classmethod minimumHeight(self) int#
- classmethod minimumSize(self) QSize#
- classmethod minimumSizeHint(self) QSize#
- classmethod minimumWidth(self) int#
- classmethod mouseDoubleClickEvent(self, a0: QMouseEvent | None)#
- classmethod mouseGrabber() QWidget | None#
- classmethod mouseMoveEvent(self, a0: QMouseEvent | None)#
- mousePressEvent(event)#
Flash message bar icon on mouse press
- classmethod mouseReleaseEvent(self, a0: QMouseEvent | None)#
- classmethod move(self, a0: QPoint)#
- classmethod move(self, ax: int, ay: int)
- moveEvent(event)#
Overloaded to save the geometry when the widget is moved
- classmethod moveToThread(self, thread: QThread | None)#
- name = 'TaskForTesting'#
Widget name, as presented in the Canvas.
- classmethod nativeEvent(self, eventType: QByteArray | bytes | bytearray | memoryview, message: PyQt6.sip.voidptr)#
- classmethod nativeParentWidget(self) QWidget | None#
- classmethod nextInFocusChain(self) QWidget | None#
- classmethod normalGeometry(self) QRect#
- 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.
- onDeleteWidget()#
Clean up progress connections and task executors on widget deletion.
- classmethod open(self)#
- openContext(*a)#
Open a new context corresponding to the given data.
The settings handler first checks the stored context for a suitable match. If one is found, it becomes the current contexts and the widgets settings are initialized accordingly. If no suitable context exists, a new context is created and data is copied from the widget’s settings into the new context.
Widgets that have context settings must call this method after reinitializing the user interface (e.g. combo boxes) with the new data.
The arguments given to this method are passed to the context handler. Their type depends upon the handler. For instance, DomainContextHandler expects Orange.data.Table or Orange.data.Domain.
- openVisualSettingsClicked#
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.
- output_summaries#
- outputs = []#
- classmethod overrideWindowFlags(self, type: Qt.WindowType)#
- classmethod overrideWindowState(self, state: Qt.WindowState)#
- classmethod paintEngine(self) QPaintEngine | None#
- classmethod paintEvent(self, a0: QPaintEvent | None)#
- classmethod paintingActive(self) bool#
- classmethod palette(self) QPalette#
- classmethod parent(self) QObject | None#
- classmethod parentWidget(self) QWidget | None#
- classmethod physicalDpiX(self) int#
- classmethod physicalDpiY(self) int#
- classmethod pos(self) QPoint#
- property post_task_exception: Exception | None#
Exception raised while running post-task callbacks (if any).
- Returns:
Exception instance or None.
- classmethod previousInFocusChain(self) QWidget | None#
- priority = 9223372036854775807#
Widget priority, used for sorting within a category.
- processingState#
- pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,
designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute
type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.
- processingStateChanged#
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.
- progressBarAdvance(value)#
Advance the progress bar by value.
Parameters#
- valuefloat
Progress value increment.
- progressBarFinished()#
Stop the widget’s progress (i.e hide the progress bar).
Parameters#
- valuefloat
Progress value increment.
- progressBarInit()#
Initialize the widget’s progress (i.e show and set progress to 0%).
- progressBarValue#
- pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,
designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute
type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.
- progressBarValueChanged#
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.
- propagate_downstream(succeeded=None)#
Trigger downstream propagation: send outputs on success or invalidation on failure.
- Parameters:
succeeded (
Optional[bool]) – Optional override of the current task success flag.- Return type:
None
- classmethod property(self, name: str) Any#
- 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 raise_(self)#
- readyStateChanged#
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 receivers(self, signal: PYQT_SIGNAL) int#
- recorded_calls_ewoks_input_setter(value)#
- classmethod rect(self) QRect#
- classmethod reject(self)#
- rejected#
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 releaseKeyboard(self)#
- classmethod releaseMouse(self)#
- classmethod releaseShortcut(self, id: int)#
- classmethod removeAction(self, action: QAction | None)#
- classmethod removeEventFilter(self, a0: QObject | None)#
- classmethod render(self, target: QPaintDevice | None, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))#
- classmethod render(self, painter: QPainter | None, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))
- classmethod repaint(self)#
- classmethod repaint(self, x: int, y: int, w: int, h: int)
- classmethod repaint(self, a0: QRect)
- classmethod repaint(self, a0: QRegion)
- replaces = None#
A list of widget IDs that this widget replaces in older workflows.
- report_caption(text)#
Add caption to the report.
- report_html = ''#
- report_items(name, items=None)#
Add a sequence of pairs or a dictionary as a HTML list to report.
The first argument, name can be omitted.
- Parameters:
name (str or tuple or dict) – report section name (can be omitted)
items (list or tuple or dict) – a sequence of items
- report_list(name, data=None, limit=1000)#
Add a list to the report.
The method accepts different kinds of one-dimensional data, including Qt’s views and models.
The first argument, name can be omitted.
- Parameters:
name (str) – name of the section
data (QAbstractItemModel or any object with method model() that returns QAbstractItemModel) – table to be reported
limit (int) – the maximal number of reported items (default: 1000)
- report_name(name)#
Add a section name to the report
- report_paragraph(name, text=None)#
Add a paragraph to the report.
The first argument, name can be omitted.
- Parameters:
name (str) – name of the section
text (str) – text of the paragraph
- report_plot(name=None, plot=None)#
Add a plot to the report.
Both arguments can be omitted.
- report_plot(“graph name”, self.plotView) reports plot
self.plotView with name “graph name”
`report_plot(self.plotView) reports plot without name
- report_plot() reports plot stored in attribute whose name is
taken from self.graph_name
- report_plot(“graph name”) reports plot stored in attribute
whose name is taken from self.graph_name
- Parameters:
name (str or tuple or dict) – report section name (can be omitted)
plot (QGraphicsScene or pyqtgraph.PlotItem or pyqtgraph.PlotWidget or pyqtgraph.GraphicsWidget. If omitted, the name of the attribute storing the graph is taken from self.graph_name) – plot widget
- report_raw(name, html=None)#
Add raw HTML to the report.
- report_table(name, table=None, header_rows=0, header_columns=0, num_format=None, indicate_selection=True)#
Add content of a table to the report.
The method accepts different kinds of two-dimensional data, including Qt’s views and models.
The first argument, name can be omitted if other arguments (except table) are passed as keyword arguments.
- Parameters:
name (str) – name of the section
table (QAbstractItemModel or QStandardItemModel or two-dimensional list or any object with method model() that returns one of the above) – table to be reported
header_rows (int) – the number of rows that are marked as header rows
header_columns (int) – the number of columns that are marked as header columns
num_format – numeric format, e.g. {:.3}
- reshow()#
Put the widget on top of all windows
- classmethod resize(self, a0: QSize)#
- classmethod resize(self, w: int, h: int)
- resizeEvent(event)#
Overloaded to save the geometry (width and height) when the widget is resized.
- resizing_enabled = True#
Should the widget’s window be resizeable? (if not, the widget will derive a fixed size constraint from its layout)
- classmethod restoreGeometry(self, geometry: QByteArray | bytes | bytearray | memoryview) bool#
- restoreGeometryAndLayoutState(state)#
Restore the geometry and layout of this widget to a state previously saved with
saveGeometryAndLayoutState().- Return type:
bool
Parameters#
- stateQByteArray
Saved state.
Returns#
- successbool
True if the state was successfully restored, False otherwise.
- type state:
QByteArray- param state:
- classmethod result(self) int#
- retrieveSpecificSettings()#
Retrieve data that is not registered as setting.
This method is called by orangewidget.settings.ContextHandler.settings_to_widget. Widgets may define it to retrieve any data that is not stored in widget attributes. See
Orange.widgets.data.owcolor.OWColorfor an example.
- classmethod saveGeometry(self) QByteArray#
- saveGeometryAndLayoutState()#
Save the current geometry and layout state of this widget and child windows (if applicable).
- Return type:
QByteArray
Returns#
- stateQByteArray
Saved state.
- saveSettings()#
Writes widget instance’s settings to class defaults. Usually called when the widget is deleted.
- save_graph()#
Save the graph with the name given in class attribute graph_name.
The method is called by the Save graph button, which is created automatically if the graph_name is defined.
- save_position = True#
Should the widget remember its window position/size?
- savedWidgetGeometry = Setting "None"#
- classmethod screen(self) QScreen | None#
- classmethod scroll(self, dx: int, dy: int)#
- classmethod scroll(self, dx: int, dy: int, a2: QRect)
- send(signalName, value, *args, **kwargs)#
Send a value on the signalName widget output.
An output with signalName must be defined in the class
outputslist.
- classmethod sender(self) QObject | None#
- classmethod senderSignalIndex(self) int#
- classmethod setAcceptDrops(self, on: bool)#
- classmethod setAccessibleDescription(self, description: str | None)#
- classmethod setAccessibleIdentifier(self, identifier: str | None)#
- classmethod setAccessibleName(self, name: str | None)#
- classmethod setAttribute(self, attribute: Qt.WidgetAttribute, on: bool = True)#
- classmethod setAutoFillBackground(self, enabled: bool)#
- classmethod setBackgroundRole(self, a0: QPalette.ColorRole)#
- classmethod setBaseSize(self, basew: int, baseh: int)#
- classmethod setBaseSize(self, s: QSize)
- setBlocking(state=True)#
Set blocking flag for this widget.
While this flag is set this widget and all its descendants will not receive any new signals from the workflow signal manager.
Deprecated since version 4.2.0: Setting/clearing this flag is equivalent to setInvalidated(True); setReady(False) and setInvalidated(False); setReady(True) respectively. Use
setInvalidated()andsetReady()in new code.See also
- Return type:
None
- setCaption(caption)#
- classmethod setContentsMargins(self, left: int, top: int, right: int, bottom: int)#
- classmethod setContentsMargins(self, margins: QMargins)
- classmethod setContextMenuPolicy(self, policy: Qt.ContextMenuPolicy)#
- classmethod setCursor(self, a0: QCursor | Qt.CursorShape)#
- classmethod setDisabled(self, a0: bool)#
- classmethod setEnabled(self, a0: bool)#
- classmethod setFixedHeight(self, h: int)#
- classmethod setFixedSize(self, a0: QSize)#
- classmethod setFixedSize(self, w: int, h: int)
- classmethod setFixedWidth(self, w: int)#
- classmethod setFocus(self)#
- classmethod setFocus(self, reason: Qt.FocusReason)
- classmethod setFocusPolicy(self, policy: Qt.FocusPolicy)#
- classmethod setFocusProxy(self, a0: QWidget | None)#
- classmethod setFont(self, a0: QFont)#
- classmethod setForegroundRole(self, a0: QPalette.ColorRole)#
- classmethod setGeometry(self, a0: QRect)#
- classmethod setGeometry(self, ax: int, ay: int, aw: int, ah: int)
- classmethod setGraphicsEffect(self, effect: QGraphicsEffect | None)#
- classmethod setHidden(self, hidden: bool)#
- classmethod setInputMethodHints(self, hints: Qt.InputMethodHint)#
- setInvalidated(state)#
Set/clear invalidated flag on this widget.
While this flag is set none of its descendants will receive new signals from the workflow execution manager.
This is useful for instance if the widget does it’s work in a separate thread or schedules processing from the event queue. In this case it can set the invalidated flag when starting a task. After the task has completed the widget can clear the flag and send the updated outputs.
Note
Failure to clear this flag will block dependent nodes forever.
See also
invalidate()for a more fine grained invalidation.- Parameters:
state (
bool)- Return type:
None
- classmethod setLayout(self, a0: QLayout | None)#
- classmethod setLayoutDirection(self, direction: Qt.LayoutDirection)#
- classmethod setLocale(self, locale: QLocale)#
- classmethod setMask(self, a0: QBitmap)#
- classmethod setMask(self, a0: QRegion)
- classmethod setMaximumHeight(self, maxh: int)#
- classmethod setMaximumSize(self, maxw: int, maxh: int)#
- classmethod setMaximumSize(self, s: QSize)
- classmethod setMaximumWidth(self, maxw: int)#
- classmethod setMinimumHeight(self, minh: int)#
- classmethod setMinimumSize(self, minw: int, minh: int)#
- classmethod setMinimumSize(self, s: QSize)
- classmethod setMinimumWidth(self, minw: int)#
- classmethod setModal(self, modal: bool)#
- classmethod setMouseTracking(self, enable: bool)#
- classmethod setObjectName(self, name: QByteArray | bytes | bytearray | memoryview | str | None)#
- classmethod setPalette(self, a0: QPalette)#
- classmethod setParent(self, parent: QWidget | None)#
- classmethod setParent(self, parent: QWidget | None, f: Qt.WindowType)
- classmethod setProperty(self, name: str, value: Any) bool#
- setReady(state)#
Set/clear ready flag on this widget.
While a ready flag is unset, the widget will not receive any new input updates from the workflow execution manager.
By default this flag is True.
- Parameters:
state (
bool)- Return type:
None
- classmethod setResult(self, r: int)#
- classmethod setScreen(self, a0: QScreen | None)#
- classmethod setShortcutAutoRepeat(self, id: int, enabled: bool = True)#
- classmethod setShortcutEnabled(self, id: int, enabled: bool = True)#
- classmethod setSizeGripEnabled(self, a0: bool)#
- classmethod setSizeIncrement(self, w: int, h: int)#
- classmethod setSizeIncrement(self, s: QSize)
- classmethod setSizePolicy(self, a0: QSizePolicy)#
- classmethod setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy)
- setStatusMessage(text)#
Set widget’s status message.
This is a short status string to be displayed inline next to the instantiated widget icon in the canvas.
- classmethod setStatusTip(self, a0: str | None)#
- classmethod setStyle(self, a0: QStyle | None)#
- classmethod setStyleSheet(self, styleSheet: str | None)#
- classmethod setTabOrder(a0: QWidget | None, a1: QWidget | None)#
- classmethod setTabletTracking(self, enable: bool)#
- classmethod setToolTip(self, a0: str | None)#
- classmethod setToolTipDuration(self, msec: int)#
- classmethod setUpdatesEnabled(self, enable: bool)#
- setVisible(visible)#
Reimplemented from QDialog.setVisible.
- Parameters:
visible (
bool)- Return type:
None
- classmethod setWhatsThis(self, a0: str | None)#
- classmethod setWindowFilePath(self, filePath: str | None)#
- classmethod setWindowFlag(self, a0: Qt.WindowType, on: bool = True)#
- classmethod setWindowFlags(self, type: Qt.WindowType)#
- classmethod setWindowIcon(self, icon: QIcon)#
- classmethod setWindowIconText(self, a0: str | None)#
- classmethod setWindowModality(self, windowModality: Qt.WindowModality)#
- classmethod setWindowModified(self, a0: bool)#
- classmethod setWindowOpacity(self, level: float)#
- classmethod setWindowRole(self, a0: str | None)#
- classmethod setWindowState(self, state: Qt.WindowState)#
- classmethod setWindowTitle(self, a0: str | None)#
- set_basic_layout()#
Provide the basic widget layout
Which parts are created is regulated by class attributes want_main_area, want_control_area, want_message_bar and buttons_area_orientation, the presence of method send_report and attribute graph_name.
- set_default_input(name, value)#
Set or remove a default input.
- Parameters:
name (
str) – Input name.value (
Any) – Input value. If it’s invalidation data the default is removed.
- Return type:
None
- set_dynamic_input(name, value)#
Set or remove a dynamic input variable (from upstream nodes).
- Parameters:
name (
str) – Input name.value (
Any) – Input variable or value. Invalid data removes the dynamic input.
- Return type:
None
- set_partial_input_summary(name, partial_summary, *, id=None, index=None)#
- set_partial_output_summary(name, partial_summary, *, id=None)#
- settingsAboutToBePacked#
Signal emitted before settings are packed and saved. (gives you a chance to sync state to Setting values)
- settingsHandler = <orangewidget.settings.SettingsHandler object>#
Settings handler, can be overridden for context handling.
- settings_version = 1#
Version of the settings representation (subclasses should increase this number when they make breaking changes to settings representation (a settings that used to store int now stores string) and handle migrations in migrate and migrate_context settings)
- short_name = None#
Short name for widget, displayed in toolbox. (set this if the widget’s conventional name is long)
- classmethod show(self)#
- showEvent(event)#
Overloaded to restore the geometry when the widget is shown
- classmethod showFullScreen(self)#
- classmethod showMaximized(self)#
- classmethod showMinimized(self)#
- classmethod showNormal(self)#
- show_preview(summaries)#
- show_report()#
Raise the report window.
- classmethod signalsBlocked(self) bool#
- classmethod size(self) QSize#
- sizeHint(self) QSize#
- classmethod sizeIncrement(self) QSize#
- classmethod sizePolicy(self) QSizePolicy#
- classmethod stackUnder(self, a0: QWidget | None)#
- startTime = -1#
- classmethod startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int#
- staticMetaObject = <PyQt6.QtCore.QMetaObject object>#
- statusBar()#
Return the widget’s status bar.
The status bar can be hidden/shown (self.statusBar().setVisible()).
- Return type:
QStatusBar
Note#
The status bar takes control of the widget’s bottom margin (contentsMargins) to layout itself in the OWBaseWidget.
- statusMessage()#
Return the widget’s status message.
- statusMessageChanged#
Widget’s status message has changed.
- classmethod statusTip(self) str#
- storeSpecificSettings()#
Store data that is not registered as setting.
This method is called by orangewidget.settings.ContextHandler.settings_from_widget. Widgets may define it to store any data that is not stored in widget attributes. See
Orange.widgets.data.owcolor.OWColorfor an example.
- classmethod style(self) QStyle | None#
- classmethod styleSheet(self) str#
- classmethod tabletEvent(self, a0: QTabletEvent | None)#
- property task_done: bool | None#
Whether the most recent task execution finished (success or failure).
- Returns:
True/False or None if never run.
- property task_exception: Exception | None#
Exception raised during the most recent task execution, if any.
- Returns:
Exception instance or None.
- property task_executor#
Access the underlying ThreadedTaskExecutor instance.
- task_output_changed()#
Default callback invoked when task output changed.
Subclasses may override to react to this event.
- Return type:
None
- property task_output_changed_callbacks: list#
Access the list of callbacks executed after task output change.
- Returns:
List of callables.
- property task_succeeded: bool | None#
Whether the most recent task execution succeeded.
- Returns:
True if succeeded, False if failed, or None if never run.
- classmethod testAttribute(self, attribute: Qt.WidgetAttribute) bool#
- classmethod thread(self) QThread | None#
- classmethod timerEvent(self, a0: QTimerEvent | None)#
- classmethod toolTip(self) str#
- classmethod toolTipDuration(self) int#
- classmethod tr(sourceText: str, disambiguation: str = None, n: int = -1) str#
- trigger_downstream()#
Send the current task output variables downstream via Orange signals.
Outputs set to invalidation data are sent as INVALIDATION_DATA.
- Return type:
None
- classmethod underMouse(self) bool#
- classmethod ungrabGesture(self, type: Qt.GestureType)#
- classmethod unsetCursor(self)#
- classmethod unsetLayoutDirection(self)#
- classmethod unsetLocale(self)#
- classmethod update(self)#
- classmethod update(self, a0: QRect)
- classmethod update(self, a0: QRegion)
- classmethod update(self, ax: int, ay: int, aw: int, ah: int)
- classmethod updateGeometry(self)#
- classmethod updateMicroFocus(self, query: Qt.InputMethodQuery = Qt.ImQueryAll)#
- update_default_inputs(**inputs)#
Batch-set default inputs.
- Parameters:
inputs – name=value pairs to set as defaults.
- Return type:
None
- update_dynamic_inputs(**inputs)#
Batch-set dynamic inputs.
- Parameters:
inputs – name=value pairs to set as dynamic inputs.
- Return type:
None
- update_message_state()#
Show and update (or hide) the content of the widget’s message bar.
The method is connected to widget’s signals messageActivated and messageDeactivated.
- update_summaries()#
- classmethod updatesEnabled(self) bool#
- classmethod visibleRegion(self) QRegion#
- want_basic_layout = True#
Should the widget have basic layout? (if not, the rest of the GUI layout settings are ignored)
- want_control_area = True#
Should the widget construct a controlArea?
- want_main_area = True#
Should the widget construct a mainArea? (a resizable area to the right of the controlArea)
- want_message_bar = True#
Should the widget construct a message_bar? (if not, make sure you show warnings/errors in some other way)
- warning(text_or_id=None, text=None, shown=True)#
- classmethod whatsThis(self) str#
- classmethod wheelEvent(self, a0: QWheelEvent | None)#
- widgetStateChanged#
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 width(self) int#
- classmethod widthMM(self) int#
- classmethod winId(self) PyQt6.sip.voidptr#
- classmethod window(self) QWidget | None#
- classmethod windowFilePath(self) str#
- classmethod windowFlags(self) Qt.WindowType#
- classmethod windowHandle(self) QWindow | None#
- classmethod windowIcon(self) QIcon#
- windowIconChanged#
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 windowIconText(self) str#
- windowIconTextChanged#
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 windowModality(self) Qt.WindowModality#
- classmethod windowOpacity(self) float#
- classmethod windowRole(self) str#
- classmethod windowState(self) Qt.WindowState#
- classmethod windowTitle(self) str#
- windowTitleChanged#
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 windowType(self) Qt.WindowType#
- workflowEnv()#
Return (a view to) the workflow runtime environment.
Returns#
env : types.MappingProxyType
- workflowEnvChanged(key, value, oldvalue)#
A workflow environment variable key has changed to value.
Called by the canvas framework to notify widget of a change in the workflow runtime environment.
The default implementation does nothing.
- classmethod x(self) int#
- classmethod y(self) int#