Isis 3 Developer Reference
Isis::Progress Class Reference

Program progress reporter. More...

#include <Progress.h>

Collaboration diagram for Isis::Progress:
Collaboration graph

Public Member Functions

 Progress ()
 Constructs a Progress object. More...
 
 ~Progress ()
 Destroys the Progress object. More...
 
void SetText (const QString &text)
 Changes the value of the text string reported just before 0% processed. More...
 
QString Text () const
 Returns the text to output. More...
 
void SetMaximumSteps (const int steps)
 This sets the maximum number of steps in the process. More...
 
void AddSteps (const int steps)
 If the initial step size was a guess, it can be modified using this method. More...
 
void CheckStatus ()
 Checks and updates the status. More...
 
void DisableAutomaticDisplay ()
 Turns off updating the Isis Gui when CheckStatus() is called. More...
 
int MaximumSteps () const
 Returns the maximum number of steps of the progress. More...
 
int CurrentStep () const
 Returns the current step of the progress. More...
 

Detailed Description

Program progress reporter.

This class is used to output the percent completion for programs in either the command line mode or the graphical user interface. Generally, this object is created within a Process derived class. Therefore you should only use this object if you are developing such a class.

Author
2002-05-22 Jeff Anderson

Constructor & Destructor Documentation

◆ Progress()

Isis::Progress::Progress ( )

Constructs a Progress object.

Exceptions
Isis::iException::User

References _FILEINFO_, Isis::PvlObject::findGroup(), and Isis::Preference::Preferences().

◆ ~Progress()

Isis::Progress::~Progress ( )

Destroys the Progress object.

Member Function Documentation

◆ AddSteps()

void Isis::Progress::AddSteps ( const int  steps)

If the initial step size was a guess, it can be modified using this method.

For example, if you SetMaximumSteps(11) then call AddSteps(1) then the new MaximumSteps is 12. The progress bar will not go backwards (it will not drop from 10% to 5%). "steps" can be negative to remove steps.

Parameters
stepsAmount to adjust the MaximumSteps by

References _FILEINFO_.

Referenced by Isis::ImageOverlapSet::FindAllOverlaps(), and Isis::OverlapStatistics::OverlapStatistics().

◆ CheckStatus()

◆ CurrentStep()

int Isis::Progress::CurrentStep ( ) const

Returns the current step of the progress.

This value should always be in the range of: [0, MaximumSteps()]. CheckStatus() increments the current step.

See also
CheckStatus()
Returns
The current step of the progress

Referenced by Isis::ImportControlNetWorkOrder::execute().

◆ DisableAutomaticDisplay()

void Isis::Progress::DisableAutomaticDisplay ( )

Turns off updating the Isis Gui when CheckStatus() is called.

You must use RedrawProgress() to visually update the current progress.

Referenced by Isis::ImportControlNetWorkOrder::execute().

◆ MaximumSteps()

int Isis::Progress::MaximumSteps ( ) const

Returns the maximum number of steps of the progress.

See also
SetMaximumSteps()
Returns
The maximum number of steps of the progress.

Referenced by Isis::ImportControlNetWorkOrder::execute().

◆ SetMaximumSteps()

◆ SetText()

◆ Text()

QString Isis::Progress::Text ( ) const

Returns the text to output.

Generally, this in not needed except rare circumstances where an application has multiple steps and the text string needs to be saved and restored.

Returns
string

The documentation for this class was generated from the following files: