|
Krita Source Code Documentation
|
Enumerations | |
| enum class | Group { NoGroup = -1 , Desktop = 0 , FirstGroup = 0 , Toolbar , MainToolbar , Small , Panel , Dialog , LastGroup , User } |
| enum | StdSizes { SizeSmall = 16 , SizeSmallMedium = 22 , SizeMedium = 32 , SizeLarge = 48 , SizeHuge = 64 , SizeEnormous = 128 } |
Functions | |
| bool | adjustIcon (QIcon *icon) |
| QStringList | allUniqueLoadedIconNames () |
| void | clearIconCache () |
| QIcon | loadIcon (const QString &name) |
| void | updateIcon (QAbstractButton *button) |
| void | updateIcon (QAction *action) |
| void | updateIcon (QComboBox *comboBox) |
| void | updateIcon (QTabBar *tabBar) |
| void | updateIconCommon (QObject *object) |
| bool | useDarkIcons () |
Variables | |
| static QMap< QString, QIcon > | s_cache |
| static QMap< qint64, QString > | s_icons |
|
strong |
| Enumerator | |
|---|---|
| NoGroup | |
| Desktop | |
| FirstGroup | |
| Toolbar | |
| MainToolbar | |
| Small | |
| Panel | |
| Dialog | |
| LastGroup | |
| User | |
Definition at line 31 of file kis_icon_utils.h.
| Enumerator | |
|---|---|
| SizeSmall | |
| SizeSmallMedium | |
| SizeMedium | |
| SizeLarge | |
| SizeHuge | |
| SizeEnormous | |
Definition at line 26 of file kis_icon_utils.h.
| bool KisIconUtils::adjustIcon | ( | QIcon * | icon | ) |
Definition at line 118 of file kis_icon_utils.cpp.
References loadIcon(), and s_icons.
| KRITAWIDGETUTILS_EXPORT QStringList KisIconUtils::allUniqueLoadedIconNames | ( | ) |
Definition at line 221 of file kis_icon_utils.cpp.
References s_icons.
| KRITAWIDGETUTILS_EXPORT void KisIconUtils::clearIconCache | ( | ) |
Definition at line 177 of file kis_icon_utils.cpp.
References s_cache.
| KRITAWIDGETUTILS_EXPORT QIcon KisIconUtils::loadIcon | ( | const QString & | name | ) |
Load a themed icon using its base name. Use it in Krita instead of previous KisIconUtils::loadIcon()
Definition at line 29 of file kis_icon_utils.cpp.
References p, s_cache, s_icons, and useDarkIcons().
| KRITAWIDGETUTILS_EXPORT void KisIconUtils::updateIcon | ( | QAbstractButton * | button | ) |
Update an icon of button according to the current theme
Definition at line 181 of file kis_icon_utils.cpp.
References adjustIcon(), button(), and KIS_SAFE_ASSERT_RECOVER_RETURN.
| KRITAWIDGETUTILS_EXPORT void KisIconUtils::updateIcon | ( | QAction * | action | ) |
Update an icon of action according to the current theme
Definition at line 202 of file kis_icon_utils.cpp.
References adjustIcon().
| KRITAWIDGETUTILS_EXPORT void KisIconUtils::updateIcon | ( | QComboBox * | comboBox | ) |
Update an icon of comboBox according to the current theme
Definition at line 192 of file kis_icon_utils.cpp.
References adjustIcon().
| KRITAWIDGETUTILS_EXPORT void KisIconUtils::updateIcon | ( | QTabBar * | tabBar | ) |
Update the iconst of the tabBar according to the current theme
Definition at line 211 of file kis_icon_utils.cpp.
References adjustIcon().
| KRITAWIDGETUTILS_EXPORT void KisIconUtils::updateIconCommon | ( | QObject * | object | ) |
This function updates an icon of object depending on its type. See updateIcon() overrides to see the supported types
Definition at line 150 of file kis_icon_utils.cpp.
References button(), and updateIcon().
| KRITAWIDGETUTILS_EXPORT bool KisIconUtils::useDarkIcons | ( | ) |
Should we use a dark or light themed icon? Useful for images that are loaded dynamically like document templates instead of being in static resource files
Definition at line 113 of file kis_icon_utils.cpp.
|
static |
Definition at line 26 of file kis_icon_utils.cpp.
|
static |
Definition at line 27 of file kis_icon_utils.cpp.