| 1 | // Copyright (C) 2023 Jan Grulich <jgrulich@redhat.com> |
|---|---|
| 2 | // Copyright (C) 2023 The Qt Company Ltd. |
| 3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 4 | |
| 5 | #include <QtWaylandClient/private/qwaylanddecorationplugin_p.h> |
| 6 | |
| 7 | #include "qwaylandadwaitadecoration_p.h" |
| 8 | |
| 9 | QT_BEGIN_NAMESPACE |
| 10 | |
| 11 | using namespace Qt::StringLiterals; |
| 12 | |
| 13 | namespace QtWaylandClient { |
| 14 | |
| 15 | class QWaylandAdwaitaDecorationPlugin : public QWaylandDecorationPlugin |
| 16 | { |
| 17 | Q_OBJECT |
| 18 | Q_PLUGIN_METADATA(IID QWaylandDecorationFactoryInterface_iid FILE "adwaita.json") |
| 19 | public: |
| 20 | QWaylandAbstractDecoration *create(const QString &key, const QStringList ¶ms) override; |
| 21 | }; |
| 22 | |
| 23 | QWaylandAbstractDecoration *QWaylandAdwaitaDecorationPlugin::create(const QString &key, const QStringList ¶ms) |
| 24 | { |
| 25 | Q_UNUSED(params); |
| 26 | if (!key.compare(other: "adwaita"_L1, cs: Qt::CaseInsensitive) || |
| 27 | !key.compare(other: "gnome"_L1, cs: Qt::CaseInsensitive)) |
| 28 | return new QWaylandAdwaitaDecoration(); |
| 29 | return nullptr; |
| 30 | } |
| 31 | |
| 32 | } |
| 33 | |
| 34 | QT_END_NAMESPACE |
| 35 | |
| 36 | #include "main.moc" |
| 37 |
