Isis Developer Reference
Progress.h
Go to the documentation of this file.
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;
74  int p_maximumSteps;
77  int p_currentStep;
80  int p_currentPercent;
84  int p_percentIncrement;
86  bool p_printPercent;
87 
88  bool p_autoDisplay;
89  };
90 };
91 
92 #endif
Isis::iApp
Application * iApp
Definition: Application.cpp:51
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
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
Preference.h
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::Progress::SetText
void SetText(const QString &text)
Changes the value of the text string reported just before 0% processed.
Definition: Progress.cpp:61
Application.h
Isis::Progress::Progress
Progress()
Constructs a Progress object.
Definition: Progress.cpp:22
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::Progress
Program progress reporter.
Definition: Progress.h:42
Isis::Progress::~Progress
~Progress()
Destroys the Progress object.
Definition: Progress.cpp:50
std
Namespace for the standard library.
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::Preference::Preferences
static Preference & Preferences(bool unitTest=false)
Definition: Preference.cpp:86
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
Progress.h
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16