Qt 6.x
The Qt SDK
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
4#include <QWaylandCompositor>
5#include <QWaylandOutput>
6
9
11
14{
15}
16
18{
19 // Try to find the manager from the compositor extensions
20 if (!manager()) {
21 for (auto *p = parent(); p != nullptr; p = p->parent()) {
22 if (auto *c = qobject_cast<QWaylandCompositor *>(p)) {
23 for (auto *extension : c->extensions()) {
24 if (auto *m = qobject_cast<QWaylandXdgOutputManagerV1 *>(extension)) {
26 break;
27 }
28 }
29 }
30 }
31 }
32
33 // Try to find the output from the parents
34 if (!output()) {
35 for (auto *p = parent(); p != nullptr; p = p->parent()) {
36 if (auto *o = qobject_cast<QWaylandOutput *>(p)) {
38 break;
39 }
40 }
41 }
42}
43
45
46#include "moc_qwaylandquickxdgoutputv1.cpp"
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:311
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
static QWaylandXdgOutputV1Private * get(QWaylandXdgOutputV1 *xdgOutput)
void setOutput(QWaylandOutput *output)
void setManager(QWaylandXdgOutputManagerV1 *manager)
QWaylandOutput * output
\qmlproperty WaylandOutput XdgOutputV1::output \readonly
QWaylandXdgOutputManagerV1 * manager
\qmlproperty XdgOutputManagerV1 XdgOutputV1::manager \readonly
void extension()
[6]
Definition dialogs.cpp:230
Combined button and popup list for selecting options.
const GLfloat * m
const GLubyte * c
GLfloat GLfloat p
[1]