ProgressBar

Methods

qconcurrency.widgets.ProgressBar.__init__()
qconcurrency.widgets.ProgressBar.add_progress(amount) Adds to the total number of required steps required to complete.
qconcurrency.widgets.ProgressBar.incr_progress(…) Completes a particular number of steps for a particular jobid.
qconcurrency.widgets.ProgressBar.new_solotask(…) Creates a new SoloThreadedTask object, adding signals to it so that it can update this ProgressBar.
qconcurrency.widgets.ProgressBar.new_task(…) Creates a new ThreadedTask object, adding signals to it so that it can update this ProgressBar.
qconcurrency.widgets.ProgressBar.refresh_progress() ReCalculates current/total progress, and updates the progressbar
qconcurrency.widgets.ProgressBar.reset([jobid]) If not jobid, sets all required progress-steps back to 0.
qconcurrency.widgets.ProgressBar.staticMetaObject

Documentation

class qconcurrency.widgets.ProgressBar[source]

Bases: PySide.QtGui.QWidget

A ProgressBar designed to track progress of several threads, that is hidden automatically whenever all threads have exited (by unhandled exception, or return).

Each thread is assigned it’s own jobid, so that it’s progress is tracked entirely independently of all other pending tasks. (my hope is that if errors appear in total-calculated progress in the codebase, this will lessen the appearance of an error for the user - each thread’s progress being set to 100% once it exits).

add_progress(amount, jobid=None)[source]

Adds to the total number of required steps required to complete.

incr_progress(amount, jobid)[source]

Completes a particular number of steps for a particular jobid.

new_solotask(callback, signals=None, connections=None, mutex_expiry=5000)[source]

Creates a new SoloThreadedTask object, adding signals to it so that it can update this ProgressBar.

new_task(callback, signals=None, *args, **kwds)[source]

Creates a new ThreadedTask object, adding signals to it so that it can update this ProgressBar.

ThreadedTask objects are most suitable for producer/consumer patterns (multiple threads running at once), and no thread depends on another.

See also

  • ThreadedTask
  • SoloThreadedTask
  • ProgressBar.new_solotask()
refresh_progress()[source]

ReCalculates current/total progress, and updates the progressbar

reset(jobid=None)[source]

If not jobid, sets all required progress-steps back to 0. Otherwise, removes all required progress associated with that jobid.

staticMetaObject = <PySide.QtCore.QMetaObject object>