2021-03-05 02:35:15 +03:00
|
|
|
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
2022-01-01 06:57:53 +03:00
|
|
|
// SPDX-FileCopyrightText: 2022 Nheko Contributors
|
2021-03-05 02:35:15 +03:00
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2017-05-16 21:46:45 +03:00
|
|
|
#pragma once
|
2017-04-06 02:06:42 +03:00
|
|
|
|
|
|
|
#include <QCommonStyle>
|
|
|
|
|
|
|
|
class ThemeManager : public QCommonStyle
|
|
|
|
{
|
2021-09-18 01:22:33 +03:00
|
|
|
Q_OBJECT
|
2017-04-06 02:06:42 +03:00
|
|
|
|
|
|
|
public:
|
2021-09-18 01:22:33 +03:00
|
|
|
inline static ThemeManager &instance();
|
2017-04-06 02:06:42 +03:00
|
|
|
|
2021-09-18 01:22:33 +03:00
|
|
|
QColor themeColor(const QString &key) const;
|
2017-04-06 02:06:42 +03:00
|
|
|
|
|
|
|
private:
|
2021-11-22 02:32:49 +03:00
|
|
|
ThemeManager() {}
|
2017-04-06 02:06:42 +03:00
|
|
|
|
2021-09-18 01:22:33 +03:00
|
|
|
ThemeManager(ThemeManager const &);
|
|
|
|
void operator=(ThemeManager const &);
|
2017-04-06 02:06:42 +03:00
|
|
|
};
|
|
|
|
|
2017-08-20 13:47:22 +03:00
|
|
|
inline ThemeManager &
|
|
|
|
ThemeManager::instance()
|
2017-04-06 02:06:42 +03:00
|
|
|
{
|
2021-09-18 01:22:33 +03:00
|
|
|
static ThemeManager instance;
|
|
|
|
return instance;
|
2017-04-06 02:06:42 +03:00
|
|
|
}
|