Progress bar¶
The progress module contains a progress bar usable with Myokit gui’s.
Implementation¶
- class myokit.gui.progress.ProgressBar(parent, message)¶
Progress bar dialog for Myokit. Has a method
reporter()that will return amyokit.ProgressReporterfor interfacing with simulations and other tasks implementing theProgressReporterinterface.- reporter()¶
Returns a
ProgressReporterfor his progress bar.
- was_cancelled()¶
Pythonic version of Qt class.
- class myokit.gui.progress.ProgressBarReporter(pd)¶
A
myokit.ProgressReporterthat sends updates to aProgressBar. To use, create aProgressBarand then call itsreporter()method to obtain a linkedProgressBarReporter.- enter(msg=None)¶
This method will be called when the job that provides progress updates is started.
An optional description of the job to run can be passed in at construction time as
msg.
- exit()¶
Called when a job is finished and the progress reports should stop.
- update(f)¶
This method will be called to provides updates about the current progress. This is indicated using the floating point value
progress, which will have a value in the range[0, 1].The return value of this update can be used to signal a job should be cancelled: Return
Trueto keep going,Falseto cancel.