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

Convenience class with a label and progress meter. More...

#include <QProgressPanel.qo.h>

List of all members.

Public Slots

void setValue (int value)
 Sets the value of the progress meter to the given value.

Signals

void cancelRequested ()
 The cancelRequested signal is emitted whenever the "Cancel" button is clicked.
void hideRequested ()
 The hideRequested signal is emitted whenever the "Hide" button is clicked.
void updateValue (int value)
 This is the signal used by setValue() to get around Qt's GUI thread issues.

Public Member Functions

 QProgressPanel (String label, bool hideable=true, bool cancelable=true)
 Builds a QProgressPanel with the given label and a progress meter at 0% completion.
 ~QProgressPanel ()
QProgressBar * getProgressBar ()
 Returns the progress meter (QProgressBar).
QLabel * getLabel ()
 Returns the label (QLabel).
void setLabel (String newLabel)
 Sets the text of the label to the given String.

Private Slots

void cancel ()
 Slot to handle the "Cancel" button's clicked() signal.
void hide ()
 Slot to handle the "Hide" button's clicked() signal.

Detailed Description

Convenience class with a label and progress meter.

Synopsis

A QProgressPanel is a convenience class that provides a common functionality: displaying a progress meter along with a label. QProgressPanel also has two optional buttons: a "Hide" button and a "Close" button - pressing either of these buttons sends a signal. Important: it is the responsibility of the caller/parent to handle these signals.

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


Constructor & Destructor Documentation

casa::QProgressPanel::QProgressPanel ( String  label,
bool  hideable = true,
bool  cancelable = true 
)

Builds a QProgressPanel with the given label and a progress meter at 0% completion.

If hideable is true, the optional "Hide" button is shown; similarly, if cancelable is true, the optional "Cancel" button is shown.


Member Function Documentation

void casa::QProgressPanel::cancel ( ) [private, slot]

Slot to handle the "Cancel" button's clicked() signal.

Emits the cancelRequested() signal.

The cancelRequested signal is emitted whenever the "Cancel" button is clicked.

If the QProgressPanel was created without the cancel button, this signal is never emitted.

Returns the label (QLabel).

Returns the progress meter (QProgressBar).

void casa::QProgressPanel::hide ( ) [private, slot]

Slot to handle the "Hide" button's clicked() signal.

Emits the hideRequested() signal.

The hideRequested signal is emitted whenever the "Hide" button is clicked.

If the QProgressPanel was created without the hide button, this signal is never emitted.

Sets the text of the label to the given String.

void casa::QProgressPanel::setValue ( int  value) [slot]

Sets the value of the progress meter to the given value.

Note that the progress meter is on a scale of 0 - 100. Also, due to some weirdness with Qt's GUI thread system, calling setValue actually emits a signal which is caught by the progress meter rather than setting the value directly.

void casa::QProgressPanel::updateValue ( int  value) [signal]

This is the signal used by setValue() to get around Qt's GUI thread issues.


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