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
qwaylandscreen_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 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 QWAYLANDSCREEN_H
6#define QWAYLANDSCREEN_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 <qpa/qplatformscreen.h>
20#include <QtGui/qscreen_platform.h>
21#include <QtWaylandClient/qtwaylandclientglobal.h>
22
23#include <QtWaylandClient/private/qwayland-wayland.h>
24#include <QtWaylandClient/private/qwayland-xdg-output-unstable-v1.h>
25#include <QtCore/private/qglobal_p.h>
26
28
29namespace QtWaylandClient {
30
31class QWaylandDisplay;
32class QWaylandCursor;
33
39
40class Q_WAYLANDCLIENT_EXPORT QWaylandScreen : public QPlatformScreen,
44{
45public:
48
49 void maybeInitialize();
50
52
53 QWaylandDisplay *display() const;
54
56 QString model() const override;
57
58 QRect geometry() const override;
59 int depth() const override;
61
63
64 QDpi logicalDpi() const override;
66
68 int scale() const;
71
72 QString name() const override { return mOutputName; }
73
74#if QT_CONFIG(cursor)
76#endif
77
79
80 uint32_t outputId() const { return m_outputId; }
82 {
83 return const_cast<::wl_output *>(QtWayland::wl_output::object());
84 }
85
88
91
92protected:
99 uint requiredEvents() const;
100
104 int subpixel,
105 const QString &make,
106 const QString &model,
109 void output_done() override;
110 void output_name(const QString &name) override;
112
113 // XdgOutput
119
126 int mScale = 1;
127 int mDepth = 32;
128 int mRefreshRate = 60000;
129 int mSubpixel = -1;
130 int mTransform = -1;
136 bool mInitialized = false;
137};
138
139}
140
141QT_END_NAMESPACE
142
143#endif // QWAYLANDSCREEN_H
friend class QPainter
Combined button and popup list for selecting options.
static QRegion marginsRegion(const QSize &size, const QMargins &margins)
Q_DECLARE_LOGGING_CATEGORY(lcQpaWaylandInput)