From 1be7d573326570d63e55e36235537ed2b1831ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 10 Apr 2016 17:01:24 +0200 Subject: NOISSUE re/move some dead code and unused build system parts --- api/dead/src/handlers/IconResourceHandler.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 api/dead/src/handlers/IconResourceHandler.h (limited to 'api/dead/src/handlers/IconResourceHandler.h') diff --git a/api/dead/src/handlers/IconResourceHandler.h b/api/dead/src/handlers/IconResourceHandler.h new file mode 100644 index 00000000..0cc4de4f --- /dev/null +++ b/api/dead/src/handlers/IconResourceHandler.h @@ -0,0 +1,23 @@ +#pragma once + +#include +#include + +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; + + // the workhorse, returns QVariantMap (filename => size) for m_key/m_theme + QVariant get() const; +}; -- cgit v1.2.3