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

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

#include <QProgressPanel.qo.h>

Inheritance diagram for casa::QProgressPanel:

Public Slots

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

Signals

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

Public Member Functions

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

Private Slots

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

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

Constructor & Destructor Documentation

casa::QProgressPanel::QProgressPanel ( casacore::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.

casa::QProgressPanel::~QProgressPanel ( )

Member Function Documentation

void casa::QProgressPanel::cancel ( )
privateslot

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

Emits the cancelRequested() signal.

void casa::QProgressPanel::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.

QLabel* casa::QProgressPanel::getLabel ( )

Returns the label (QLabel).

QProgressBar* casa::QProgressPanel::getProgressBar ( )

Returns the progress meter (QProgressBar).

void casa::QProgressPanel::hide ( )
privateslot

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

Emits the hideRequested() signal.

void casa::QProgressPanel::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.

void casa::QProgressPanel::setLabel ( casacore::String  newLabel)

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: