# class Plugin | A plugin is the way to add actions to an existing KParts application, or to a Part. More...
Full name | `KParts::Plugin`
Definition | `#include <plugin.h>`
Inherits | KXMLGUIClient (kdeui) [virtual public ], QObject (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- struct PluginInfo

#### Public Methods

- Plugin ( QObject* parent = 0, const char* name = 0 )
- virtual ~Plugin ()

#### Public Static Methods

- static void loadPlugins ( QObject *parent, const KInstance * instance )
- static void loadPlugins ( QObject *parent, const QValueList<PluginInfo> &pluginInfos )
- static QList<Plugin> pluginObjects ( QObject *parent )

#### Protected Static Methods

- static QValueList<Plugin::PluginInfo> pluginInfos ( const KInstance * instance )
- static Plugin* loadPlugin ( QObject * parent, const char* libname )

## Detailed Description

A plugin is the way to add actions to an existing KParts application, or to a Part.

The XML of those plugins looks exactly like of the shell or parts, with one small difference: The document tag should have an additional attribute, named "library", and contain the name of the library implementing the plugin.

If you want this plugin to be used by a part, you need to install the rc file under the directory "data" (KDEDIR/share/apps usually)+"/instancename/kpartplugins/" where instancename is the name of the part's instance.

PluginInfo (struct) | ### PluginInfo

Plugin ( QObject* parent = 0, const char* name = 0 ) | ### Plugin

Construct a new KParts plugin.

~Plugin () | ### ~Plugin

[virtual]

Destructor.

void loadPlugins ( QObject *parent, const KInstance * instance ) | ### loadPlugins

[static]

Load the plugin libraries from the directories appropriate to `instance` and make the Plugin objects children of `parent` .

void loadPlugins ( QObject *parent, const QValueList<PluginInfo> &pluginInfos ) | ### loadPlugins

[static]

Load the plugin libraries specified by the list `docs` and make the Plugin objects children of `parent` .

QList<Plugin> pluginObjects ( QObject *parent ) | ### pluginObjects

[static]

Returns a list of plugin objects loaded for `parent`. This functions basically calls the queryList method of QObject to retrieve the list of child objects inheritting KParts::Plugin .

QValueList<Plugin::PluginInfo> pluginInfos ( const KInstance * instance ) | ### pluginInfos

[protected static]

Look for plugins in the `instance`'s "data" directory (+"/kpartplugins")

Returns: A list of QDomDocument s, containing the parsed xml documents returned by plugins.

Plugin* loadPlugin ( QObject * parent, const char* libname ) | ### loadPlugin

[protected static]

Returns: The plugin created from the library `libname`

Generated by: root@sparc.ports.openbsd.org on Wed May 2 09:43:28 2001, using kdoc 2.0a53.