Class sh::base::IconManager¶
-
class
sh::base
::
IconManager
: public QObject, public sh::base::Singleton¶ Fetches icons according to theme availability and settings.
Public Functions
-
QIcon
getIcon
(QString mainname, QString emblemname = QString(), QString miniemblemname = QString(), QStringList tags = QStringList())¶ Creates a QIcon from the icon name(s). Uses a cache.
-
QIcon
getIconByFullname
(QString fullname)¶ Creates a QIcon from the icon fullname. Uses a cache.
-
QIcon
getIcon
(QIcon mainicon, QString emblemname, QString miniemblemname, QStringList tags)¶ Creates a QIcon based on an existing one. Uncached.
-
QPixmap
getPixmap
(QString name, int size = 22)¶ Creates a QPixmap for an icon name. Uncached.
-
~IconManager
()¶
-
void
doInitialize
()¶ Executes singleton initialization.
-
void
doShutdown
()¶ Executes singleton shutdown.
-
void
shutdown
()¶ Shutdown down this singleton.
-
bool
isAlive
()¶ Returns if this singleton is alive (true until its shutdown begins).
Private Functions
-
IconManager
()¶
-
QIcon
_getIcon
(QString name)¶
-
QImage
_colourImage
(QImage img, QColor color)¶
Private Members
-
QMutex
cachemutex
¶
-
QHash<QString, QIcon>
cache
¶
-
QList<GetIconStrategy*>
getIconStrategies
¶
-
std::shared_ptr<sh::configuration::ConfigurationValue>
cfgvalPreferredStrategy
¶
-
class
GetIconStrategy
¶ Subclassed by sh::base::IconManager::IncludedGetIconStrategy, sh::base::IconManager::QIconFromThemeGetIconStrategy
-
class
IncludedGetIconStrategy
: public sh::base::IconManager::GetIconStrategy¶
-
class
QIconFromThemeGetIconStrategy
: public sh::base::IconManager::GetIconStrategy¶ -
Private Members
-
QHash<QString, QString>
_aliases
¶
-
QHash<QString, QString>
-
QIcon