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
qwaylandqtshellintegration.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
5
6#include <QtWaylandCompositor/QWaylandCompositor>
7#include <QtWaylandCompositor/QWaylandQuickShellSurfaceItem>
8#include <QtWaylandCompositor/QWaylandSeat>
9#include "qwaylandqtshell.h"
10
12
13namespace QtWayland {
14
17 , m_item(item)
18 , m_shellSurface(qobject_cast<QWaylandQtShellSurface *>(item->shellSurface()))
19{
20 m_item->setSurface(m_shellSurface->surface());
22 this, &QtShellIntegration::handleQtShellSurfaceDestroyed);
23}
24
29
30void QtShellIntegration::handleQtShellSurfaceDestroyed()
31{
32 m_shellSurface = nullptr;
33}
34
35}
36
38
39#include "moc_qwaylandqtshellintegration_p.cpp"
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2960
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
QWaylandSurface * surface
void setSurface(QWaylandSurface *surface)
\qmltype ShellSurfaceItem \instantiates QWaylandQuickShellSurfaceItem \inherits WaylandQuickItem \inq...
QtShellIntegration(QWaylandQuickShellSurfaceItem *item)
Combined button and popup list for selecting options.
T qobject_cast(QObject *object)
\variable QObject::staticMetaObject
Definition qobject.h:419
QGraphicsItem * item