casa
5.7.0-16
|
Convenience class with a label and progress meter. More...
#include <QProgressPanel.qo.h>
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... | |
Convenience class with a label and progress meter.
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.
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 | ( | ) |
|
privateslot |
Slot to handle the "Cancel" button's clicked() signal.
Emits the cancelRequested() signal.
|
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).
|
privateslot |
Slot to handle the "Hide" button's clicked() signal.
Emits the hideRequested() signal.
|
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.
|
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.
|
signal |
This is the signal used by setValue() to get around Qt's GUI thread issues.