widget to show progress in a QStatusBar.
More...
#include <pqProgressWidget.h>
Inherits QWidget.
|
| | pqProgressWidget (QWidget *parent=nullptr) |
| |
| | ~pqProgressWidget () override |
| |
| QToolButton * | getAbortButton () const |
| |
| QToolButton * | abortButton () const |
| | Provides access to the abort button. More...
|
| |
|
| void | setReadyText (const QString &) |
| | Set the text to use by default when the progress bar is not enabled which typically corresponds to application not being busy. More...
|
| |
| const QString & | readyText () const |
| | Set the text to use by default when the progress bar is not enabled which typically corresponds to application not being busy. More...
|
| |
|
| void | setBusyText (const QString &) |
| | Set the text to use by default when the progress bar is enabled which typically corresponds to application being busy. More...
|
| |
| const QString & | busyText () const |
| | Set the text to use by default when the progress bar is enabled which typically corresponds to application being busy. More...
|
| |
|
| void | updateUI () |
| | request Qt to paint the widgets. More...
|
| |
| void | enterEvent (QEnterEvent *e) override |
| | Overriden to change the application cursor to a "ArrowCursor" when the progress bar is showing progress and the mouse enters the progress widget. More...
|
| |
| void | leaveEvent (QEvent *e) override |
| | Overriden to restore the cursor to the default cursor when the mouse leaves the progress widget. More...
|
| |
widget to show progress in a QStatusBar.
pqProgressWidget is a widget designed to be used in the QStatusBar of the application to show progress for time consuming tasks in the application.
pqProgressWidget is a replacement for QProgressBar. It has the following differences with QProgressBar.
- 1. It adds support for an abort button that can be enabled to allow aborting for interruptible processing while progress in active.
- 2. It does not use QMacStyle on OsX instead uses "fusion" or "cleanlooks" show that the text is shown on the progress bar.
- 3. It does not render progress bar grove for a more "flat" look and avoid dramatic UI change when toggling between showing progress and not.
Definition at line 32 of file pqProgressWidget.h.
◆ pqProgressWidget()
| pqProgressWidget::pqProgressWidget |
( |
QWidget * |
parent = nullptr | ) |
|
◆ ~pqProgressWidget()
| pqProgressWidget::~pqProgressWidget |
( |
| ) |
|
|
override |
◆ getAbortButton()
| QToolButton* pqProgressWidget::getAbortButton |
( |
| ) |
const |
|
inline |
◆ abortButton()
| QToolButton* pqProgressWidget::abortButton |
( |
| ) |
const |
|
inline |
◆ setReadyText()
| void pqProgressWidget::setReadyText |
( |
const QString & |
| ) |
|
Set the text to use by default when the progress bar is not enabled which typically corresponds to application not being busy.
Default value is empty.
◆ readyText()
| const QString& pqProgressWidget::readyText |
( |
| ) |
const |
|
inline |
Set the text to use by default when the progress bar is not enabled which typically corresponds to application not being busy.
Default value is empty.
Definition at line 59 of file pqProgressWidget.h.
◆ setBusyText()
| void pqProgressWidget::setBusyText |
( |
const QString & |
| ) |
|
Set the text to use by default when the progress bar is enabled which typically corresponds to application being busy.
Default value is "Busy".
◆ busyText()
| const QString& pqProgressWidget::busyText |
( |
| ) |
const |
|
inline |
Set the text to use by default when the progress bar is enabled which typically corresponds to application being busy.
Default value is "Busy".
Definition at line 69 of file pqProgressWidget.h.
◆ setProgress
| void pqProgressWidget::setProgress |
( |
const QString & |
message, |
|
|
int |
value |
|
) |
| |
|
slot |
Set the progress.
Progress must be enabled by calling 'enableProgress` otherwise this method will have no effect.
◆ enableProgress
| void pqProgressWidget::enableProgress |
( |
bool |
enabled | ) |
|
|
slot |
Enabled/disable the progress.
This is different from enabling/disabling the widget itself. This shows/hides the progress part of the widget.
◆ enableAbort
| void pqProgressWidget::enableAbort |
( |
bool |
enabled | ) |
|
|
slot |
Enable/disable the abort button.
◆ abortPressed
| void pqProgressWidget::abortPressed |
( |
| ) |
|
|
signal |
triggered with the abort button is pressed.
◆ updateUI()
| void pqProgressWidget::updateUI |
( |
| ) |
|
|
protected |
request Qt to paint the widgets.
◆ enterEvent()
| void pqProgressWidget::enterEvent |
( |
QEnterEvent * |
e | ) |
|
|
overrideprotected |
Overriden to change the application cursor to a "ArrowCursor" when the progress bar is showing progress and the mouse enters the progress widget.
This makes it intuitive for the user to know that they can clik on the abort button to stop the progress.
◆ leaveEvent()
| void pqProgressWidget::leaveEvent |
( |
QEvent * |
e | ) |
|
|
overrideprotected |
Overriden to restore the cursor to the default cursor when the mouse leaves the progress widget.
◆ ProgressBar
| pqProgressWidgetLabel* pqProgressWidget::ProgressBar |
|
protected |
◆ AbortButton
| QToolButton* pqProgressWidget::AbortButton |
|
protected |
◆ readyText
| QString pqProgressWidget::readyText |
|
readwrite |
◆ busyText
| QString pqProgressWidget::busyText |
|
readwrite |
The documentation for this class was generated from the following file: