KGuiAddons 5.109.0
|
Provides utility functions for icons. More...
Functions | |
QIcon | addOverlay (const QIcon &icon, const QIcon &overlay, Qt::Corner position) |
Adds the overlay over the icon in the specified position. | |
QIcon | addOverlays (const QIcon &icon, const QHash< Qt::Corner, QIcon > &overlays) |
Adds overlays over the icon. | |
QIcon | addOverlays (const QIcon &icon, const QStringList &overlays) |
Adds up to four overlays over the icon . | |
QIcon | addOverlays (const QString &iconName, const QStringList &overlays) |
Adds up to four overlays on the icon constructed from iconName . | |
Provides utility functions for icons.
QIcon KIconUtils::addOverlay | ( | const QIcon & | icon, |
const QIcon & | overlay, | ||
Qt::Corner | position | ||
) |
Adds the overlay over the icon in the specified position.
The overlay icon is scaled down approx. to 1/3 or 1/4 (depending on the icon size) and placed in one of the corners of the base icon.
QIcon KIconUtils::addOverlays | ( | const QIcon & | icon, |
const QHash< Qt::Corner, QIcon > & | overlays | ||
) |
Adds overlays over the icon.
The overlays is a QHash of Qt::Corner and QIcon. The Qt::Corner value decides where the overlay icon will be painted, the QIcon value is the overlay icon to be painted.
The overlay icon is scaled down to 1/3 or 1/4 (depending on the icon size) and placed in one of the corners of the base icon.
QIcon KIconUtils::addOverlays | ( | const QIcon & | icon, |
const QStringList & | overlays | ||
) |
Adds up to four overlays over the icon
.
The overlays
is a QStringList of icon names (e.g. the emblems that are drawn on icons in Dolphin and KFileWidget, e.g. symlink, un-mounted device ...etc).
Overlays are added in this order:
Each overlay icon is scaled down to 1/3 or 1/4 (depending on the icon size).
QIcon KIconUtils::addOverlays | ( | const QString & | iconName, |
const QStringList & | overlays | ||
) |
Adds up to four overlays on the icon constructed from iconName
.
The overlays
is a QStringList of icon names (e.g. the emblems that are drawn on icons in Dolphin and KFileWidget, e.g. symlink, un-mounted device ...etc).
Overlays are added in this order:
Each overlay icon is scaled down to 1/3 or 1/4 (depending on the icon size).
All QIcon
objects are constructed using QIcon::fromTheme()
.