30 #ifndef INTERFACES_CORE_IPLUGINSMANAGER_H
31 #define INTERFACES_CORE_IPLUGINSMANAGER_H
32 #include <QStringList>
33 #include <QObjectList>
58 virtual QObjectList GetAllPlugins ()
const = 0;
70 QObjectList
Filter (
const QObjectList& source)
const
73 for (
const auto sp : source)
74 if (qobject_cast<T> (sp))
91 return Filter<T> (GetAllPlugins ());
109 for (
const auto root : GetAllCastableRoots<T> ())
110 result << qobject_cast<T> (root);
122 virtual QObject* GetPluginByID (
const QByteArray&
id)
const = 0;
140 virtual QString GetPluginLibraryPath (
const QObject*
object)
const = 0;
153 virtual void InjectPlugin (QObject *
object) = 0;
170 virtual void ReleasePlugin (QObject *
object) = 0;
179 virtual QObject* GetQObject () = 0;
188 virtual void OpenSettings (QObject *plugin) = 0;
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...
QList< T > GetAllCastableTo() const
Similar to GetAlLCastableRoots() and provided for convenience.
QObjectList GetAllCastableRoots() const
This is the same as Filter<T> (GetAllPlugins()).
Q_DECLARE_INTERFACE(IPluginsManager,"org.Deviant.LeechCraft.IPluginsManager/1.0")
This interface is used to represent LeechCraft's global plugin manager.
virtual ~IPluginsManager()