Isis 3 Programmer Reference
Progress.h
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;
86 bool p_printPercent;
87
88 bool p_autoDisplay;
89 };
90};
91
92#endif
Program progress reporter.
Definition Progress.h:42
QString p_text
Text string to output at the initial call to CheckStatus (0% processed)
Definition Progress.h:72
void AddSteps(const int steps)
If the initial step size was a guess, it can be modified using this method.
Definition Progress.cpp:199
int p_currentPercent
The current percent we are checking against.
Definition Progress.h:80
~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
int p_maximumSteps
Number of steps in your processing sequence.
Definition Progress.h:74
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
int p_currentStep
The current step in the processing sequence.
Definition Progress.h:77
QString Text() const
Returns the text to output.
Definition Progress.cpp:72
int p_percentIncrement
How much to increment the currentPercent by.
Definition Progress.h:84
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