Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qwindowsstyle_p_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
4#ifndef QWINDOWSSTYLE_P_P_H
5#define QWINDOWSSTYLE_P_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 for the convenience
12// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
13// file may change from version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtWidgets/private/qtwidgetsglobal_p.h>
19#include "qwindowsstyle_p.h"
20#include "qcommonstyle_p.h"
21
22#if QT_CONFIG(style_windows)
23#include <qlist.h>
24
26
27class QTime;
28
29class Q_WIDGETS_EXPORT QWindowsStylePrivate : public QCommonStylePrivate
30{
31 Q_DECLARE_PUBLIC(QWindowsStyle)
32public:
33 enum { InvalidMetric = -23576 };
34
35 QWindowsStylePrivate();
36 static int pixelMetricFromSystemDp(QStyle::PixelMetric pm, const QStyleOption *option = nullptr, const QWidget *widget = nullptr);
37 static int fixedPixelMetric(QStyle::PixelMetric pm);
38 static qreal devicePixelRatio(const QWidget *widget = nullptr)
39 { return widget ? widget->devicePixelRatio() : QWindowsStylePrivate::appDevicePixelRatio(); }
40 static qreal nativeMetricScaleFactor(const QWidget *widget = nullptr);
41
42 bool hasSeenAlt(const QWidget *widget) const;
43 bool altDown() const { return alt_down; }
44 bool alt_down = false;
46 int menuBarTimer = 0;
47
48 QColor inactiveCaptionText;
49 QColor activeCaptionColor;
50 QColor activeGradientCaptionColor;
51 QColor inactiveCaptionColor;
52 QColor inactiveGradientCaptionColor;
53
54 enum {
55 windowsItemFrame = 2, // menu item frame width
56 windowsSepHeight = 9, // separator item height
57 windowsItemHMargin = 3, // menu item hor text margin
58 windowsItemVMargin = 2, // menu item ver text margin
59 windowsArrowHMargin = 6, // arrow horizontal margin
60 windowsRightBorder = 15, // right border on windows
61 windowsCheckMarkWidth = 12 // checkmarks width on windows
62 };
63
64private:
65 static qreal appDevicePixelRatio();
66};
67
69
70#endif // style_windows
71
72#endif //QWINDOWSSTYLE_P_P_H
73;
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
Definition qlist.h:74
qreal devicePixelRatio() const
The QStyleOption class stores the parameters used by QStyle functions.
PixelMetric
This enum describes the various available pixel metrics.
Definition qstyle.h:413
\inmodule QtCore \reentrant
Definition qdatetime.h:189
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QOpenGLWidget * widget
[1]
static const int windowsSepHeight
Definition javastyle.cpp:10
static const int windowsCheckMarkWidth
Definition javastyle.cpp:17
Combined button and popup list for selecting options.
GLuint GLenum option
double qreal
Definition qtypes.h:92
static const int windowsItemFrame
static const int windowsItemHMargin
static const int windowsArrowHMargin
static const int windowsItemVMargin
static const int windowsRightBorder