Classes | |
class | Plugin |
Public Member Functions | |
void | clearPlugins () |
Clears the plugins list. More... | |
EnginePlugin * | info (int pluginIndex) const |
Convenience method - calls Plugin::info() for specified plugin. More... | |
void | initConfig () |
Inits configuration for plugins. More... | |
unsigned int | numPlugins () const |
Gets the number of loaded plugins. More... | |
const Plugin * | operator[] (unsigned int index) const |
Returns the requested plugin or nullptr. More... | |
const Plugin * | plugin (unsigned int index) const |
Returns the requested plugin or nullptr. More... | |
int | pluginIndexFromName (const QString &name) const |
Looks for a plugin which name equals to parameter. More... | |
const QList< Plugin * > & | plugins () const |
void | resetPluginsDirectory (const QString &pluginsDirectory) |
Resets the plugins directory, clearing the loaded plugins and getting new loaded plugins in the process. More... | |
Static Public Member Functions | |
static void | deinit () |
Destroys the init() instance. More... | |
static void | init (const QStringList &directories) |
Attempts to load plugins from given set of directories. More... | |
static PluginLoader * | instance () |
Accesses instance of the class after init(). More... | |
Definition at line 37 of file pluginloader.h.
void PluginLoader::clearPlugins | ( | ) |
Clears the plugins list.
Definition at line 247 of file pluginloader.cpp.
|
static |
Destroys the init() instance.
Definition at line 253 of file pluginloader.cpp.
EnginePlugin * PluginLoader::info | ( | int | pluginIndex | ) | const |
Convenience method - calls Plugin::info() for specified plugin.
Definition at line 287 of file pluginloader.cpp.
|
static |
Attempts to load plugins from given set of directories.
PluginLoader will step through directory in listed order. If a directory with at least one valid plugin is encountered, the loading process stops and skips all further directories.
This behavior may need to be revised and changed in the future.
Definition at line 297 of file pluginloader.cpp.
void PluginLoader::initConfig | ( | ) |
Inits configuration for plugins.
Definition at line 308 of file pluginloader.cpp.
|
static |
Accesses instance of the class after init().
This isn't a real singleton. Call init() before calling this. gpPluginLoader and gPluginLoader macros can also be used to access the instance.
Definition at line 316 of file pluginloader.cpp.
unsigned int PluginLoader::numPlugins | ( | ) | const |
Gets the number of loaded plugins.
It will return 0 in safe mode.
Definition at line 322 of file pluginloader.cpp.
const PluginLoader::Plugin * PluginLoader::operator[] | ( | unsigned int | index | ) | const |
Returns the requested plugin or nullptr.
Definition at line 367 of file pluginloader.cpp.
const PluginLoader::Plugin * PluginLoader::plugin | ( | unsigned int | index | ) | const |
Returns the requested plugin or nullptr.
Definition at line 332 of file pluginloader.cpp.
int PluginLoader::pluginIndexFromName | ( | const QString & | name | ) | const |
Looks for a plugin which name equals to parameter.
name | Name to look for. |
Definition at line 337 of file pluginloader.cpp.
void PluginLoader::resetPluginsDirectory | ( | const QString & | pluginsDirectory | ) |
Resets the plugins directory, clearing the loaded plugins and getting new loaded plugins in the process.
Definition at line 360 of file pluginloader.cpp.