24 #ifndef GAMMARAY_OBJECTBROKER_H
25 #define GAMMARAY_OBJECTBROKER_H
27 #include "gammaray_common_export.h"
31 class QItemSelectionModel;
32 class QAbstractItemModel;
37 namespace ObjectBroker {
40 GAMMARAY_COMMON_EXPORT
void registerObject(
const QString &name, QObject *
object);
44 const QString interfaceName = QString::fromUtf8(qobject_interface_iid<T>());
49 GAMMARAY_COMMON_EXPORT QObject*
objectInternal(
const QString &name,
const QByteArray &type = QByteArray());
62 T ret = qobject_cast<T>(
objectInternal(name, QByteArray(qobject_interface_iid<T>())));
80 const QByteArray interfaceName(qobject_interface_iid<T>());
81 T ret = qobject_cast<T>(
objectInternal(QString::fromUtf8(interfaceName), interfaceName));
86 typedef QObject*(*ClientObjectFactoryCallback)(
const QString &, QObject *parent);
111 GAMMARAY_COMMON_EXPORT QAbstractItemModel*
model(
const QString &name);
113 typedef QAbstractItemModel*(*ModelFactoryCallback)(
const QString &);
128 typedef QItemSelectionModel*(*selectionModelFactoryCallback)(QAbstractItemModel*);
134 GAMMARAY_COMMON_EXPORT
void clear();
138 #endif // GAMMARAY_OBJECTBROKER_H