JX Application Framework
|
#include <JLatentPG.h>
Public Member Functions | |
JLatentPG (const JSize scaleFactor=1) | |
JLatentPG (JProgressDisplay *pg, const bool ownIt, const JSize scaleFactor=1) | |
~JLatentPG () override | |
void | UseDefaultPG () |
void | SetPG (JProgressDisplay *pg, const bool ownIt) |
time_t | GetMaxSilentTime () const |
void | SetMaxSilentTime (const time_t max) |
JSize | GetScaleFactor () const |
void | SetScaleFactor (const JSize scaleFactor) |
bool | IncrementProgress (const JString &message=JString::empty) override |
bool | IncrementProgress (const JSize delta) override |
bool | IncrementProgress (const JString &message, const JSize delta) override |
bool | ProcessContinuing () override |
void | ProcessFinished () override |
void | DisplayBusyCursor () override |
![]() | |
JProgressDisplay () | |
virtual | ~JProgressDisplay () |
void | FixedLengthProcessBeginning (const JSize stepCount, const JString &message, const bool allowCancel, const bool modal) |
void | VariableLengthProcessBeginning (const JString &message, const bool allowCancel, const bool modal) |
bool | ProcessRunning () const |
ProcessType | GetCurrentProcessType () const |
JSize | GetCurrentStepCount () const |
Protected Member Functions | |
void | ProcessBeginning (const ProcessType processType, const JSize stepCount, const JString &message, const bool allowCancel, const bool modal) override |
bool | CheckForCancel () override |
![]() | |
bool | AllowCancel () const |
bool | IsModal () const |
JSize | GetMaxStepCount () const |
void | IncrementStepCount (const JSize delta=1) |
Additional Inherited Members | |
![]() | |
enum | ProcessType { kNoRunningProcess , kFixedLengthProcess , kVariableLengthProcess } |
Interface for the JLatentPG class.
This class encapsulates a progress display that only pops up after N seconds (default 3) and only redraws itself every M increments (default 1). This allows one to write a loop that doesn't waste time creating a progress display unless it takes a while and doesn't waste time redrawing every time through the loop. The scale factor is especially useful when one has a loop whose contents execute very quickly on each pass, so that redrawing the screen after every pass adds a huge overhead.
JLatentPG::JLatentPG | ( | const JSize | scaleFactor = 1 | ) |
JLatentPG::JLatentPG | ( | JProgressDisplay * | pg, |
const bool | ownIt, | ||
const JSize | scaleFactor = 1 |
||
) |
|
override |
|
overrideprotectedvirtual |
Implements JProgressDisplay.
|
overridevirtual |
Implements JProgressDisplay.
|
inline |
|
inline |
Implements JProgressDisplay.
Implements JProgressDisplay.
|
overridevirtual |
Implements JProgressDisplay.
|
overrideprotectedvirtual |
Initialize the data members. Derived classes should create some sort of display to represent the progress.
Reimplemented from JProgressDisplay.
|
overridevirtual |
Derived classes should give the system some background time (system dependent) without updating the progress display.
Returns false if process was cancelled by user.
Reimplemented from JProgressDisplay.
|
overridevirtual |
Derived classes must call this and then clean up the display they created.
Reimplemented from JProgressDisplay.
|
inline |
void JLatentPG::SetPG | ( | JProgressDisplay * | pg, |
const bool | ownIt | ||
) |
If ownIt == true, we delete the progress display when we no longer need it.
This can only be called when a process is not running.
|
inline |
void JLatentPG::UseDefaultPG | ( | ) |
Use a progress display obtained from JNewPG().
This can only be called when a process is not running.