Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qwaylandcompositorquickextensions_p.h
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#ifndef QWAYLANDCOMPOSITORQUICKEXTENSIONS_P_H
5#define QWAYLANDCOMPOSITORQUICKEXTENSIONS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQml/qqml.h>
19#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
20#include <QtWaylandCompositor/qwaylandquickextension.h>
21
22#include <QtWaylandCompositor/qwaylandcompositor.h>
23#include <QtWaylandCompositor/qwaylandquickcompositor.h>
24#include <QtWaylandCompositor/qwaylandqtwindowmanager.h>
25#include <QtWaylandCompositor/qwaylandtextinputmanager.h>
26#include <QtCore/private/qglobal_p.h>
27#if QT_WAYLAND_TEXT_INPUT_V4_WIP
28#include <QtWaylandCompositor/qwaylandtextinputmanagerv4.h>
29#endif // QT_WAYLAND_TEXT_INPUT_V4_WIP
30#include <QtWaylandCompositor/qwaylandqttextinputmethodmanager.h>
31#include <QtWaylandCompositor/qwaylandidleinhibitv1.h>
32
34
36{
39 Q_PROPERTY(QQmlListProperty<QObject> data READ data DESIGNABLE false)
40 Q_CLASSINFO("DefaultProperty", "data")
41 QML_NAMED_ELEMENT(WaylandCompositor)
43public:
45 {
46 return QQmlListProperty<QObject>(this, &m_objects);
47 }
48
50 {
52 &append_extension,
53 &countFunction,
54 &atFunction,
55 &clearFunction);
56 }
57
59 {
60 return static_cast<QWaylandQuickCompositorQuickExtensionContainer *>(list->data)->extension_vector.size();
61 }
62
64 {
65 return static_cast<QWaylandQuickCompositorQuickExtensionContainer *>(list->data)->extension_vector.at(index);
66 }
67
69 {
71 extension->setExtensionContainer(quickExtObj);
72 }
73
75 {
76 static_cast<QWaylandQuickCompositorQuickExtensionContainer *>(list->data)->extension_vector.clear();
77 }
78
79private:
80 QList<QObject *> m_objects;
81};
82
83
84// Note: These have to be in a header with a Q_OBJECT macro, otherwise we won't run moc on it
88#if QT_WAYLAND_TEXT_INPUT_V4_WIP
90#endif // QT_WAYLAND_TEXT_INPUT_V4_WIP
92
94
95#endif // QWAYLANDCOMPOSITORQUICKEXTENSIONS_P_H
Definition qlist.h:74
pointer data()
Definition qlist.h:414
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
Definition qqmllist.h:24
\inmodule QtWaylandCompositor
\inmodule QtWaylandCompositor
\qmltype QtTextInputMethodManager \instantiates QWaylandQtTextInputMethodManager \inqmlmodule QtWayla...
QQmlListProperty< QWaylandCompositorExtension > extensions()
static void append_extension(QQmlListProperty< QWaylandCompositorExtension > *list, QWaylandCompositorExtension *extension)
static qsizetype countFunction(QQmlListProperty< QWaylandCompositorExtension > *list)
static void clearFunction(QQmlListProperty< QWaylandCompositorExtension > *list)
static QWaylandCompositorExtension * atFunction(QQmlListProperty< QWaylandCompositorExtension > *list, qsizetype index)
Provides access to input methods in the compositor.
\qmltype TextInputManager \instantiates QWaylandTextInputManager \inqmlmodule QtWayland....
void extension()
[6]
Definition dialogs.cpp:230
Combined button and popup list for selecting options.
GLuint index
[2]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_CLASSINFO(name, value)
ptrdiff_t qsizetype
Definition qtypes.h:70
#define Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_CLASS(className, QmlType)
QList< int > list
[14]