12 #include <QStringList> 13 #include <QObjectList> 43 virtual QObjectList GetAllPlugins ()
const = 0;
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);
107 virtual QObject* GetPluginByID (
const QByteArray&
id)
const = 0;
125 virtual QString GetPluginLibraryPath (
const QObject*
object)
const = 0;
138 virtual void InjectPlugin (QObject *
object) = 0;
155 virtual void ReleasePlugin (QObject *
object) = 0;
164 virtual QObject* GetQObject () = 0;
173 virtual void OpenSettings (QObject *plugin) = 0;
193 virtual QIcon GetPluginIcon (QObject*) = 0;
196 Q_DECLARE_INTERFACE (
IPluginsManager,
"org.Deviant.LeechCraft.IPluginsManager/1.0")
QObjectList GetAllCastableRoots() const
This is the same as Filter<T> (GetAllPlugins()).
std::shared_ptr< ILoadProgressReporter > ILoadProgressReporter_ptr
This interface is used to represent LeechCraft's global plugin manager.
QList< T > GetAllCastableTo() const
Similar to GetAlLCastableRoots() and provided for convenience.
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 ~IPluginsManager()
Interface for reporting progress of some long-running operation during load time. ...