-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththememanager.h
59 lines (31 loc) · 910 Bytes
/
thememanager.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
52
53
54
55
56
57
58
59
#ifndef THEMEMANAGER_H
#define THEMEMANAGER_H
#include <QObject>
#include <QPixmap>
#include <QColor>
#include <QPalette>
class MainWindow;
#define THEME ThemeManager::instance()
class ThemeManager : public QObject
{
Q_OBJECT
static ThemeManager * m_instance;
QString m_defaultStyle;
QPalette m_defaultPalette;
QPixmap m_rotateCursorPm;
QPixmap m_drawingCursorPm;
public:
static ThemeManager *instance(QObject *mainwindow = nullptr);
inline QPixmap rotateCursorPm(){return m_rotateCursorPm;}
inline QPixmap drawingCursorPm(){return m_drawingCursorPm;}
signals:
void styleApplied();
private:
//only allow singleton instanc
ThemeManager();
void apply();
QColor parseColor(const QString & str);
public slots:
void themeChanged(int arg1);
};
#endif // THEMEMANAGER_H