summary refs log tree commit diff
path: root/src/ui/ThemeManager.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-17 16:37:25 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-17 16:37:25 +0300
commit0e814da91c8e041897a4c3f7e6e9234bbc7c6f7a (patch)
tree21f655d30630fe77ba48d07e4b357e2b6c6a5730 /src/ui/ThemeManager.h
parentMerge pull request #372 from bebehei/notification (diff)
downloadnheko-0e814da91c8e041897a4c3f7e6e9234bbc7c6f7a.tar.xz
Move all files under src/
Diffstat (limited to 'src/ui/ThemeManager.h')
-rw-r--r--src/ui/ThemeManager.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/ui/ThemeManager.h b/src/ui/ThemeManager.h
new file mode 100644
index 00000000..d35ff754
--- /dev/null
+++ b/src/ui/ThemeManager.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include <QCommonStyle>
+
+#include "Theme.h"
+
+class ThemeManager : public QCommonStyle
+{
+        Q_OBJECT
+
+public:
+        inline static ThemeManager &instance();
+
+        void setTheme(Theme *theme);
+        QColor themeColor(const QString &key) const;
+
+private:
+        ThemeManager();
+
+        ThemeManager(ThemeManager const &);
+        void operator=(ThemeManager const &);
+
+        Theme *theme_;
+};
+
+inline ThemeManager &
+ThemeManager::instance()
+{
+        static ThemeManager instance;
+        return instance;
+}