casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casa::ProgressHelper Class Reference

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. More...
 
 ProgressHelper (QProgressPanel &qpp)
 Constructor that takes a reference to a QProgressPanel. More...
 
 ProgressHelper (QLabel *label, QProgressBar *pb)
 Constructor that takes any QLabel and QProgressBar pointers. More...
 
 ProgressHelper (QLabel &label, QProgressBar &pb)
 Constructor that takes any QLabel and QProgressBar references. More...
 
 ProgressHelper (ProgressHelper *ph)
 Copy Constructor. More...
 
 ProgressHelper (ProgressHelper &ph)
 Copy Constructor. More...
 
 ~ProgressHelper ()
 
QLabel * getLabel ()
 Returns the label (QLabel). More...
 
QProgressBar * getBar ()
 Returns the progress meter (QProgressBar). More...
 
void setLabel (casacore::String label)
 Set the text of the QLabel to the given String. More...
 
void setSteps (int steps)
 Set the total number of steps in the task. More...
 
void step ()
 Indicates that one step of progress has been made. More...
 
void done ()
 Indicate that the task has been completed; the label and progress meter are updated accordingly. More...
 
void reset (casacore::String newLabel)
 Rest the progress meter and set the label with the given text. More...
 

Private Attributes

bool valid
 Indicates whether this object is valid or not. More...
 
QLabel * label
 Pointer to the label. More...
 
QProgressBar * bar
 Pointer to the progress meter. More...
 
int s
 Steps counter. More...
 

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 114 of file QProgressPanel.qo.h.

Constructor & Destructor Documentation

casa::ProgressHelper::ProgressHelper ( QProgressPanel qpp)

Constructor that takes a pointer to a QProgressPanel.

If qpp is NULL, the ProgressHelper is invalid.

casa::ProgressHelper::ProgressHelper ( QProgressPanel qpp)

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.

casa::ProgressHelper::ProgressHelper ( ProgressHelper ph)

Copy Constructor.

If ph is NULL, the ProgressHelper is invalid.

casa::ProgressHelper::ProgressHelper ( ProgressHelper ph)

Copy Constructor.

casa::ProgressHelper::~ProgressHelper ( )

Member Function Documentation

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 ( casacore::String  newLabel)

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

void casa::ProgressHelper::setLabel ( casacore::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.

Member Data Documentation

QProgressBar* casa::ProgressHelper::bar
private

Pointer to the progress meter.

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

QLabel* casa::ProgressHelper::label
private

Pointer to the label.

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

int casa::ProgressHelper::s
private

Steps counter.

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

bool casa::ProgressHelper::valid
private

Indicates whether this object is valid or not.

(See constructors.)

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


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