Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwindows11style_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QWINDOWS11STYLE_P_H
5#define QWINDOWS11STYLE_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>
20
22
24class QWindows11Style;
25
27{
29public:
31 ~QWindows11Style() override;
32 void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
33 QPainter *painter, const QWidget *widget) const override;
34 void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
35 QPainter *painter, const QWidget *widget) const override;
37 const QWidget *widget = nullptr) const override;
38 QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option,
39 SubControl subControl, const QWidget *widget) const override;
40 void drawControl(ControlElement element, const QStyleOption *option,
41 QPainter *painter, const QWidget *widget) const override;
42 int styleHint(StyleHint hint, const QStyleOption *opt = nullptr,
43 const QWidget *widget = nullptr, QStyleHintReturn *returnData = nullptr) const override;
44 void polish(QWidget* widget) override;
45
46 QSize sizeFromContents(ContentsType type, const QStyleOption *option,
47 const QSize &size, const QWidget *widget) const override;
48 int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr,
49 const QWidget *widget = nullptr) const override;
50 void polish(QPalette &pal) override;
51 void unpolish(QWidget *widget) override;
52protected:
54private:
55 Q_DISABLE_COPY_MOVE(QWindows11Style)
56 Q_DECLARE_PRIVATE(QWindows11Style)
57 friend class QStyleFactory;
58
59 bool highContrastTheme = false;
60 int colorSchemeIndex = 0;
61 const QFont assetFont = QFont("Segoe Fluent Icons"); //Font to load icons from
62};
63
65 Q_DECLARE_PUBLIC(QWindows11Style)
66};
67
69
70#endif // QWINDOWS11STYLE_P_H
\reentrant
Definition qfont.h:22
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
The QStyleFactory class creates QStyle objects.
\variable QStyleOptionGraphicsItem::exposedRect
\variable QStyleOptionMenuItem::menuItemType
The QStyleOption class stores the parameters used by QStyle functions.
SubElement
This enum represents a sub-area of a widget.
Definition qstyle.h:242
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
The QWindows11Style class provides a look and feel suitable for applications on Microsoft Windows 11.
void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override
QWindows11Style()
Constructs a QWindows11Style object.
void unpolish(QWidget *widget) override
void polish(QWidget *widget) override
void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const override
QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const override
QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget) const override
int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const override
int styleHint(StyleHint hint, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr, QStyleHintReturn *returnData=nullptr) const override
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override
QRect subElementRect(QStyle::SubElement element, const QStyleOption *option, const QWidget *widget=nullptr) const override
~QWindows11Style() override
Destructor.
The QWindowsVistaStyle class provides a look and feel suitable for applications on Microsoft Windows ...
QOpenGLWidget * widget
[1]
QStyleOptionButton opt
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum type
GLuint GLenum option
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define Q_OBJECT
QPainter painter(this)
[7]