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
qquickwindowsstyle_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 QQUICKWINDOWSSTYLE_P_P_H
5#define QQUICKWINDOWSSTYLE_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 XX. This header
13// file may change from version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
19#include "qquickcommonstyle_p.h"
20#include "qquickstylehelper_p.h"
21
23
24namespace QQC2 {
25
27class QWindowsStylePrivate;
28
29#include <qlist.h>
30
31class QTime;
32
34{
35 Q_DECLARE_PUBLIC(QWindowsStyle)
36public:
37 enum { InvalidMetric = -23576 };
38
40 static int pixelMetricFromSystemDp(QStyle::PixelMetric pm, const QStyleOption *option = nullptr);
42 static qreal devicePixelRatio(const QStyleOption *option = nullptr)
43 {
44 return devicePixelRatio(option ? option->window : nullptr);
45 }
46
48 { return win ? win->devicePixelRatio() : QWindowsStylePrivate::appDevicePixelRatio(); }
49 static qreal nativeMetricScaleFactor(const QStyleOption *option = nullptr);
51 static bool isDarkMode();
52
53#if 0
54 bool hasSeenAlt(const QWidget *widget) const;
55 bool altDown() const { return alt_down; }
56 bool alt_down = false;
57#endif
58 QList<const QWidget *> seenAlt;
59 int menuBarTimer = 0;
60
66
67 enum {
68 windowsItemFrame = 2, // menu item frame width
69 windowsSepHeight = 9, // separator item height
70 windowsItemHMargin = 3, // menu item hor text margin
71 windowsItemVMargin = 2, // menu item ver text margin
72 windowsArrowHMargin = 6, // arrow horizontal margin
73 windowsRightBorder = 15, // right border on windows
74 windowsCheckMarkWidth = 12 // checkmarks width on windows
75 };
76
77private:
78 static qreal appDevicePixelRatio();
79};
80
81} // namespace QQC2
82
84
85#endif //QQUICKWINDOWSSTYLE_P_P_H
86
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
qreal devicePixelRatio() const
static qreal devicePixelRatio(const QWindow *win)
static int fixedPixelMetric(QStyle::PixelMetric pm)
static qreal devicePixelRatio(const QStyleOption *option=nullptr)
static qreal nativeMetricScaleFactor(const QStyleOption *option=nullptr)
QList< const QWidget * > seenAlt
static int pixelMetricFromSystemDp(QStyle::PixelMetric pm, const QStyleOption *option=nullptr)
The QWindowsStyle class provides a Microsoft Windows-like look and feel.
\variable QStyleOptionHeaderV2::textElideMode
\inmodule QtCore \reentrant
Definition qdatetime.h:215
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
\inmodule QtGui
Definition qwindow.h:63
QOpenGLWidget * widget
[1]
Combined button and popup list for selecting options.
GLuint GLenum option
double qreal
Definition qtypes.h:187
QWidget * win
Definition settings.cpp:6