Package node_manager_fkie :: Module progress_queue :: Class ProgressQueue
[frames] | no frames]

Class ProgressQueue

source code

python_qt_binding.QtCore.QObject --+
                                   |
                                  ProgressQueue

The queue provides a threaded execution of given tasks.

Instance Methods
 
__init__(self, progress_frame, progress_bar, progress_cancel_button, name='') source code
 
stop(self)
Deletes all queued tasks and wait 3 seconds for the end of current running thread.
source code
 
add2queue(self, ident, descr, target=None, args=())
Adds new task to the queue.
source code
 
start(self)
Starts the execution of tasks in the queue.
source code
 
count(self)
:return: the count of tasks in the queue :rtype: int
source code
 
has_id(self, ident)
Searches the current and planed threads for given id and returns `True` if one is found.
source code
Class Variables
  no_screen_error_signal = Signal(str, str)
Method Details

add2queue(self, ident, descr, target=None, args=())

source code 

Adds new task to the queue. After the task was added you need call start(). :param ident: the unique identification string :type ident: str :param descr: the description of the task :type descr: str :param target: is the callable object to be invoked in a new thread. Defaults to None, meaning nothing is called. :param args: is the argument tuple for the target invocation. Defaults to ()