blob: 82d79bcdcd0c91dfcc5a9c7400abcebcaa194ecc (
plain) (
blame)
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
|
#ifndef STYLE_H
#define STYLE_H
#include "extendedpalette.h"
#include <QPalette>
#include <QProxyStyle>
class CfgEntry;
class Style : public QProxyStyle
{
Q_OBJECT
public:
static Style* getInstance();
static bool isDark(const QStyle* style);
const ExtendedPalette &extendedPalette() const;
void setStyle(QStyle* style, const QString& styleName);
QString name() const;
bool isDark() const;
protected:
bool eventFilter(QObject *obj, QEvent *ev) override;
private:
static Style* instance;
Style(QStyle* style);
ExtendedPalette extPalette;
QPalette initialPalette;
signals:
void paletteChanged();
};
#define STYLE Style::getInstance()
#endif // STYLE_H
|