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. | |
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. | |
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 | ( | 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 | ( | ) |
| void casa::QProgressPanel::cancel | ( | ) | [private, slot] |
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 | ( | ) | [private, slot] |
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 | ( | 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.
1.6.1