Debian Codegraph @

src/album/controller/viewerthememanager.h

raw
1 /*
2 * Copyright (C) 2020 ~ 2021 Uniontech Software Technology Co., Ltd.
3 *
4 * Author: ZhangYong <[email protected]>
5 *
6 * Maintainer: ZhangYong <[email protected]>
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21 #ifndef VIEWERTHEMEMANAGER_H
22 #define VIEWERTHEMEMANAGER_H
23
24 #include <QObject>
25
26 class ViewerThemeManager : public QObject
27 {
28 Q_OBJECT
29 explicit ViewerThemeManager(QObject *parent = nullptr);
30 public:
31 enum AppTheme {
32 Dark,
33 Light,
34 };
35
36 static ViewerThemeManager *instance();
37 signals:
38 void viewerThemeChanged(AppTheme theme);
39 public slots:
40 AppTheme getCurrentTheme();
41 void setCurrentTheme(AppTheme theme);
42
43 private:
44 static ViewerThemeManager *m_viewerTheme;
45 AppTheme m_currentTheme;
46 };
47 #endif // VIEWERTHEMEMANAGER_H