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
qwaylandcompositorwlshellplugin.cpp
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include <QtQml/qqmlextensionplugin.h>
5#include <QtQml/qqml.h>
6
7#include <QtWaylandCompositor/qwaylandquickextension.h>
8#include <QtWaylandCompositor/qwaylandwlshell.h>
9
11
13
14
35{
38public:
39 void registerTypes(const char *uri) override
40 {
41 Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWayland.Compositor.WlShell"));
42 defineModule(uri);
43 }
44
45 static void defineModule(const char *uri)
46 {
47 qmlRegisterModule(uri, QT_VERSION_MAJOR, QT_VERSION_MINOR);
48 qmlRegisterType<QWaylandWlShellQuickExtension>(uri, 1, 0, "WlShell");
49 qmlRegisterType<QWaylandWlShellSurface>(uri, 1, 0, "WlShellSurface");
50 }
51};
52
54
55#include "qwaylandcompositorwlshellplugin.moc"
The QQmlExtensionPlugin class provides an abstract base for custom QML extension plugins with custom ...
\qmlmodule QtWayland.Compositor.WlShell \title Qt Wayland WlShell extension
void registerTypes(const char *uri) override
Registers the QML types in the given uri.
\qmltype WlShell \instantiates QWaylandWlShell \inqmlmodule QtWayland.Compositor.WlShell
Combined button and popup list for selecting options.
void qmlRegisterModule(const char *uri, int versionMajor, int versionMinor)
Definition qqml.cpp:245
#define QQmlExtensionInterface_iid
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
QLatin1StringView QLatin1String
Definition qstringfwd.h:31
#define Q_OBJECT
#define Q_PLUGIN_METADATA(x)
#define Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(className)