4#ifndef QWAYLANDQUICKCHILDREN_H
5#define QWAYLANDQUICKCHILDREN_H
18#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
19#if QT_CONFIG(wayland_compositor_quick)
20#include <QtQml/QQmlListProperty>
21#include <QtCore/QList>
26#if QT_CONFIG(wayland_compositor_quick)
27#define Q_WAYLAND_COMPOSITOR_DECLARE_QUICK_CHILDREN(className) \
28 Q_PROPERTY(QQmlListProperty<QObject> data READ data DESIGNABLE false) \
29 Q_CLASSINFO("DefaultProperty", "data") \
31 QQmlListProperty<QObject> data() \
33 return QQmlListProperty<QObject>(this, this, \
34 &className::appendFunction, \
35 &className::countFunction, \
36 &className::atFunction, \
37 &className::clearFunction); \
39 static void appendFunction(QQmlListProperty<QObject> *list, QObject *object) \
41 static_cast<className *>(list->data)->m_children.append(object); \
43 static qsizetype countFunction(QQmlListProperty<QObject> *list) \
45 return static_cast<className *>(list->data)->m_children.size(); \
47 static QObject *atFunction(QQmlListProperty<QObject> *list, qsizetype index) \
49 return static_cast<className *>(list->data)->m_children.at(index); \
51 static void clearFunction(QQmlListProperty<QObject> *list) \
53 static_cast<className *>(list->data)->m_children.clear(); \
56 QList<QObject *> m_children;
58#define Q_WAYLAND_COMPOSITOR_DECLARE_QUICK_CHILDREN(className)
Combined button and popup list for selecting options.