casa
$Rev:20696$
|
Wrapper around a QProgressPanel or other QLabel/QProgressBar pairing. More...
#include <QProgressPanel.qo.h>
Public Member Functions | |
ProgressHelper (QProgressPanel *qpp) | |
Constructor that takes a pointer to a QProgressPanel. | |
ProgressHelper (QProgressPanel &qpp) | |
Constructor that takes a reference to a QProgressPanel. | |
ProgressHelper (QLabel *label, QProgressBar *pb) | |
Constructor that takes any QLabel and QProgressBar pointers. | |
ProgressHelper (QLabel &label, QProgressBar &pb) | |
Constructor that takes any QLabel and QProgressBar references. | |
ProgressHelper (ProgressHelper *ph) | |
Copy Constructor. | |
ProgressHelper (ProgressHelper &ph) | |
Copy Constructor. | |
~ProgressHelper () | |
QLabel * | getLabel () |
Returns the label (QLabel). | |
QProgressBar * | getBar () |
Returns the progress meter (QProgressBar). | |
void | setLabel (String label) |
Set the text of the QLabel to the given String. | |
void | setSteps (int steps) |
Set the total number of steps in the task. | |
void | step () |
Indicates that one step of progress has been made. | |
void | done () |
Indicate that the task has been completed; the label and progress meter are updated accordingly. | |
void | reset (String newLabel) |
Rest the progress meter and set the label with the given text. | |
Private Attributes | |
bool | valid |
Indicates whether this object is valid or not. | |
QLabel * | label |
Pointer to the label. | |
QProgressBar * | bar |
Pointer to the progress meter. | |
int | s |
Steps counter. |
Wrapper around a QProgressPanel or other QLabel/QProgressBar pairing.
A ProgressHelper is a convenience class that provides methods dealing with any QLabel/QProgressBar pair. Progress is seen as a number of steps, and as progress is made the "steps" counter increases.
Definition at line 116 of file QProgressPanel.qo.h.
Constructor that takes a pointer to a QProgressPanel.
If qpp is NULL, the ProgressHelper is invalid.
Constructor that takes a reference to a QProgressPanel.
casa::ProgressHelper::ProgressHelper | ( | QLabel * | label, |
QProgressBar * | pb | ||
) |
Constructor that takes any QLabel and QProgressBar pointers.
If either are NULL, the ProgressHelper is invalid.
casa::ProgressHelper::ProgressHelper | ( | QLabel & | label, |
QProgressBar & | pb | ||
) |
Constructor that takes any QLabel and QProgressBar references.
Copy Constructor.
If ph is NULL, the ProgressHelper is invalid.
Copy Constructor.
void casa::ProgressHelper::done | ( | ) |
Indicate that the task has been completed; the label and progress meter are updated accordingly.
QProgressBar* casa::ProgressHelper::getBar | ( | ) |
Returns the progress meter (QProgressBar).
QLabel* casa::ProgressHelper::getLabel | ( | ) |
Returns the label (QLabel).
void casa::ProgressHelper::reset | ( | String | newLabel | ) |
Rest the progress meter and set the label with the given text.
void casa::ProgressHelper::setLabel | ( | String | label | ) |
Set the text of the QLabel to the given String.
void casa::ProgressHelper::setSteps | ( | int | steps | ) |
Set the total number of steps in the task.
void casa::ProgressHelper::step | ( | ) |
Indicates that one step of progress has been made.
The progress meter is updated accordingly.
QProgressBar* casa::ProgressHelper::bar [private] |
Pointer to the progress meter.
Definition at line 173 of file QProgressPanel.qo.h.
QLabel* casa::ProgressHelper::label [private] |
Pointer to the label.
Definition at line 170 of file QProgressPanel.qo.h.
int casa::ProgressHelper::s [private] |
Steps counter.
Definition at line 176 of file QProgressPanel.qo.h.
bool casa::ProgressHelper::valid [private] |
Indicates whether this object is valid or not.
(See constructors.)
Definition at line 167 of file QProgressPanel.qo.h.