Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qwaylandquickxdgoutputv1.cpp
Go to the documentation of this file.
1
// Copyright (C) 2019 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
<
QWaylandCompositor
>
6
#
include
<
QWaylandOutput
>
7
8
#
include
"qwaylandquickxdgoutputv1.h"
9
#
include
"qwaylandxdgoutputv1_p.h"
10
11
QT_BEGIN_NAMESPACE
12
13
QWaylandQuickXdgOutputV1::QWaylandQuickXdgOutputV1()
14
: QWaylandXdgOutputV1()
15
{
16
}
17
18
void
QWaylandQuickXdgOutputV1::componentComplete()
19
{
20
// Try to find the manager from the compositor extensions
21
if
(!manager()) {
22
for
(
auto
*p = parent(); p !=
nullptr
; p = p->parent()) {
23
if
(
auto
*c = qobject_cast<QWaylandCompositor *>(p)) {
24
const
auto
extensions = c->extensions();
25
for
(
auto
*extension : extensions) {
26
if
(
auto
*m = qobject_cast<QWaylandXdgOutputManagerV1 *>(extension)) {
27
QWaylandXdgOutputV1Private::get(
this
)->setManager(m);
28
break
;
29
}
30
}
31
}
32
}
33
}
34
35
// Try to find the output from the parents
36
if
(!output()) {
37
for
(
auto
*p = parent(); p !=
nullptr
; p = p->parent()) {
38
if
(
auto
*o = qobject_cast<QWaylandOutput *>(p)) {
39
QWaylandXdgOutputV1Private::get(
this
)->setOutput(o);
40
break
;
41
}
42
}
43
}
44
}
45
46
QT_END_NAMESPACE
47
48
#
include
"moc_qwaylandquickxdgoutputv1.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtwayland
src
compositor
extensions
qwaylandquickxdgoutputv1.cpp
Generated on
for Qt by
1.18.0