Blokkal::PluginManager Class Reference
Global plugin manager class. More...
#include <blokkalpluginmanager.h>
Public Slots | |
void | shutdown (void) |
void | unloadAllPlugins (void) |
void | unloadPlugin (const QString &pluginName) |
Signals | |
void | pluginLoaded (Blokkal::Plugin *plugin) |
Public Member Functions | |
KPluginInfo::List | availableBrowseEntryViewFactorys (void) const |
KPluginInfo::List | availableEditEntryViewFactorys (void) const |
KPluginInfo::List | availablePlugins (void) const |
KPluginInfo::List | availableProtocols (void) const |
Blokkal::Ui::BrowseEntryViewFactory * | browseEntryViewFactory (const QString &pluginName=QString::null) |
Blokkal::Ui::EditEntryViewFactory * | editEntryViewFactory (const QString &pluginName=QString::null) |
Blokkal::Plugin * | plugin (const QString &pluginName) |
KPluginInfo | pluginInfo (const Plugin *plugin) const |
KPluginInfo | pluginInfo (const QString &pluginName) const |
Blokkal::Protocol * | protocol (const QString &pluginName) |
Static Public Member Functions | |
static PluginManager * | self (void) |
Protected Slots | |
void | deletePlugin (Blokkal::Plugin *plugin) |
Blokkal::Plugin * | loadPlugin (const QString &pluginName) |
void | removePlugin (QObject *plugin) |
Friends | |
class | PluginManagerPrivate |
Detailed Description
Global plugin manager class.Plugins can be loaded and accessed through this class. The plugin manager will ref() kapp, so you must call shutdown() to unload all plugins in order to quit.
Definition at line 46 of file blokkalpluginmanager.h.
Member Function Documentation
KPluginInfo::List Blokkal::PluginManager::availableBrowseEntryViewFactorys | ( | void | ) | const |
This method returns a list of the KPluginInfo objects for all available BrowseEntryViewFactory plugins.
- Returns:
- list of available edit entry view plugins
Definition at line 290 of file blokkalpluginmanager.cpp.
KPluginInfo::List Blokkal::PluginManager::availableEditEntryViewFactorys | ( | void | ) | const |
This method returns a list of the KPluginInfo objects for all available EditEntryViewFactory plugins.
- Returns:
- list of available edit entry view plugins
Definition at line 107 of file blokkalpluginmanager.cpp.
KPluginInfo::List Blokkal::PluginManager::availablePlugins | ( | void | ) | const |
This method returns a list of the KPluginInfo objects for all available plugins.
- Returns:
- list of available protocols
Definition at line 96 of file blokkalpluginmanager.cpp.
KPluginInfo::List Blokkal::PluginManager::availableProtocols | ( | void | ) | const |
This method returns a list of the KPluginInfo objects for all available Protocols plugins.
- Returns:
- list of available protocols
Definition at line 101 of file blokkalpluginmanager.cpp.
Blokkal::Ui::BrowseEntryViewFactory * Blokkal::PluginManager::browseEntryViewFactory | ( | const QString & | pluginName = QString::null |
) |
Returns a pointer to the Blokkal::Ui::EditEntryViewFactory with name pluginName. If the plugin is not loaded yet, it will be loaded now. If loading the plugin fails 0 is returned. If pluginName is empty, the default view plugin will be loaded.
- Parameters:
-
pluginName name of the desired plugin
- Returns:
- pointer to the plugin
Definition at line 295 of file blokkalpluginmanager.cpp.
void Blokkal::PluginManager::deletePlugin | ( | Blokkal::Plugin * | plugin | ) | [protected, slot] |
This slot is called when a plugin signals that it is ready to be unloaded.
- Parameters:
-
plugin the plugin ready to unload
Definition at line 225 of file blokkalpluginmanager.cpp.
Blokkal::Ui::EditEntryViewFactory * Blokkal::PluginManager::editEntryViewFactory | ( | const QString & | pluginName = QString::null |
) |
Returns a pointer to the Blokkal::Ui::EditEntryViewFactory with name pluginName. If the plugin is not loaded yet, it will be loaded now. If loading the plugin fails 0 is returned. If pluginName is empty, the default view plugin will be loaded.
- Parameters:
-
pluginName name of the desired plugin
- Returns:
- pointer to the plugin
Definition at line 130 of file blokkalpluginmanager.cpp.
Blokkal::Plugin * Blokkal::PluginManager::loadPlugin | ( | const QString & | pluginName | ) | [protected, slot] |
Returns the plugin with the requested name. If it is not yet loaded it is instantiated according to the given type.
- Parameters:
-
pluginName name of the plugin
Definition at line 230 of file blokkalpluginmanager.cpp.
Blokkal::Plugin * Blokkal::PluginManager::plugin | ( | const QString & | pluginName | ) |
Returns the requested plugin. If the plugin is not loaded yet, it will be loaded. If loading the plugin fails 0 is returned.
- Parameters:
-
pluginName name of the plugin
- Returns:
- the plugin
Definition at line 146 of file blokkalpluginmanager.cpp.
KPluginInfo Blokkal::PluginManager::pluginInfo | ( | const Plugin * | plugin | ) | const |
Returns the plugin info for a plugin.
- Parameters:
-
plugin the plugin
- Returns:
- the plugin info for the plugin
Definition at line 165 of file blokkalpluginmanager.cpp.
KPluginInfo Blokkal::PluginManager::pluginInfo | ( | const QString & | pluginName | ) | const |
Returns the plugin info for a plugin with name pluginName.
- Parameters:
-
pluginName name of the plugin
- Returns:
- the plugin info for the plugin
Definition at line 151 of file blokkalpluginmanager.cpp.
void Blokkal::PluginManager::pluginLoaded | ( | Blokkal::Plugin * | plugin | ) | [signal] |
This signal is emitted when a plugin has been loaded
Blokkal::Protocol * Blokkal::PluginManager::protocol | ( | const QString & | pluginName | ) |
Returns a pointer to the protocol plugin with name pluginName. If the plugin is not loaded yet, it will be loaded. If loading the plugin fails 0 is returned.
- Parameters:
-
pluginName name of the desired protocol
- Returns:
- pointer to the protocol plugin
Definition at line 112 of file blokkalpluginmanager.cpp.
void Blokkal::PluginManager::removePlugin | ( | QObject * | plugin | ) | [protected, slot] |
This slot is called when a plugin has been deleted.
- Parameters:
-
plugin the destroyed plugin
Definition at line 263 of file blokkalpluginmanager.cpp.
Blokkal::PluginManager * Blokkal::PluginManager::self | ( | void | ) | [static] |
This method returns a pointer to the global plugin manager object. If no plugin manager exists yet, one will be created.
- Returns:
- pointer to the global plugin manager
Definition at line 90 of file blokkalpluginmanager.cpp.
void Blokkal::PluginManager::shutdown | ( | void | ) | [slot] |
This method is similar to unloadAllPlugins() but it will also deref() from kapp, thus alowing the application to quit.
Definition at line 284 of file blokkalpluginmanager.cpp.
void Blokkal::PluginManager::unloadAllPlugins | ( | void | ) | [slot] |
Unloads all plugins
Definition at line 213 of file blokkalpluginmanager.cpp.
void Blokkal::PluginManager::unloadPlugin | ( | const QString & | pluginName | ) | [slot] |
Unloads the plugin with pluginName. If no plugin with this name is loaded, nothing happens.
- Parameters:
-
pluginName the internal name of the plugin to unload
Definition at line 196 of file blokkalpluginmanager.cpp.
The documentation for this class was generated from the following files: