1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QWINDOWSSTYLE_P_H |
5 | #define QWINDOWSSTYLE_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtWidgets/private/qtwidgetsglobal_p.h> |
19 | #include <QtWidgets/qcommonstyle.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | |
24 | #if QT_CONFIG(style_windows) |
25 | |
26 | class QWindowsStylePrivate; |
27 | |
28 | class Q_WIDGETS_EXPORT QWindowsStyle : public QCommonStyle |
29 | { |
30 | Q_OBJECT |
31 | public: |
32 | QWindowsStyle(); |
33 | ~QWindowsStyle(); |
34 | |
35 | void polish(QApplication*) override; |
36 | void unpolish(QApplication*) override; |
37 | |
38 | void polish(QWidget*) override; |
39 | void unpolish(QWidget*) override; |
40 | |
41 | void polish(QPalette &) override; |
42 | |
43 | void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, |
44 | const QWidget *w = nullptr) const override; |
45 | void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, |
46 | const QWidget *w = nullptr) const override; |
47 | QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = nullptr) const override; |
48 | void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, |
49 | const QWidget *w = nullptr) const override; |
50 | QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, |
51 | const QSize &contentsSize, const QWidget *widget = nullptr) const override; |
52 | |
53 | int pixelMetric(PixelMetric pm, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override; |
54 | |
55 | int styleHint(StyleHint hint, const QStyleOption *opt = nullptr, const QWidget *widget = nullptr, |
56 | QStyleHintReturn *returnData = nullptr) const override; |
57 | |
58 | QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, |
59 | const QWidget *widget = nullptr) const override; |
60 | |
61 | QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = nullptr, |
62 | const QWidget *widget = nullptr) const override; |
63 | |
64 | protected: |
65 | bool eventFilter(QObject *o, QEvent *e) override; |
66 | QWindowsStyle(QWindowsStylePrivate &dd); |
67 | |
68 | private: |
69 | Q_DISABLE_COPY_MOVE(QWindowsStyle) |
70 | Q_DECLARE_PRIVATE(QWindowsStyle) |
71 | }; |
72 | |
73 | #endif // style_windows |
74 | |
75 | QT_END_NAMESPACE |
76 | |
77 | #endif // QWINDOWSSTYLE_P_H |
78 | |