diff options
Diffstat (limited to 'src/ui/ThemeManager.h')
-rw-r--r-- | src/ui/ThemeManager.h | 31 |
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; +} |