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
qwaylandqtshellplugin.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 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 "qwaylandqtshell.h"
10
12
14
15
39{
42public:
43 void registerTypes(const char *uri) override
44 {
45 Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWayland.Compositor.QtShell"));
46 defineModule(uri);
47 }
48
49 static void defineModule(const char *uri)
50 {
51 qmlRegisterModule(uri, QT_VERSION_MAJOR, QT_VERSION_MINOR);
52 qmlRegisterType<QWaylandQtShellQuickExtension>(uri, 1, 0, "QtShell");
53 qmlRegisterType<QWaylandQtShellSurface>(uri, 1, 0, "QtShellSurface");
54 qmlRegisterType<QWaylandQtShellChrome>(uri, 1, 0, "QtShellChrome");
55 }
56};
57
59
60#include "qwaylandqtshellplugin.moc"
The QQmlExtensionPlugin class provides an abstract base for custom QML extension plugins with custom ...
\qmlmodule QtWayland.Compositor.QtShell \title Qt Wayland Qt Shell Extension
void registerTypes(const char *uri) override
Registers the QML types in the given uri.
static void defineModule(const char *uri)
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)