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
qwaylandshellsurface.h
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
4#ifndef QWAYLANDSHELLSURFACE_H
5#define QWAYLANDSHELLSURFACE_H
6
7#include <QtWaylandCompositor/qtwaylandqmlinclude.h>
8#include <QtWaylandCompositor/qwaylandcompositorextension.h>
9
11
15
16class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandShellSurface : public QWaylandCompositorExtension
17{
19 Q_DECLARE_PRIVATE(QWaylandShellSurface)
20
21 Q_PROPERTY(Qt::WindowType windowType READ windowType NOTIFY windowTypeChanged)
22 Q_PROPERTY(bool modal READ modal NOTIFY modalChanged FINAL REVISION(6, 8))
23 QML_NAMED_ELEMENT(ShellSurface)
26public:
27#if QT_CONFIG(wayland_compositor_quick)
29#endif
32
33 bool modal() const;
34
35protected:
38 void setModal(bool newModal);
39
43};
44
45template <typename T>
46class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandShellSurfaceTemplate : public QWaylandShellSurface
47{
48public:
50 : QWaylandShellSurface(container)
51 { }
52
53 const struct wl_interface *extensionInterface() const override
54 {
55 return T::interface();
56 }
57
58 static T *findIn(QWaylandObject *container)
59 {
60 if (!container) return nullptr;
61 return qobject_cast<T *>(container->extension(T::interfaceName()));
62 }
63
64protected:
68
72};
73
75
76#endif // QWAYLANDSHELLSURFACE_H
\inmodule QtWaylandCompositor
\inmodule QtWaylandCompositor
QWaylandCompositorExtension * extension(const QByteArray &name)
Returns the compositor extension which matches name if one has been registered with the QWaylandObjec...
\qmltype ShellSurfaceItem \instantiates QWaylandQuickShellSurfaceItem \inherits WaylandQuickItem \inq...
\inmodule QtWaylandCompositor
const struct wl_interface * extensionInterface() const override
A pure virtual function which should be reimplemented to return the wl_interface which corresponds to...
static T * findIn(QWaylandObject *container)
If any instance of the interface has been registered with container, this is returned.
QWaylandShellSurfaceTemplate(QWaylandObject *container, QWaylandShellSurfacePrivate &dd)
QWaylandShellSurfaceTemplate(QWaylandShellSurfacePrivate &dd)
QWaylandShellSurfaceTemplate(QWaylandObject *container=nullptr)
\qmltype ShellSurface \instantiates QWaylandShellSurface \inqmlmodule QtWayland.Compositor
virtual Qt::WindowType windowType() const
Combined button and popup list for selecting options.
Definition qcompare.h:63
WindowType
Definition qnamespace.h:205
@ Window
Definition qnamespace.h:207
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
QGraphicsItem * item