ksim
KSim::PluginLoader Class Reference
#include <pluginloader.h>

Detailed Description
Provides a loader for the plugins.
Definition at line 66 of file pluginloader.h.
Public Types | |
| enum | SearchType { Name = 0, DesktopFile, LibName } |
| enum | ErrorCode { EmptyLibName = -3, LibNotFound = -2, UnSymbols = -1, LibLoaded = 0 } |
Signals | |
| void | pluginLoaded (const KSim::Plugin &) |
Public Member Functions | |
| bool | loadPlugin (const KDesktopFile &file) |
| bool | unloadPlugin (const Q3CString &name) |
| void | unloadAllPlugins () |
| bool | isLoaded (const KSim::Plugin &info) const |
| bool | isLoaded (const Q3CString &library) const |
| KSim::PluginInfo | findPluginInfo (const QString &name, SearchType type=DesktopFile) const |
| KSim::Plugin & | find (const Q3CString &libName) |
| const KSim::Plugin & | find (const Q3CString &libName) const |
| KSim::Plugin & | find (const KSim::PluginInfo &info) |
| const KSim::Plugin & | find (const KSim::PluginInfo &info) const |
| const KSim::PluginList & | pluginList () const |
| KSim::PluginList & | pluginList () |
| const KSim::Plugin & | plugin () const |
| KSim::Plugin & | plugin () |
Static Public Member Functions | |
| static PluginLoader & | self () |
Protected Member Functions | |
| PluginLoader () | |
| ~PluginLoader () | |
Friends | |
| class | MainView |
Member Enumeration Documentation
Definition at line 72 of file pluginloader.h.
Constructor & Destructor Documentation
| KSim::PluginLoader::PluginLoader | ( | ) | [protected] |
constructor for PluginLoader, use self() to get an instance
Definition at line 282 of file pluginloader.cpp.
| KSim::PluginLoader::~PluginLoader | ( | ) | [protected] |
Definition at line 85 of file pluginloader.cpp.
Member Function Documentation
| KSim::PluginLoader & KSim::PluginLoader::self | ( | ) | [static] |
| bool KSim::PluginLoader::loadPlugin | ( | const KDesktopFile & | file | ) |
loads a plugin, example:
KDesktopFile deskfile("/home/user/foo.desktop");
KSim::PluginLoader::self().loadPlugin(deskFile);
you can then use pluginList() to access the plugin, view, config page and plugin information - Parameters:
-
file is the desktop file of the lib
- Returns:
- true if the plugin is successfully loaded
Definition at line 91 of file pluginloader.cpp.
| bool KSim::PluginLoader::unloadPlugin | ( | const Q3CString & | name | ) |
unloads a loaded plugin and removes plugin entries from pluginList()
Definition at line 124 of file pluginloader.cpp.
| void KSim::PluginLoader::unloadAllPlugins | ( | ) |
| bool KSim::PluginLoader::isLoaded | ( | const KSim::Plugin & | info | ) | const |
convenience function
returns true if info is loaded
Definition at line 156 of file pluginloader.cpp.
| bool KSim::PluginLoader::isLoaded | ( | const Q3CString & | library | ) | const |
| KSim::PluginInfo KSim::PluginLoader::findPluginInfo | ( | const QString & | name, | |
| SearchType | type = DesktopFile | |||
| ) | const |
finds the plugins desktopfile and returns information on the plugin
- Returns:
- a KSim::PluginInfo object
- See also:
- KSim::PluginInfo
Definition at line 169 of file pluginloader.cpp.
| KSim::Plugin & KSim::PluginLoader::find | ( | const Q3CString & | libName | ) |
looks through the list of loaded plugins and returns the one that matches libName, or returns KSim::Plugin::null if a plugin could not be found.
if libName does not start with "ksim_" then the function will prepend this automatically.
- Returns:
- a KSim::Plugin object
- See also:
- KSim::Plugin
Definition at line 216 of file pluginloader.cpp.
| const KSim::Plugin & KSim::PluginLoader::find | ( | const Q3CString & | libName | ) | const |
convenience function, see the above function for details.
Definition at line 234 of file pluginloader.cpp.
| KSim::Plugin & KSim::PluginLoader::find | ( | const KSim::PluginInfo & | info | ) |
| const KSim::Plugin & KSim::PluginLoader::find | ( | const KSim::PluginInfo & | info | ) | const |
convenience function, see the above function for details.
Definition at line 257 of file pluginloader.cpp.
| const KSim::PluginList & KSim::PluginLoader::pluginList | ( | ) | const |
provides plugin(), view(), config page and plugin information
- See also:
- KSim::Plugin KSim::PluginList
Definition at line 262 of file pluginloader.cpp.
| KSim::PluginList & KSim::PluginLoader::pluginList | ( | ) |
Overloaded member function, This behaves essentially like the above function.
Definition at line 267 of file pluginloader.cpp.
| const KSim::Plugin & KSim::PluginLoader::plugin | ( | ) | const |
- Returns:
- a reference to the last plugin loaded (or a null plugin if the plugin was unable to load)
Definition at line 272 of file pluginloader.cpp.
| KSim::Plugin & KSim::PluginLoader::plugin | ( | ) |
Overloaded member function, This behaves essentially like the above function.
Definition at line 277 of file pluginloader.cpp.
| void KSim::PluginLoader::pluginLoaded | ( | const KSim::Plugin & | ) | [signal] |
Friends And Related Function Documentation
friend class MainView [friend] |
Definition at line 69 of file pluginloader.h.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference