36 #include "definitions/definitions.h"
37 #include "application.h"
59 if (m_currentIconTheme == APP_NO_THEME) {
63 if (!m_cachedIcons.contains(name)) {
65 m_cachedIcons.insert(name, QIcon(APP_THEME_PATH + QDir::separator() +
66 m_currentIconTheme + QDir::separator() +
67 name + APP_THEME_SUFFIX));
70 return m_cachedIcons.value(name);
88 return m_currentIconTheme;
105 QHash<QString, QIcon> m_cachedIcons;
106 QString m_currentIconTheme;
109 static QPointer<IconFactory> s_instance;
112 #endif // ICONFACTORY_H
void setCurrentIconTheme(const QString &theme_name)
Sets icon theme with given name as the active one and loads it.
void setupSearchPaths()
Adds custom application path to be search for icons.
void loadCurrentIconTheme()
Loads name of selected icon theme (from settings) for the application and activates it...
Icon theme manipulator and provider.
QStringList installedIconThemes() const
Access to list of icon themes.
QIcon fromTheme(const QString &name)
Returns icon from active theme.
static IconFactory * instance()
Singleton getter.
QString currentIconTheme() const
Gets name of current theme.