Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwindowsstyle_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QWINDOWSSTYLE_P_H
6#define QWINDOWSSTYLE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtWidgets/private/qtwidgetsglobal_p.h>
20#include <QtWidgets/qcommonstyle.h>
21
23
24
25#if QT_CONFIG(style_windows)
26
27class QWindowsStylePrivate;
28
29class Q_WIDGETS_EXPORT QWindowsStyle : public QCommonStyle
30{
31 Q_OBJECT
32public:
33 QWindowsStyle();
34 ~QWindowsStyle();
35
36 void polish(QApplication*) override;
37 void unpolish(QApplication*) override;
38
39 void polish(QWidget*) override;
40 void unpolish(QWidget*) override;
41
42 void polish(QPalette &) override;
43
44 void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p,
45 const QWidget *w = nullptr) const override;
46 void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p,
47 const QWidget *w = nullptr) const override;
48 QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = nullptr) const override;
49 void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p,
50 const QWidget *w = nullptr) const override;
51 QSize sizeFromContents(ContentsType ct, const QStyleOption *opt,
52 const QSize &contentsSize, const QWidget *widget = nullptr) const override;
53
54 int pixelMetric(PixelMetric pm, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override;
55
56 int styleHint(StyleHint hint, const QStyleOption *opt = nullptr, const QWidget *widget = nullptr,
57 QStyleHintReturn *returnData = nullptr) const override;
58
59 QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,
60 const QWidget *widget = nullptr) const override;
61
62 QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = nullptr,
63 const QWidget *widget = nullptr) const override;
64
65protected:
66 bool eventFilter(QObject *o, QEvent *e) override;
67 QWindowsStyle(QWindowsStylePrivate &dd);
68
69private:
70 Q_DISABLE_COPY_MOVE(QWindowsStyle)
71 Q_DECLARE_PRIVATE(QWindowsStyle)
72};
73
74#endif // style_windows
75
76QT_END_NAMESPACE
77
78#endif // QWINDOWSSTYLE_P_H
The QStylePlugin class provides an abstract base for custom QStyle plugins.
Q_GLOBAL_STATIC_WITH_ARGS(PermissionStatusHash, g_permissionStatusHash,({ { qMetaTypeId< QCameraPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QMicrophonePermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QBluetoothPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QContactsPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QCalendarPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QLocationPermission >(), Qt::PermissionStatus::Undetermined } }))
#define QStyleFactoryInterface_iid