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
qwaylandcompositorpresentationtimeplugin.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 LG Electronics Inc.
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/private/qwaylandpresentationtime_p.h>
9
11
13
14
37{
40public:
41 void registerTypes(const char *uri) override
42 {
43 Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWayland.Compositor.PresentationTime"));
44 defineModule(uri);
45 }
46
47 static void defineModule(const char *uri)
48 {
49 qmlRegisterModule(uri, QT_VERSION_MAJOR, QT_VERSION_MINOR);
50 qmlRegisterType<QWaylandPresentationTime>(uri, 1, 0, "PresentationTime");
51 }
52};
54
55#include "qwaylandcompositorpresentationtimeplugin.moc"
The QQmlExtensionPlugin class provides an abstract base for custom QML extension plugins with custom ...
\qmlmodule QtWayland.Compositor.PresentationTime \title Qt Wayland Presentation Time Extension
void registerTypes(const char *uri) override
Registers the QML types in the given uri.
\qmltype PresentationTime \instantiates QWaylandPresentationTime \inqmlmodule QtWayland....
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)