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
qwaylandivisurfaceintegration.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 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/QWaylandIviSurface>
8#include <QtWaylandCompositor/QWaylandQuickShellSurfaceItem>
9#include <QtWaylandCompositor/QWaylandSeat>
10
12
13namespace QtWayland {
14
17 , m_item(item)
18 , m_shellSurface(qobject_cast<QWaylandIviSurface *>(item->shellSurface()))
19{
20 m_item->setSurface(m_shellSurface->surface());
21 connect(m_shellSurface, &QWaylandIviSurface::destroyed, this, &IviSurfaceIntegration::handleIviSurfaceDestroyed);
22}
23
28
29void IviSurfaceIntegration::handleIviSurfaceDestroyed()
30{
31 m_shellSurface = nullptr;
32}
33
34}
35
37
38#include "moc_qwaylandivisurfaceintegration_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...
\qmltype IviSurface \instantiates QWaylandIviSurface \inqmlmodule QtWayland.Compositor....
QWaylandSurface * surface
\qmlproperty WaylandSurface IviSurface::surface
void setSurface(QWaylandSurface *surface)
\qmltype ShellSurfaceItem \instantiates QWaylandQuickShellSurfaceItem \inherits WaylandQuickItem \inq...
IviSurfaceIntegration(QWaylandQuickShellSurfaceItem *item)
Combined button and popup list for selecting options.
T qobject_cast(QObject *object)
\variable QObject::staticMetaObject
Definition qobject.h:419
QGraphicsItem * item