Isis Developer Reference
Progress.h
Go to the documentation of this file.
1#ifndef Progress_h
2#define Progress_h
8/* SPDX-License-Identifier: CC0-1.0 */
9#include <QString>
10
11namespace 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
Program progress reporter.
Definition Progress.h:42
void AddSteps(const int steps)
If the initial step size was a guess, it can be modified using this method.
Definition Progress.cpp:199
~Progress()
Destroys the Progress object.
Definition Progress.cpp:50
int MaximumSteps() const
Returns the maximum number of steps of the progress.
Definition Progress.cpp:172
Progress()
Constructs a Progress object.
Definition Progress.cpp:22
void SetMaximumSteps(const int steps)
This sets the maximum number of steps in the process.
Definition Progress.cpp:85
void SetText(const QString &text)
Changes the value of the text string reported just before 0% processed.
Definition Progress.cpp:61
void DisableAutomaticDisplay()
Turns off updating the Isis Gui when CheckStatus() is called.
Definition Progress.cpp:161
QString Text() const
Returns the text to output.
Definition Progress.cpp:72
void CheckStatus()
Checks and updates the status.
Definition Progress.cpp:105
int CurrentStep() const
Returns the current step of the progress.
Definition Progress.cpp:185
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16