1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDQUICKSHELLSURFACEITEM_H
5#define QWAYLANDQUICKSHELLSURFACEITEM_H
6
7#include <QtWaylandCompositor/QWaylandCompositorExtension>
8#include <QtWaylandCompositor/QWaylandQuickItem>
9
10QT_REQUIRE_CONFIG(wayland_compositor_quick);
11
12QT_BEGIN_NAMESPACE
13
14class QWaylandQuickShellSurfaceItemPrivate;
15class QWaylandShellSurface;
16
17class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandQuickShellSurfaceItem : public QWaylandQuickItem
18{
19 Q_OBJECT
20 Q_DECLARE_PRIVATE(QWaylandQuickShellSurfaceItem)
21 Q_PROPERTY(QWaylandShellSurface *shellSurface READ shellSurface WRITE setShellSurface NOTIFY shellSurfaceChanged)
22 Q_PROPERTY(QQuickItem *moveItem READ moveItem WRITE setMoveItem NOTIFY moveItemChanged)
23 Q_PROPERTY(bool autoCreatePopupItems READ autoCreatePopupItems WRITE setAutoCreatePopupItems NOTIFY autoCreatePopupItemsChanged)
24 Q_PROPERTY(bool staysOnTop READ staysOnTop WRITE setStaysOnTop NOTIFY staysOnTopChanged)
25 Q_PROPERTY(bool staysOnBottom READ staysOnBottom WRITE setStaysOnBottom NOTIFY staysOnBottomChanged)
26 Q_MOC_INCLUDE("qwaylandshellsurface.h")
27 QML_NAMED_ELEMENT(ShellSurfaceItem)
28 QML_ADDED_IN_VERSION(1, 0)
29public:
30 QWaylandQuickShellSurfaceItem(QQuickItem *parent = nullptr);
31 ~QWaylandQuickShellSurfaceItem() override;
32
33 QWaylandShellSurface *shellSurface() const;
34 void setShellSurface(QWaylandShellSurface *shellSurface);
35
36 QQuickItem *moveItem() const;
37 void setMoveItem(QQuickItem *moveItem);
38
39 bool autoCreatePopupItems();
40 void setAutoCreatePopupItems(bool enabled);
41
42 bool staysOnTop() const;
43 void setStaysOnTop(bool on);
44 bool staysOnBottom() const;
45 void setStaysOnBottom(bool on);
46
47Q_SIGNALS:
48 void shellSurfaceChanged();
49 void moveItemChanged();
50 void autoCreatePopupItemsChanged();
51 void staysOnTopChanged();
52 void staysOnBottomChanged();
53
54protected:
55 QWaylandQuickShellSurfaceItem(QWaylandQuickShellSurfaceItemPrivate &dd, QQuickItem *parent);
56};
57
58QT_END_NAMESPACE
59
60#endif // QWAYLANDQUICKSHELLSURFACEITEM_H
61

source code of qtwayland/src/compositor/extensions/qwaylandquickshellsurfaceitem.h