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
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
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)) {
25 QWaylandXdgOutputV1Private::get(this)->setManager(m);
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)) {
37 QWaylandXdgOutputV1Private::get(this)->setOutput(o);
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:346
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
static QWaylandXdgOutputV1Private * get(QWaylandXdgOutputV1 *xdgOutput)
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]