diff options
Diffstat (limited to 'src/compositor/extensions/qwaylandshellsurface.h')
-rw-r--r-- | src/compositor/extensions/qwaylandshellsurface.h | 60 |
1 files changed, 22 insertions, 38 deletions
diff --git a/src/compositor/extensions/qwaylandshellsurface.h b/src/compositor/extensions/qwaylandshellsurface.h index bcc931228..67ee5b8f8 100644 --- a/src/compositor/extensions/qwaylandshellsurface.h +++ b/src/compositor/extensions/qwaylandshellsurface.h @@ -1,68 +1,52 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWaylandCompositor module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef QWAYLANDSHELLSURFACE_H #define QWAYLANDSHELLSURFACE_H -#include <QtWaylandCompositor/QWaylandCompositorExtension> +#include <QtWaylandCompositor/qtwaylandqmlinclude.h> +#include <QtWaylandCompositor/qwaylandcompositorextension.h> QT_BEGIN_NAMESPACE class QWaylandQuickShellIntegration; class QWaylandQuickShellSurfaceItem; class QWaylandShellSurfacePrivate; -class QWaylandShellSurfaceTemplatePrivate; -class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandShellSurface : public QWaylandCompositorExtension +class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandShellSurface : public QWaylandCompositorExtension { Q_OBJECT + Q_DECLARE_PRIVATE(QWaylandShellSurface) + Q_PROPERTY(Qt::WindowType windowType READ windowType NOTIFY windowTypeChanged) + Q_PROPERTY(bool modal READ modal NOTIFY modalChanged FINAL REVISION(6, 8)) + QML_NAMED_ELEMENT(ShellSurface) + QML_UNCREATABLE("") + QML_ADDED_IN_VERSION(1, 0) public: #if QT_CONFIG(wayland_compositor_quick) virtual QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) = 0; #endif - QWaylandShellSurface(QWaylandObject *waylandObject) : QWaylandCompositorExtension(waylandObject) {} + QWaylandShellSurface(QWaylandObject *waylandObject); virtual Qt::WindowType windowType() const { return Qt::WindowType::Window; } + bool modal() const; + protected: - QWaylandShellSurface(QWaylandCompositorExtensionPrivate &dd) : QWaylandCompositorExtension(dd){} - QWaylandShellSurface(QWaylandObject *container, QWaylandCompositorExtensionPrivate &dd) : QWaylandCompositorExtension(container, dd) {} + QWaylandShellSurface(QWaylandShellSurfacePrivate &dd); + QWaylandShellSurface(QWaylandObject *container, QWaylandShellSurfacePrivate &dd); + void setModal(bool newModal); Q_SIGNALS: void windowTypeChanged(); + void modalChanged(); }; template <typename T> -class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandShellSurfaceTemplate : public QWaylandShellSurface +class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandShellSurfaceTemplate : public QWaylandShellSurface { public: - QWaylandShellSurfaceTemplate(QWaylandObject *container) + QWaylandShellSurfaceTemplate(QWaylandObject *container = nullptr) : QWaylandShellSurface(container) { } @@ -78,11 +62,11 @@ public: } protected: - QWaylandShellSurfaceTemplate(QWaylandCompositorExtensionPrivate &dd) + QWaylandShellSurfaceTemplate(QWaylandShellSurfacePrivate &dd) : QWaylandShellSurface(dd) { } - QWaylandShellSurfaceTemplate(QWaylandObject *container, QWaylandCompositorExtensionPrivate &dd) + QWaylandShellSurfaceTemplate(QWaylandObject *container, QWaylandShellSurfacePrivate &dd) : QWaylandShellSurface(container,dd) { } }; |