Qx v0.7
Qt Extensions Library
|
The TaskbarButton class represents the Windows taskbar button for a top-level window. More...
Public Types | |
enum | ProgressState { Hidden , Busy , Normal , Stopped , Paused } |
Public Slots | |
void | clearOverlayIcon () |
void | resetProgress () |
void | setOverlayAccessibleDescription (const QString &description) |
void | setOverlayIcon (const QIcon &icon) |
void | setProgressMaximum (int progressMaximum) |
void | setProgressMinimum (int progressMinimum) |
void | setProgressRange (int progressMinimum, int progressMaximum) |
void | setProgressState (TaskbarButton::ProgressState progressState) |
void | setProgressValue (int progressValue) |
Signals | |
void | progressMaximumChanged (int progressMaximum) |
void | progressMinimumChanged (int progressMinimum) |
void | progressStateChanged (TaskbarButton::ProgressState progressState) |
void | progressValueChanged (int progressValue) |
Public Member Functions | |
TaskbarButton (QObject *parent=nullptr) | |
~TaskbarButton () | |
QString | overlayAccessibleDescription () const |
QIcon | overlayIcon () const |
int | progressMaximum () const |
int | progressMinimum () const |
ProgressState | progressState () const |
int | progressValue () const |
void | setWindow (QWindow *window) |
QWindow * | window () const |
Properties | |
QString | overlayAccessibleDescription |
The description of the overlay for accessibility purposes. | |
QIcon | overlayIcon |
The overlay icon of the taskbar button. | |
int | progressMaximum |
The maximum value of the progress indicator. | |
int | progressMinimum |
The minimum value of the progress indicator. | |
ProgressState | progressState |
The display state of the progress indicator. | |
int | progressValue |
The current value of the progress indicator. | |
QWindow * | window |
The window whose taskbar button is manipulated. | |
A TaskbarButton instance enables one to manipulate the overlay icon, overlay accessibility description, and progress indicator of the taskbar button that its connected window is associated with.
An overlay icon indicates change in the state of an application, whereas a progress indicator shows how time-consuming tasks are progressing.
The following example code illustrates how to use the TaskbarButton class to adjust the look of the taskbar button:
0
, the indicator state is automatically changed to Busy if it was previously Normal. This is useful when it is not possible to determine the number of steps. The progress state will be returned to normal when non-zero progress range is set and progress changes.Progress State | Appearance |
---|---|
Hidden | ![]() |
Busy | ![]() |
Normal | ![]() |
Stopped | ![]() |
Paused | ![]() |
This enum represents the display state of a task bar button's progress indicator.
|
explicit |
Constructs a TaskbarButton with the specified parent.
If parent is an instance of QWindow, it is automatically assigned as the taskbar button's window.
Qx::TaskbarButton::~TaskbarButton | ( | ) |
Destroys the TaskbarButton.
|
slot |
Clears the taskbar button's icon overlay and its description, if any.
QString Qx::TaskbarButton::overlayAccessibleDescription | ( | ) | const |
Returns the taskbar button's current overlay description.
QIcon Qx::TaskbarButton::overlayIcon | ( | ) | const |
Returns the taskbar button's current icon overlay.
int Qx::TaskbarButton::progressMaximum | ( | ) | const |
Returns the maximum value of the taskbar button's progress indicator.
|
signal |
This signal is emitted whenever the taskbar button's maximum progress value changes.
int Qx::TaskbarButton::progressMinimum | ( | ) | const |
Returns the minimum value of the taskbar button's progress indicator.
|
signal |
This signal is emitted whenever the taskbar button's minimum progress value changes.
TaskbarButton::ProgressState Qx::TaskbarButton::progressState | ( | ) | const |
Returns the display state of the taskbar button's progress indicator.
|
signal |
This signal is emitted whenever the taskbar button's progress display state changes.
int Qx::TaskbarButton::progressValue | ( | ) | const |
Returns the current value of the taskbar button's progress indicator.
|
signal |
This signal is emitted whenever the taskbar button's current progress value changes.
|
slot |
Resets the current value of the taskbar button's progress indicator to the minimum value.
|
slot |
Sets the taskbar button's icon overlay description to description.
|
slot |
Sets the taskbar button's icon overlay to icon.
|
slot |
Sets the maximum value of the taskbar button's progress indicator.
|
slot |
Sets the minimum value of the taskbar button's progress indicator.
|
slot |
Sets the minimum and maximum value of the taskbar button's progress indicator.
|
slot |
Sets the display state of the taskbar button's progress indicator.
|
slot |
Sets the current value of the taskbar button's progress indicator.
void Qx::TaskbarButton::setWindow | ( | QWindow * | window | ) |
Sets the taskbar button's associated window.
QWindow * Qx::TaskbarButton::window | ( | ) | const |
Returns the window that the taskbar button is currently associated with.
|
readwrite |
|
readwrite |
The default value is 100
.
|
readwrite |
The default value is 0
.
|
readwrite |
The default value is ProgressState::Hidden
.
|
readwrite |
The default value is 0
.