QtCanpool 3.3.0
载入中...
搜索中...
未找到
qxplugincontext.cpp
浏览该文件的文档.
1
5#include "qxplugincontext.h"
6
8
9QxPluginContext::QxPluginContext(QxObjectPool *pool)
10 : m_pool(pool)
11{
12}
13
15
16void QxPluginContext::addObject(QObject *object)
17{
18 if (m_pool)
19 m_pool->addObject(object);
20}
21
22void QxPluginContext::removeObject(QObject *object)
23{
24 if (m_pool)
25 m_pool->removeObject(object);
26}
27
28QList<QObject *> QxPluginContext::objects() const
29{
30 return m_pool ? m_pool->objects() : QList<QObject *>();
31}
32
33QObject *QxPluginContext::objectByName(const QString &name) const
34{
36}
37
The meeting point for two plugins that want to cooperate.
QList< QObject * > objects() const
Everything published and still alive, in the order it was published.
void removeObject(QObject *object)
Takes object out.
QObject * objectByName(const QString &name) const
The first live published object whose objectName() is name, or null.
void addObject(QObject *object)
Publishes object under its objectName().
void addObject(QObject *object)
Publishes object under its objectName(), where other plugins can find it.
void removeObject(QObject *object)
Takes object out of the pool.
QList< QObject * > objects() const
Everything published by any plugin and still alive, in publication order.
QxObjectPool * m_pool
The host's pool, or null when the host offers none.
QObject * objectByName(const QString &name) const
The first live published object named name, or null.
#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
const char * name
Definition qxtheme.cpp:25