diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2015-06-06 12:30:49 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-06-06 21:23:05 +0200 |
commit | 1e51b62c882b5fc1554efb46cb41c3d54157626c (patch) | |
tree | 08e81ac1382d8528584c9f237aaf8ff976e2af8a /logic/resources/IconResourceHandler.h | |
parent | 24db645167b42adba5d9c221215be83bef39e2a1 (diff) | |
download | PrismLauncher-1e51b62c882b5fc1554efb46cb41c3d54157626c.tar.gz PrismLauncher-1e51b62c882b5fc1554efb46cb41c3d54157626c.tar.bz2 PrismLauncher-1e51b62c882b5fc1554efb46cb41c3d54157626c.zip |
NOISSUE Comment and bugfix the Resource system
Diffstat (limited to 'logic/resources/IconResourceHandler.h')
-rw-r--r-- | logic/resources/IconResourceHandler.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/logic/resources/IconResourceHandler.h b/logic/resources/IconResourceHandler.h index dedfecb2..6f933ad4 100644 --- a/logic/resources/IconResourceHandler.h +++ b/logic/resources/IconResourceHandler.h @@ -9,14 +9,17 @@ class IconResourceHandler : public ResourceHandler public: explicit IconResourceHandler(const QString &key); + /// Sets the current theme and notifies all IconResourceHandlers of the change static void setTheme(const QString &theme); private: + // we need to keep track of all IconResourceHandlers so that we can update them if the theme changes void init(std::shared_ptr<ResourceHandler> &ptr) override; + static QList<std::weak_ptr<IconResourceHandler>> m_iconHandlers; QString m_key; static QString m_theme; - static QList<std::weak_ptr<IconResourceHandler>> m_iconHandlers; + // the workhorse, returns QVariantMap (filename => size) for m_key/m_theme QVariant get() const; }; |