#include <ProgressDialog.h>
Public Member Functions | |
bool | canAbort () const |
bool | isBlocking () const |
Returns true if the running sequencer is blocking any user input. More... | |
void | pause () |
Breaks the sequencer if needed. More... | |
void | resume () |
Continues with progress. More... | |
Public Member Functions inherited from Base::SequencerBase | |
virtual void | checkAbort () |
Check if the operation is aborted by user. More... | |
virtual bool | isBlocking () const |
Returns true if the running sequencer is blocking any user input. More... | |
bool | isLocked () const |
Returns true if the sequencer was locked, false otherwise. More... | |
bool | isRunning () const |
Returns true if the sequencer is running, otherwise returns false. More... | |
bool | setLocked (bool bLock) |
If bLock is true then the sequencer gets locked. More... | |
bool | wasCanceled () const |
Returns true if the pending operation was canceled. More... | |
Static Public Member Functions | |
static SequencerDialog * | instance () |
Static Public Member Functions inherited from Base::SequencerBase | |
static SequencerBase & | Instance () |
Returns the last created sequencer instance. More... | |
Protected Member Functions | |
void | nextStep (bool canAbort) |
Increase the step indicator of the progress dialog. More... | |
void | resetData () |
Resets the sequencer. More... | |
SequencerDialog () | |
Construction. More... | |
void | setProgress (size_t) |
Sets the progress indicator to a certain position. More... | |
void | setText (const char *pszTxt) |
Puts text to the progress dialog. More... | |
void | showRemainingTime () |
void | startStep () |
Starts the progress dialog. More... | |
~SequencerDialog () | |
Destruction. More... | |
Protected Member Functions inherited from Base::SequencerBase | |
bool | next (bool canAbort=false) |
Performs the next step and returns true if the operation is not yet finished. More... | |
virtual void | nextStep (bool canAbort) |
This method can be reimplemented in sub-classes to give the user a feedback when the next is performed. More... | |
size_t | numberOfSteps () const |
Returns the number of steps. More... | |
SequencerBase & | operator= (const SequencerBase &)=default |
virtual void | pause () |
Breaks the sequencer if needed. More... | |
int | progressInPercent () const |
Returns the current state of progress in percent. More... | |
void | rejectCancel () |
If you tried to cancel but then decided to continue the operation. More... | |
virtual void | resetData () |
Resets internal data. More... | |
virtual void | resume () |
Continues with progress. More... | |
SequencerBase () | |
construction More... | |
SequencerBase (const SequencerBase &)=default | |
virtual void | setProgress (size_t) |
Sets the progress indicator to a certain position. More... | |
virtual void | setText (const char *pszTxt) |
Sets a text what the pending operation is doing. More... | |
bool | start (const char *pszStr, size_t steps) |
Starts a new operation, returns false if there is already a pending operation, otherwise it returns true. More... | |
virtual void | startStep () |
This method can be reimplemented in sub-classes to give the user a feedback when a new sequence starts. More... | |
bool | stop () |
Stops the sequencer if all operations are finished. More... | |
void | tryToCancel () |
Try to cancel the pending operation(s). More... | |
virtual | ~SequencerBase () |
Destruction. More... | |
for internal use only | |
class | ProgressDialog |
Additional Inherited Members | |
Protected Attributes inherited from Base::SequencerBase | |
size_t | nProgress |
Stores the current amount of progress. More... | |
size_t | nTotalSteps |
Stores the total number of steps. More... | |
|
protected |
Construction.
References Gui::SequencerDialogPrivate::canabort, Gui::SequencerDialogPrivate::dlg, Gui::getMainWindow(), Gui::SequencerDialogPrivate::guiThread, and ProgressDialog.
Referenced by instance().
|
protected |
Destruction.
bool SequencerDialog::canAbort | ( | ) | const |
References Gui::SequencerDialogPrivate::canabort.
Referenced by nextStep().
|
static |
References SequencerDialog().
|
virtual |
Returns true if the running sequencer is blocking any user input.
This might be only of interest of the GUI where the progress bar or dialog is used from a thread. If started from a thread this method should return false, otherwise true. The default implementation always returns true.
Reimplemented from Base::SequencerBase.
References Gui::SequencerDialogPrivate::guiThread.
|
protectedvirtual |
Increase the step indicator of the progress dialog.
Reimplemented from Base::SequencerBase.
References Gui::SequencerDialogPrivate::canabort, canAbort(), Gui::ProgressDialog::canAbort(), Gui::SequencerDialogPrivate::dlg, Base::SequencerBase::nProgress, pause(), Base::SequencerBase::rejectCancel(), resume(), and Base::SequencerBase::wasCanceled().
|
virtual |
Breaks the sequencer if needed.
The default implementation does nothing. Every pause() must eventually be followed by a corresponding resume().
Reimplemented from Base::SequencerBase.
Referenced by nextStep().
|
protectedvirtual |
Resets the sequencer.
Reimplemented from Base::SequencerBase.
References Gui::SequencerDialogPrivate::dlg.
|
virtual |
Continues with progress.
The default implementation does nothing.
Reimplemented from Base::SequencerBase.
Referenced by nextStep().
|
protectedvirtual |
Sets the progress indicator to a certain position.
Reimplemented from Base::SequencerBase.
References Gui::SequencerDialogPrivate::dlg.
|
protectedvirtual |
Puts text to the progress dialog.
Reimplemented from Base::SequencerBase.
References Gui::SequencerDialogPrivate::dlg, and Gui::SequencerDialogPrivate::text.
|
protected |
|
protectedvirtual |
Starts the progress dialog.
Reimplemented from Base::SequencerBase.
References Gui::SequencerDialogPrivate::dlg, Gui::SequencerDialogPrivate::guiThread, Gui::SequencerDialogPrivate::measureTime, Base::SequencerBase::nTotalSteps, and Gui::SequencerDialogPrivate::progressTime.
|
friend |
Referenced by SequencerDialog().