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
"
9
#include "
qwaylandqtshellchrome.h
"
10
11
QT_BEGIN_NAMESPACE
12
13
Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS
(
QWaylandQtShell
)
14
15
38
class
QQtWaylandShellPlugin
: public
QQmlExtensionPlugin
39
{
40
Q_OBJECT
41
Q_PLUGIN_METADATA
(
IID
QQmlExtensionInterface_iid
)
42
public
:
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
58
QT_END_NAMESPACE
59
60
#include "qwaylandqtshellplugin.moc"
QQmlExtensionPlugin
The QQmlExtensionPlugin class provides an abstract base for custom QML extension plugins with custom ...
Definition
qqmlextensionplugin.h:28
QQtWaylandShellPlugin
\qmlmodule QtWayland.Compositor.QtShell \title Qt Wayland Qt Shell Extension
Definition
qwaylandqtshellplugin.cpp:39
QQtWaylandShellPlugin::registerTypes
void registerTypes(const char *uri) override
Registers the QML types in the given uri.
Definition
qwaylandqtshellplugin.cpp:43
QQtWaylandShellPlugin::defineModule
static void defineModule(const char *uri)
Definition
qwaylandqtshellplugin.cpp:49
QWaylandQtShell
Definition
qwaylandqtshell.h:25
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
QtPluginMetaDataKeys::IID
@ IID
qmlRegisterModule
void qmlRegisterModule(const char *uri, int versionMajor, int versionMinor)
Definition
qqml.cpp:245
QQmlExtensionInterface_iid
#define QQmlExtensionInterface_iid
Definition
qqmlextensioninterface.h:41
Q_ASSERT
#define Q_ASSERT(cond)
Definition
qrandom.cpp:47
QLatin1String
QLatin1StringView QLatin1String
Definition
qstringfwd.h:31
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:119
Q_PLUGIN_METADATA
#define Q_PLUGIN_METADATA(x)
Definition
qtmetamacros.h:54
qwaylandqtshell.h
qwaylandqtshellchrome.h
Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS
#define Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(className)
Definition
qwaylandquickextension.h:19
qtwayland
src
imports
compositor-extensions
qtshell
qwaylandqtshellplugin.cpp
Generated by
1.10.0