AvogadroLibs
1.93.1
|
This class takes care of finding and loading Avogadro plugins. More...
#include <avogadro/qtplugins/pluginmanager.h>
Public Member Functions | |
QStringList & | pluginDirList () |
void | load () |
void | load (const QString &dir) |
template<typename T > | |
QList< T * > | pluginFactories () const |
template<typename T > | |
T * | pluginFactory (const QString &id) const |
Static Public Member Functions | |
static PluginManager * | instance () |
This class will find and load Avogadro plugins. Once loaded you can use an instance of this class to query and construct plugin instances. By default plugins are loaded from QApplication::applicationDirPath()../<libdir>/avogadro/plugins but this can be changed, or more paths can be added.
The load methods can be called multiple times, and will load any new plugins while ignoring plugins that have already been loaded.
|
static |
Get the singleton instance of the plugin manager. This instance should not be deleted.
QStringList& pluginDirList | ( | ) |
Get a reference to the plugin directory path list. Modifying this before calling load will allow you to add, remove or append to the search paths.
void load | ( | ) |
Load all plugins available in the specified plugin directories.
QList< T * > pluginFactories |
Let the user request plugins with a certain type, this must use the Qt mechanisms as qobject_cast is used in conjunction with interfaces.
T * pluginFactory | ( | const QString & | id | ) | const |
Let the user request a plugin by name, this must use the Qt mechanisms as qobject_cast is used in conjunction with interfaces.
id | The identifier of the plugin factory. |