casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::ProgressHelper Class Reference

Wrapper around a QProgressPanel or other QLabel/QProgressBar pairing. More...

#include <QProgressPanel.qo.h>

List of all members.

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.

Detailed Description

Wrapper around a QProgressPanel or other QLabel/QProgressBar pairing.

Synopsis

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 & Destructor Documentation

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.


Member Function Documentation

Indicate that the task has been completed; the label and progress meter are updated accordingly.

QProgressBar* casa::ProgressHelper::getBar ( )

Returns the progress meter (QProgressBar).

Returns the label (QLabel).

void casa::ProgressHelper::reset ( String  newLabel)

Rest the progress meter and set the label with the given text.

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.

Indicates that one step of progress has been made.

The progress meter is updated accordingly.


Member Data Documentation

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.

Indicates whether this object is valid or not.

(See constructors.)

Definition at line 167 of file QProgressPanel.qo.h.


The documentation for this class was generated from the following file: