QWinTaskbarProgress Class
The QWinTaskbarProgress class represents a progress indicator in the Windows taskbar. More...
Header: | #include <QWinTaskbarProgress> |
qmake: | QT += winextras |
Since: | Qt 5.2 |
Inherits: | QObject |
Properties
- 1 property inherited from QObject
Public Functions
QWinTaskbarProgress(QObject *parent = Q_NULLPTR) | |
~QWinTaskbarProgress() | |
bool | isPaused() const |
bool | isStopped() const |
bool | isVisible() const |
int | maximum() const |
int | minimum() const |
int | value() const |
- 31 public functions inherited from QObject
Public Slots
void | hide() |
void | pause() |
void | reset() |
void | resume() |
void | setMaximum(int maximum) |
void | setMinimum(int minimum) |
void | setPaused(bool paused) |
void | setRange(int minimum, int maximum) |
void | setValue(int value) |
void | setVisible(bool visible) |
void | show() |
void | stop() |
- 1 public slot inherited from QObject
Signals
void | maximumChanged(int maximum) |
void | minimumChanged(int minimum) |
void | valueChanged(int value) |
void | visibilityChanged(bool visible) |
- 2 signals inherited from QObject
Additional Inherited Members
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
The QWinTaskbarProgress class represents a progress indicator in the Windows taskbar.
A progress indicator is used to give the user an indication of the progress of an operation and to reassure them that the application is still running.
The progress indicator uses the concept of steps. It is set up by specifying the minimum and maximum possible step values, and it will display the percentage of steps that have been completed when you later give it the current step value. The percentage is calculated by dividing the progress (value() - minimum()) divided by maximum() - minimum().
The minimum and maximum number of steps can be specified by calling setMinimum() and setMaximum(). The current number of steps is set with setValue(). The progress indicator can be rewound to the beginning with reset().
If minimum and maximum both are set to 0
, the indicator shows up as a busy (indeterminate) indicator instead of a percentage of steps. This is useful when it is not possible to determine the number of steps.
A progress indicator at 50%. | |
A paused progress indicator at 50%. | |
A stopped progress indicator at 50%. | |
An indeterminate progress indicator. |
Note: The final appearance of the progress indicator varies depending on the active Windows theme.
See also QWinTaskbarButton.
Property Documentation
maximum : int
This property holds the maximum value of the progress indicator.
The default value is 100
.
Access functions:
int | maximum() const |
void | setMaximum(int maximum) |
Notifier signal:
void | maximumChanged(int maximum) |
minimum : int
This property holds the minimum value of the progress indicator.
The default value is 0
.
Access functions:
int | minimum() const |
void | setMinimum(int minimum) |
Notifier signal:
void | minimumChanged(int minimum) |
paused : bool
This property holds whether the progress indicator is paused.
The default value is false
.
The final appearance of a paused progress indicator depends on the active Windows theme. Typically, a paused progress indicator turns yellow to indicate that the progress is currently paused. Unlike a stopped progress indicator, a paused progress should not be used to indicate an error.
Access functions:
bool | isPaused() const |
void | setPaused(bool paused) |
See also pause() and resume().
stopped : const bool
This property holds whether the progress indicator is stopped.
The default value is false
.
The final appearance of a stopped progress indicator depends on the active Windows theme. Typically, a stopped progress indicator turns red to indicate that the progress is currently stopped. Unlike a paused progress indicator, a stopped progress may be used to indicate an error.
Access functions:
bool | isStopped() const |
value : int
This property holds the current value of the progress indicator.
The default value is 0
.
Access functions:
int | value() const |
void | setValue(int value) |
Notifier signal:
void | valueChanged(int value) |
visible : bool
This property holds whether the progress indicator is visible.
The default value is false
.
Access functions:
bool | isVisible() const |
void | setVisible(bool visible) |
Notifier signal:
void | visibilityChanged(bool visible) |
Member Function Documentation
QWinTaskbarProgress::QWinTaskbarProgress(QObject *parent = Q_NULLPTR)
Constructs a QWinTaskbarProgress with the parent object parent.
QWinTaskbarProgress::~QWinTaskbarProgress()
Destroys the QWinTaskbarProgress.
[slot]
void QWinTaskbarProgress::hide()
Hides the progress indicator.
[slot]
void QWinTaskbarProgress::pause()
Pauses the progress indicator.
See also paused.
[slot]
void QWinTaskbarProgress::reset()
Resets the progress indicator.
This function rewinds the value to the minimum value.
[slot]
void QWinTaskbarProgress::resume()
Resumes a paused or stopped progress indicator.
[slot]
void QWinTaskbarProgress::setRange(int minimum, int maximum)
Sets both the minimum and maximum values.
[slot]
void QWinTaskbarProgress::show()
Shows the progress indicator.
[slot]
void QWinTaskbarProgress::stop()
Stops the progress indicator.
See also stopped.