Esempio n. 1
0
void WindowsTaskBar::setBadge(const QString &badge)
{
	if (badge.isEmpty())
		clearOverlayIcon(window()->winId());
	else {
		QPixmap pixmap = createBadge(badge);
		setOverlayIcon(window()->winId(), pixmap.toWinHICON());
	}
}
/*!
    Applies an overlay to the taskbar button of the given window handle to indicate
    application status or a notification to the user.

    \a pixmap image to apply as the overlay icon.
    \a accessibilityDescription provides an alt text version of the information conveyed by the overlay for accessibility purposes
 */
bool IntegratedMainWindow::setOverlayIcon(const QPixmap &pixmap, const QString &accessibilityDescription)
{
#ifdef Q_WS_WIN
    if (!pixmap.isNull())
    {
        return setOverlayIcon(pixmap.toWinHICON(), accessibilityDescription);
    }
#else
    Q_UNUSED(pixmap);
    Q_UNUSED(accessibilityDescription);
#endif

    return false;
}
/*!
    Applies an overlay to the taskbar button of the given window handle to indicate
    application status or a notification to the user.

    \a pixmap icon to apply as the overlay icon.
    \a accessibilityDescription provides an alt text version of the information conveyed by the overlay for accessibility purposes
 */
bool IntegratedMainWindow::setOverlayIcon(const QIcon &icon, const QString &accessibilityDescription)
{
#ifdef Q_WS_WIN
    if (!icon.isNull())
    {
        return setOverlayIcon(icon.pixmap(IntegratedMainWindow::overlayIconSize()), accessibilityDescription);
    }
#else
    Q_UNUSED(icon);
    Q_UNUSED(accessibilityDescription);
#endif

    return false;
}
Esempio n. 4
0
void QWinTaskbarButton::clearOverlayIcon()
{
    setOverlayAccessibleDescription(QString());
    setOverlayIcon(QIcon());
}