hyperspyui.threaded module

Created on Mon Nov 17 14:16:41 2014

@author: Vidar Tonaas Fauske

class hyperspyui.threaded.ProgressThreaded(parent, run, finished=None, label=None, cancellable=False, title='Processing', modal=True, generator_N=None)

Bases: Threaded

close()
display()
class hyperspyui.threaded.Threaded(parent, run, finished=None)

Bases: QObject

Executes a user provided function in a new thread, and pops up a QProgressBar until it finishes. To have an updating progress bar, have the provided function be a generator, and yield completion rate in percent (int from 0 to 100).

static add_to_pool(instance)
errorString(error)
pool = []
static remove_from_pool(instance)
run()
class hyperspyui.threaded.Worker(run)

Bases: QObject

error

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.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

finished

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.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

process()
progress

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.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

hyperspyui.threaded.tr(text)