55 QObjectList
Filter (
const QObjectList& source)
const
58 for (
const auto sp : source)
59 if (qobject_cast<T> (sp))
76 return Filter<T> (GetAllPlugins ());
94 for (
const auto root : GetAllCastableRoots<T> ())
95 result << qobject_cast<T> (root);
196Q_DECLARE_INTERFACE (
IPluginsManager,
"org.Deviant.LeechCraft.IPluginsManager/1.0")
Interface for reporting progress of some long-running operation during load time.
This interface is used to represent LeechCraft's global plugin manager.
virtual void OpenSettings(QObject *plugin)=0
Opens the settings page for the given plugin object.
virtual void ReleasePlugin(QObject *object)=0
Releases and removes the given plugin object.
virtual void InjectPlugin(QObject *object)=0
Injects the given plugin object.
virtual ILoadProgressReporter_ptr CreateLoadProgressReporter(QObject *thisPlugin)=0
Creates an object for reporting progress of a long-running load-time operation.
virtual ~IPluginsManager()
virtual QString GetPluginLibraryPath(const QObject *object) const =0
Returns the library path from which plugin instance object has been loaded.
virtual QIcon GetPluginIcon(QObject *)=0
virtual QObjectList GetAllPlugins() const =0
Returns list of pointers to all present plugins.
QObjectList GetAllCastableRoots() const
This is the same as Filter<T> (GetAllPlugins()).
virtual QObject * GetQObject()=0
Returns the pointer to plugin manager as a QObject.
QObjectList Filter(const QObjectList &source) const
Filters the given list of plugins and returns only those that can be casted to the given template typ...
virtual QObject * GetPluginByID(const QByteArray &id) const =0
Returns plugin identified by its id.
QList< T > GetAllCastableTo() const
Similar to GetAlLCastableRoots() and provided for convenience.
std::shared_ptr< ILoadProgressReporter > ILoadProgressReporter_ptr
std::shared_ptr< ILoadProgressReporter > ILoadProgressReporter_ptr