-
Notifications
You must be signed in to change notification settings - Fork 7
/
commodorestyle.h
32 lines (27 loc) · 1000 Bytes
/
commodorestyle.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
#ifndef COMMODORESTYLE_H
#define COMMODORESTYLE_H
#include <QProxyStyle>
#include <QPalette>
#include <QPainterPath>
QT_BEGIN_NAMESPACE
class QPainterPath;
QT_END_NAMESPACE
class CommodoreStyle : public QProxyStyle
{
Q_OBJECT
public:
CommodoreStyle();
QPalette standardPalette() const override;
void polish(QWidget *widget) override;
void unpolish(QWidget *widget) override;
void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
QPainter *painter, const QWidget *widget) const override;
void drawControl(ControlElement control, const QStyleOption *option,
QPainter *painter, const QWidget *widget) const override;
private:
static void setTexture(QPalette &palette, QPalette::ColorRole role,
const QImage &image);
static QPainterPath roundRectPath(const QRect &rect);
mutable QPalette m_standardPalette;
};
#endif // COMMODORESTYLE_H