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_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_P_H
6#define QWINDOWSSTYLE_P_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 for the convenience
13// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
14// file may change from version to version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtWidgets/private/qtwidgetsglobal_p.h>
21#include "qcommonstyle_p.h"
22
23#if QT_CONFIG(style_windows)
24#include <qlist.h>
25
26QT_BEGIN_NAMESPACE
27
28class Q_WIDGETS_EXPORT QWindowsStylePrivate : public QCommonStylePrivate
29{
30 Q_DECLARE_PUBLIC(QWindowsStyle)
31public:
32 enum { InvalidMetric = -23576 };
33
34 QWindowsStylePrivate();
35 static int pixelMetricFromSystemDp(QStyle::PixelMetric pm, const QStyleOption *option = nullptr, const QWidget *widget = nullptr);
36 static int fixedPixelMetric(QStyle::PixelMetric pm);
37 static qreal nativeMetricScaleFactor(const QWidget *widget = nullptr);
38
39 bool hasSeenAlt(const QWidget *widget) const;
40 bool altDown() const { return alt_down; }
41 bool alt_down = false;
42 QList<const QWidget *> seenAlt;
43
44 QColor inactiveCaptionText;
45 QColor activeCaptionColor;
46 QColor activeGradientCaptionColor;
47 QColor inactiveCaptionColor;
48 QColor inactiveGradientCaptionColor;
49
50 enum {
51 windowsItemFrame = 2, // menu item frame width
52 windowsSepHeight = 9, // separator item height
53 windowsItemHMargin = 3, // menu item hor text margin
54 windowsItemVMargin = 2, // menu item ver text margin
55 windowsArrowHMargin = 6, // arrow horizontal margin
56 windowsRightBorder = 15, // right border on windows
57 windowsCheckMarkWidth = 12 // checkmarks width on windows
58 };
59};
60
61QT_END_NAMESPACE
62
63#endif // style_windows
64
65#endif //QWINDOWSSTYLE_P_P_H
66;