mcsas.gui.utils.progressdialog module

class ProgressDialog(parent=None, title=None, count=0)[source]

Bases: QProgressDialog

A progress dialog to visualize calculation status of the program.

Tests the ProgressDialog with 10 steps, cancels in between. >>> import time >>> from utilsgui import ProgressDialog, DialogInteraction >>> pd = DialogInteraction.queryInstance(ProgressDialog, ... slot = ‘cancel’, ... count = 11) >>> for i in range(0, pd.maximum()): ... dummy = pd.update() ... time.sleep(0.2) >>> pd.wasCanceled() True

Tests again, without cancel this time. >>> pd.reset() >>> for i in range(0, pd.maximum()): ... dummy = pd.update() ... time.sleep(0.2) >>> pd.wasCanceled() False

update()[source]

Updates progress status and returns True if canceled, False otherwise.