pqProgressManager is progress manager. More...
#include <pqProgressManager.h>
Inherits QObject.
Public Slots | |
void | setProgress (const QString &message, int progress) |
Update progress. More... | |
void | setEnableProgress (bool) |
Enables progress. More... | |
void | beginProgress () |
Convenience slots that simply call setEnableProgress(). More... | |
void | endProgress () |
void | setEnableAbort (bool) |
Enables abort. More... | |
void | triggerAbort () |
fires abort(). More... | |
bool | unblockEvents (bool val) |
While progress is enabled, pqProgressManager blocks key/mouse events, except for objects added using addNonBlockableObject . More... | |
Signals | |
void | abort () |
Emitted to trigger an abort. More... | |
void | progress (const QString &message, int progress) |
void | enableProgress (bool) |
void | enableAbort (bool) |
void | progressStartEvent () |
void | progressEndEvent () |
Public Member Functions | |
pqProgressManager (QObject *parent=nullptr) | |
~pqProgressManager () override | |
void | lockProgress (QObject *object) |
Locks progress to respond to progress signals set by the object alone. More... | |
void | unlockProgress (QObject *object) |
Releases the progress lock. More... | |
bool | isLocked () const |
Returns if the progress is currently locked by any object. More... | |
void | addNonBlockableObject (QObject *o) |
When progress is enabled, the manager eats all mouse and key events fired except for those objects which are in the non-blockable list. More... | |
void | removeNonBlockableObject (QObject *o) |
const QList< QPointer< QObject > > & | nonBlockableObjects () const |
Returns the list of non-blockable objects. More... | |
Protected Slots | |
void | onStartProgress () |
callbacks for signals fired from vtkProcessModule. More... | |
void | onEndProgress () |
void | onProgress (vtkObject *) |
void | onServerAdded (pqServer *) |
Protected Member Functions | |
bool | eventFilter (QObject *obj, QEvent *event) override |
Filter QApplication events. More... | |
Protected Attributes | |
QPointer< QObject > | Lock |
QList< QPointer< QObject > > | NonBlockableObjects |
int | ProgressCount |
bool | InUpdate |
bool | EnableProgress |
bool | ReadyEnableProgress |
bool | UnblockEvents |
pqProgressManager is progress manager.
It centralizes progress raising/ handling. Provides ability for any object to lock progress so that only progress fired by itself will be notified to the rest of the world. Also, when progress is enabled, it disables handling of mouse/key events except on those objects in the NonBlockableObjects list.
Definition at line 21 of file pqProgressManager.h.
pqProgressManager::pqProgressManager | ( | QObject * | parent = nullptr | ) |
|
override |
void pqProgressManager::lockProgress | ( | QObject * | object | ) |
Locks progress to respond to progress signals set by the object
alone.
All signals sent by other objects are ignored until Unlock is called.
void pqProgressManager::unlockProgress | ( | QObject * | object | ) |
Releases the progress lock.
bool pqProgressManager::isLocked | ( | ) | const |
Returns if the progress is currently locked by any object.
|
inline |
When progress is enabled, the manager eats all mouse and key events fired except for those objects which are in the non-blockable list.
This is the API to add/remove non-blockable objects.
Definition at line 49 of file pqProgressManager.h.
|
inline |
Definition at line 50 of file pqProgressManager.h.
|
inline |
Returns the list of non-blockable objects.
Definition at line 55 of file pqProgressManager.h.
|
overrideprotected |
Filter QApplication events.
Update progress.
The progress must be enbled by calling enableProgress(true) before calling this method for the progress to be updated.
|
slot |
Enables progress.
|
inlineslot |
Convenience slots that simply call setEnableProgress().
Definition at line 79 of file pqProgressManager.h.
|
inlineslot |
Definition at line 80 of file pqProgressManager.h.
|
slot |
Enables abort.
|
slot |
fires abort().
Must be called by the GUI that triggers abort.
|
slot |
While progress is enabled, pqProgressManager blocks key/mouse events, except for objects added using addNonBlockableObject
.
Sometimes it's not possible to add objects explicitly and we may want to temporarily skip blocking of events. This methods can be used for that e.g.
|
signal |
Emitted to trigger an abort.
|
signal |
|
signal |
|
signal |
|
signal |
|
protectedslot |
callbacks for signals fired from vtkProcessModule.
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protected |
Definition at line 133 of file pqProgressManager.h.
|
protected |
Definition at line 134 of file pqProgressManager.h.
|
protected |
Definition at line 135 of file pqProgressManager.h.
|
protected |
Definition at line 136 of file pqProgressManager.h.
|
protected |
Definition at line 138 of file pqProgressManager.h.
|
protected |
Definition at line 139 of file pqProgressManager.h.
|
protected |
Definition at line 140 of file pqProgressManager.h.