102
|
1 #ifndef __gui__theme_h
|
|
2 #define __gui__theme_h
|
|
3
|
|
4 #include <QStyle>
|
|
5
|
|
6 enum class Themes {
|
|
7 OS,
|
|
8 LIGHT,
|
|
9 DARK
|
|
10 };
|
|
11
|
|
12 namespace Theme {
|
|
13
|
|
14 class Theme final {
|
|
15 public:
|
|
16 Theme(Themes theme = Themes::OS);
|
|
17 void SetTheme(Themes theme);
|
|
18 Themes GetTheme();
|
|
19
|
|
20 private:
|
|
21 bool IsInDarkMode();
|
|
22 void SetToDarkTheme();
|
|
23 void SetToLightTheme();
|
|
24 void SetStyleSheet(Themes theme);
|
|
25 Themes GetCurrentOSTheme();
|
|
26 Themes theme;
|
|
27 };
|
|
28
|
|
29 } // namespace Theme
|
|
30
|
|
31 #endif // __gui__theme_h
|