The QWinTaskbarProgress class represents a progress indicator in the Windows taskbar. 更多...
| 頭: | #include <QWinTaskbarProgress> |
| qmake: | QT += winextras |
| Since: | Qt 5.2 |
| 繼承: | QObject |
| QWinTaskbarProgress (QObject * parent = Q_NULLPTR) | |
| ~QWinTaskbarProgress () | |
| bool | isPaused () const |
| bool | isStopped () const |
| bool | isVisible () const |
| int | maximum () const |
| int | minimum () const |
| int | value () const |
| 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 () |
| void | maximumChanged (int maximum ) |
| void | minimumChanged (int minimum ) |
| void | valueChanged (int value ) |
| void | visibilityChanged (bool visible ) |
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 ()) 除以 maximum () - minimum ().
The minimum and maximum number of steps can be specified by calling setMinimum () 和 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. |
注意: The final appearance of the progress indicator varies depending on the active Windows theme.
另請參閱 QWinTaskbarButton .
此特性保持進度指示器的最大值
默認值為
100
.
訪問函數:
| int | maximum () const |
| void | setMaximum (int maximum ) |
通知程序信號:
| void | maximumChanged (int maximum ) |
此特性保持進度指示器的最小值
默認值為
0
.
訪問函數:
| int | minimum () const |
| void | setMinimum (int minimum ) |
通知程序信號:
| void | minimumChanged (int minimum ) |
This property holds whether the progress indicator is paused.
默認值為
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.
訪問函數:
| bool | isPaused () const |
| void | setPaused (bool paused ) |
This property holds whether the progress indicator is stopped.
默認值為
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.
訪問函數:
| bool | isStopped () const |
This property holds the current value of the progress indicator
默認值為
0
.
訪問函數:
| int | value () const |
| void | setValue (int value ) |
通知程序信號:
| void | valueChanged (int value ) |
This property holds whether the progress indicator is visible.
默認值為
false
.
訪問函數:
| bool | isVisible () const |
| void | setVisible (bool visible ) |
通知程序信號:
| void | visibilityChanged (bool visible ) |
構造 QWinTaskbarProgress with the parent object parent .
銷毀 QWinTaskbarProgress .
[slot]
void
QWinTaskbarProgress::
hide
()
Hides the progress indicator.
[slot]
void
QWinTaskbarProgress::
pause
()
Pauses the progress indicator.
另請參閱 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 值。
[slot]
void
QWinTaskbarProgress::
show
()
Shows the progress indicator.
[slot]
void
QWinTaskbarProgress::
stop
()
Stops the progress indicator.
另請參閱 stopped .