Isis 3 Programmer Reference
Progress.h
1 #ifndef Progress_h
2 #define Progress_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include <QString>
10 
11 namespace Isis {
42  class Progress {
43  public:
44  // constructor
45  Progress();
46 
47  // destructor
48  ~Progress();
49 
50  // Change the text QString
51  void SetText(const QString &text);
52 
53  // Get the text string
54  QString Text() const;
55 
56  // Change the maximum steps
57  void SetMaximumSteps(const int steps);
58 
59  // Add steps before completion (for guessed initial step size)
60  void AddSteps(const int steps);
61 
62  // Check and report status
63  void CheckStatus();
64 
66 
67  int MaximumSteps() const;
68 
69  int CurrentStep() const;
70 
71  private:
72  QString p_text;
86  bool p_printPercent;
87 
88  bool p_autoDisplay;
89  };
90 };
91 
92 #endif
Isis::Progress::CheckStatus
void CheckStatus()
Checks and updates the status.
Definition: Progress.cpp:105
Isis::Progress::SetMaximumSteps
void SetMaximumSteps(const int steps)
This sets the maximum number of steps in the process.
Definition: Progress.cpp:85
Isis::Progress::AddSteps
void AddSteps(const int steps)
If the initial step size was a guess, it can be modified using this method.
Definition: Progress.cpp:199
Isis::Progress::p_text
QString p_text
Text string to output at the initial call to CheckStatus (0% processed)
Definition: Progress.h:72
Isis::Progress::p_maximumSteps
int p_maximumSteps
Number of steps in your processing sequence.
Definition: Progress.h:74
Isis::Progress::p_percentIncrement
int p_percentIncrement
How much to increment the currentPercent by.
Definition: Progress.h:84
Isis::Progress::p_currentPercent
int p_currentPercent
The current percent we are checking against.
Definition: Progress.h:80
Isis::Progress::SetText
void SetText(const QString &text)
Changes the value of the text string reported just before 0% processed.
Definition: Progress.cpp:61
Isis::Progress::Progress
Progress()
Constructs a Progress object.
Definition: Progress.cpp:22
Isis::Progress
Program progress reporter.
Definition: Progress.h:42
Isis::Progress::~Progress
~Progress()
Destroys the Progress object.
Definition: Progress.cpp:50
Isis::Progress::MaximumSteps
int MaximumSteps() const
Returns the maximum number of steps of the progress.
Definition: Progress.cpp:172
Isis::Progress::Text
QString Text() const
Returns the text to output.
Definition: Progress.cpp:72
Isis::Progress::DisableAutomaticDisplay
void DisableAutomaticDisplay()
Turns off updating the Isis Gui when CheckStatus() is called.
Definition: Progress.cpp:161
Isis::Progress::CurrentStep
int CurrentStep() const
Returns the current step of the progress.
Definition: Progress.cpp:185
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Progress::p_currentStep
int p_currentStep
The current step in the processing sequence.
Definition: Progress.h:77