10#include <QtCore/QList>
11#include <QtCore/QObject>
12#include <QtCore/QPointer>
13#include <QtCore/QString>
60 void addObject(QObject *
object);
62 void removeObject(QObject *
object);
65 QList<QObject *> objects()
const;
67 QObject *objectByName(
const QString &
name)
const;
77 template <
typename T> T *
object()
const
79 const QList<QObject *> all = objects();
80 for (QObject *candidate : all) {
81 if (T *match = qobject_cast<T *>(candidate))
101 QList<QPointer<QObject>> m_objects;
The meeting point for two plugins that want to cooperate.
void aboutToRemoveObject(QObject *object)
Emitted just before removeObject() takes object out.
T * object() const
The first live published object castable to T, or null.
void objectAdded(QObject *object)
Emitted after object joined the pool.
#define Q_NULLPTR
Copyleft (C) 2025 maminjie canpool@163.com SPDX-License-Identifier: MulanPSL-2.0
#define QX_PLUGIN_BEGIN_NAMESPACE
#define QX_PLUGIN_END_NAMESPACE