forked from engor/Jentos.Code
-
Notifications
You must be signed in to change notification settings - Fork 2
/
theme.h
executable file
·51 lines (40 loc) · 1.01 KB
/
theme.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef THEME_H
#define THEME_H
#include "std.h"
class Theme : public QObject {
Q_OBJECT
public:
Theme(QObject *parent=0);
static QString theme(){ return _theme; }
static QString prevTheme(){ return _prevTheme; }
static bool isCurrent(QString kind) {
return _theme == kind;
}
static void init();
static void set(QString kind);
static void save();
static void load();
static QIcon icon(QString name);
static QImage image(QString name, int theme=0);
static bool isDark();
static bool isDark2();
static bool isDark3();
static QString hexColor(const QColor &color);
static QColor selWordColor();
static Theme* instance() {
static Theme *t = 0;
if(!t)
t = new Theme;
return t;
}
void setLocal(QString kind);
signals:
void beginChange();
void endChange();
private:
static QString _theme, _prevTheme;
static bool _isDark;
static bool _isDark2;
static bool _isDark3;
};
#endif // THEME_H