Classes | |
| class | Plugin |
Public Member Functions | |
| void | clearPlugins () |
| Clears the plugins list. | |
| EnginePlugin * | info (int pluginIndex) const |
| Convenience method - calls Plugin::info() for specified plugin. | |
| void | initConfig () |
| Inits configuration for plugins. | |
| unsigned int | numPlugins () const |
| Gets the number of loaded plugins. | |
| const Plugin * | operator[] (unsigned int index) const |
| Returns the requested plugin or nullptr. | |
| const Plugin * | plugin (unsigned int index) const |
| Returns the requested plugin or nullptr. | |
| int | pluginIndexFromName (const QString &name) const |
| Looks for a plugin which name equals to parameter. | |
| 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. | |
Static Public Member Functions | |
| static void | deinit () |
| Destroys the init() instance. | |
| static void | init (const QStringList &directories, const QMap< QString, bool > &pluginsEnabled) |
| Attempts to load plugins from given set of directories. | |
| static PluginLoader * | instance () |
| Accesses instance of the class after init(). | |
Definition at line 38 of file pluginloader.h.
| void PluginLoader::clearPlugins | ( | ) |
Clears the plugins list.
Definition at line 191 of file pluginloader.cpp.
|
static |
Destroys the init() instance.
Definition at line 197 of file pluginloader.cpp.
| EnginePlugin * PluginLoader::info | ( | int | pluginIndex | ) | const |
Convenience method - calls Plugin::info() for specified plugin.
Definition at line 237 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.
| directories | The list of directories from which to load the plugins. |
| pluginsEnabled | Force these plugins to be either enabled or disabled, disregarding the default approach. The plugin names should be specified without the 'lib' prefix or the filename extension. |
Definition at line 247 of file pluginloader.cpp.
| void PluginLoader::initConfig | ( | ) |
Inits configuration for plugins.
Definition at line 258 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 266 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 272 of file pluginloader.cpp.
| const PluginLoader::Plugin * PluginLoader::operator[] | ( | unsigned int | index | ) | const |
Returns the requested plugin or nullptr.
Definition at line 317 of file pluginloader.cpp.
| const PluginLoader::Plugin * PluginLoader::plugin | ( | unsigned int | index | ) | const |
Returns the requested plugin or nullptr.
Definition at line 282 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 287 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 310 of file pluginloader.cpp.