|
| 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 |
|
| QObject (QObject *parent) |
|
QBindable< QString > | bindableObjectName () |
|
bool | blockSignals (bool block) |
|
const QObjectList & | children () const const |
|
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
|
void | deleteLater () |
|
void | destroyed (QObject *obj) |
|
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
|
bool | disconnect (const QObject *receiver, const char *method) const const |
|
void | dumpObjectInfo () const const |
|
void | dumpObjectTree () const const |
|
QList< QByteArray > | dynamicPropertyNames () const const |
|
virtual bool | event (QEvent *e) |
|
virtual bool | eventFilter (QObject *watched, QEvent *event) |
|
T | findChild (QAnyStringView name, Qt::FindChildOptions options) const const |
|
T | findChild (Qt::FindChildOptions options) const const |
|
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
|
QList< T > | findChildren (QAnyStringView name, Qt::FindChildOptions options) const const |
|
QList< T > | findChildren (Qt::FindChildOptions options) const const |
|
bool | inherits (const char *className) const const |
|
void | installEventFilter (QObject *filterObj) |
|
bool | isQuickItemType () const const |
|
bool | isWidgetType () const const |
|
bool | isWindowType () const const |
|
void | killTimer (int id) |
|
virtual const QMetaObject * | metaObject () const const |
|
bool | moveToThread (QThread *targetThread) |
|
QString | objectName () const const |
|
void | objectNameChanged (const QString &objectName) |
|
QObject * | parent () const const |
|
QVariant | property (const char *name) const const |
|
| Q_CLASSINFO (Name, Value) |
|
| Q_EMIT Q_EMIT |
|
| Q_ENUM (...) |
|
| Q_ENUM_NS (...) |
|
| Q_ENUMS (...) |
|
| Q_FLAG (...) |
|
| Q_FLAG_NS (...) |
|
| Q_FLAGS (...) |
|
| Q_GADGET Q_GADGET |
|
| Q_GADGET_EXPORT (EXPORT_MACRO) |
|
| Q_INTERFACES (...) |
|
| Q_INVOKABLE Q_INVOKABLE |
|
| Q_MOC_INCLUDE Q_MOC_INCLUDE |
|
| Q_NAMESPACE Q_NAMESPACE |
|
| Q_NAMESPACE_EXPORT (EXPORT_MACRO) |
|
| Q_OBJECT Q_OBJECT |
|
| Q_PROPERTY (...) |
|
| Q_REVISION Q_REVISION |
|
| Q_SET_OBJECT_NAME (Object) |
|
| Q_SIGNAL Q_SIGNAL |
|
| Q_SIGNALS Q_SIGNALS |
|
| Q_SLOT Q_SLOT |
|
| Q_SLOTS Q_SLOTS |
|
T | qobject_cast (const QObject *object) |
|
T | qobject_cast (QObject *object) |
|
| QT_NO_CONTEXTLESS_CONNECT QT_NO_CONTEXTLESS_CONNECT |
|
| QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT |
|
void | removeEventFilter (QObject *obj) |
|
void | setObjectName (const QString &name) |
|
void | setObjectName (QAnyStringView name) |
|
void | setParent (QObject *parent) |
|
bool | setProperty (const char *name, const QVariant &value) |
|
bool | setProperty (const char *name, QVariant &&value) |
|
bool | signalsBlocked () const const |
|
int | startTimer (int interval, Qt::TimerType timerType) |
|
int | startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType) |
|
QThread * | thread () const const |
|
|
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
|
bool | disconnect (const QMetaObject::Connection &connection) |
|
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
|
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
|
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
|
QString | tr (const char *sourceText, const char *disambiguation, int n) |
|
typedef | QObjectList |
|
virtual void | childEvent (QChildEvent *event) |
|
virtual void | connectNotify (const QMetaMethod &signal) |
|
virtual void | customEvent (QEvent *event) |
|
virtual void | disconnectNotify (const QMetaMethod &signal) |
|
bool | isSignalConnected (const QMetaMethod &signal) const const |
|
int | receivers (const char *signal) const const |
|
QObject * | sender () const const |
|
int | senderSignalIndex () const const |
|
virtual void | timerEvent (QTimerEvent *event) |
|
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:
TaskbarButton* button = new TaskbarButton(widget);
button->setWindow(widget->windowHandle());
button->setOverlayIcon(
QIcon(
":/loading.png"));
progress->setValue(50);
- Note
- QWidget::windowHandle() returns a valid instance of a QWindow only after the widget has been shown. It is therefore recommended to delay the initialization of the TaskbarButton instances until QWidget::showEvent().
- Progress:
- 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 (progressValue() - progressMinimum()) divided by progressMaximum() - progressMinimum().
- The minimum and maximum number of steps can be specified by calling setProgressMinimum() and setProgressMaximum(). The current number of steps is set with setProgressValue(). The progress indicator can be rewound to the beginning with resetProgress().
- If progressMinimum and progressMaximum both are set to
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.
The different progress states of a taskbar button (at 50% progress)
Progress State | Appearance |
Hidden | |
Busy | |
Normal | |
Stopped | |
Paused | |
- Note
- The final appearance of the progress indicator varies depending on the active Windows theme.