ewoksorange.gui.concurrency.threaded.ThreadedTaskExecutor#

class ewoksorange.gui.concurrency.threaded.ThreadedTaskExecutor[source]#

Bases: QThread, TaskExecutor

Create and execute an Ewoks task in a dedicated thread.

Auto = 0#
Eco = 2#
High = 1#
HighPriority = 4#
HighestPriority = 5#
IdlePriority = 0#
InheritPriority = 7#
LowPriority = 2#
LowestPriority = 1#
NormalPriority = 3#
class Priority(*values)#

Bases: Enum

HighPriority = 4#
HighestPriority = 5#
IdlePriority = 0#
InheritPriority = 7#
LowPriority = 2#
LowestPriority = 1#
NormalPriority = 3#
TimeCriticalPriority = 6#
class QualityOfService(*values)#

Bases: Enum

Auto = 0#
Eco = 2#
High = 1#
TimeCriticalPriority = 6#
classmethod blockSignals(self, b: bool) bool#
cancel_running_task()[source]#

cancel current processing. The targetted EwoksTask must have implemented the ‘cancel’ function

classmethod childEvent(self, a0: QChildEvent | None)#
classmethod children(self) list[QObject]#
classmethod connectNotify(self, signal: QMetaMethod)#
create_task(log_missing_inputs=False, **kwargs)#
Parameters:

log_missing_inputs (bool)

Return type:

None

classmethod currentThread() QThread | None#
classmethod currentThreadId() PyQt6.sip.voidptr#
property current_task: Task | None#
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)#
property done: bool | None#

Returns None when the task was not or could not be instantiated

classmethod dumpObjectInfo(self)#
classmethod dumpObjectTree(self)#
classmethod dynamicPropertyNames(self) list[QByteArray]#
classmethod event(self, event: QEvent | None) bool#
classmethod eventDispatcher(self) QAbstractEventDispatcher | None#
classmethod eventFilter(self, a0: QObject | None, a1: QEvent | None) bool#
property exception: Exception | None#

The instantiation exception, the execution exception or None

classmethod exec(self) int#
execute_task()#
Return type:

None

classmethod exit(self, returnCode: int = 0)#
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.

property has_task: bool#
classmethod idealThreadCount() int#
classmethod inherits(self, classname: str) bool#
classmethod installEventFilter(self, a0: QObject | None)#
classmethod isCurrentThread(self) bool#
classmethod isFinished(self) bool#
classmethod isInterruptionRequested(self) bool#
classmethod isMainThread() bool#
classmethod isQmlExposed(self) bool#
classmethod isQuickItemType(self) bool#
classmethod isRunning(self) bool#
classmethod isSignalConnected(self, signal: QMetaMethod) bool#
classmethod isWidgetType(self) bool#
classmethod isWindowType(self) bool#
classmethod killTimer(self, id: int)#
classmethod loopLevel(self) int#
classmethod metaObject(self) QMetaObject | None#
classmethod moveToThread(self, thread: QThread | None)#
classmethod msleep(a0: int)#
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.

property output_variables: dict | None#
classmethod parent(self) QObject | None#
classmethod priority(self) QThread.Priority#
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 quit(self)#
classmethod receivers(self, signal: PYQT_SIGNAL) int#
classmethod removeEventFilter(self, a0: QObject | None)#
classmethod requestInterruption(self)#
run()[source]#
Return type:

None

classmethod sender(self) QObject | None#
classmethod senderSignalIndex(self) int#
classmethod serviceLevel(self) QThread.QualityOfService#
classmethod setEventDispatcher(self, eventDispatcher: QAbstractEventDispatcher | None)#
classmethod setObjectName(self, name: QByteArray | bytes | bytearray | memoryview | str | None)#
classmethod setParent(self, a0: QObject | None)#
classmethod setPriority(self, priority: QThread.Priority)#
classmethod setProperty(self, name: str, value: Any) bool#
classmethod setServiceLevel(self, serviceLevel: QThread.QualityOfService)#
classmethod setStackSize(self, stackSize: int)#
classmethod setTerminationEnabled(enabled: bool = True)#
classmethod signalsBlocked(self) bool#
classmethod sleep(a0: int)#
classmethod stackSize(self) int#
classmethod start(self, priority: QThread.Priority = QThread.InheritPriority)#
classmethod startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int#
started#

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.

staticMetaObject = <PyQt6.QtCore.QMetaObject object>#
stop(timeout=None, wait=False)[source]#

Stop the current thread

Parameters:
  • timeout (Optional[float])

  • wait (bool)

Return type:

None

property succeeded: bool | None#

Returns None when the task was not or could not be instantiated

classmethod terminate(self)#
classmethod thread(self) QThread | None#
classmethod timerEvent(self, a0: QTimerEvent | None)#
classmethod tr(sourceText: str, disambiguation: str = None, n: int = -1) str#
classmethod usleep(a0: int)#
classmethod wait(self, deadline: QDeadlineTimer = QDeadlineTimer(QDeadlineTimer.Forever)) bool#
classmethod wait(self, time: int) bool
classmethod yieldCurrentThread()#