From 1e51b62c882b5fc1554efb46cb41c3d54157626c Mon Sep 17 00:00:00 2001 From: Jan Dalheimer Date: Sat, 6 Jun 2015 12:30:49 +0200 Subject: NOISSUE Comment and bugfix the Resource system --- logic/resources/IconResourceHandler.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'logic/resources/IconResourceHandler.h') 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 &ptr) override; + static QList> m_iconHandlers; QString m_key; static QString m_theme; - static QList> m_iconHandlers; + // the workhorse, returns QVariantMap (filename => size) for m_key/m_theme QVariant get() const; }; -- cgit