.TH "KParts::Plugin" 3 "28 Jan 2004" "kparts Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KParts::Plugin \- A plugin is the way to add actions to an existing KParts application, or to a \fBPart\fP.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <plugin.h>\fP
.PP
Inherits \fBQObject\fP, and \fBKXMLGUIClient\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBPlugin\fP (\fBQObject\fP *\fBparent\fP=0, const  char *\fBname\fP=0)"
.br
.RI "\fIConstruct a new KParts plugin. \fP"
.ti -1c
.RI "virtual \fB~Plugin\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "virtual \fBQString\fP \fBxmlFile\fP () const "
.br
.RI "\fIReimplemented for internal reasons. \fP"
.ti -1c
.RI "virtual \fBQString\fP \fBlocalXMLFile\fP () const "
.br
.RI "\fIReimplemented for internal reasons. \fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "void \fBloadPlugins\fP (\fBQObject\fP *\fBparent\fP, const  \fBKInstance\fP *\fBinstance\fP)"
.br
.RI "\fILoad the plugin libraries from the directories appropriate to \fCinstance\fP and make the \fBPlugin\fP objects children of \fCparent\fP. \fP"
.ti -1c
.RI "void \fBloadPlugins\fP (\fBQObject\fP *\fBparent\fP, const  \fBQValueList\fP< PluginInfo > &pluginInfos)"
.br
.RI "\fILoad the plugin libraries specified by the list \fCdocs\fP and make the \fBPlugin\fP objects children of \fCparent\fP . \fP"
.ti -1c
.RI "void \fBloadPlugins\fP (\fBQObject\fP *\fBparent\fP, const  \fBQValueList\fP< PluginInfo > &pluginInfos, const  \fBKInstance\fP *\fBinstance\fP)"
.br
.RI "\fILoad the plugin libraries specified by the list \fCpluginInfos\fP, make the \fBPlugin\fP objects children of \fCparent\fP, and use the given \fCinstance\fP. \fP"
.ti -1c
.RI "void \fBloadPlugins\fP (\fBQObject\fP *\fBparent\fP, \fBKXMLGUIClient\fP *parentGUIClient, \fBKInstance\fP *\fBinstance\fP, bool enableNewPluginsByDefault=true)"
.br
.RI "\fILoad the plugin libraries for the given \fCinstance\fP, make the \fBPlugin\fP objects children of \fCparent\fP, and insert the plugin as a child GUI client of \fCparentGUIClient\fP. \fP"
.ti -1c
.RI "\fBQPtrList\fP< \fBPlugin\fP > \fBpluginObjects\fP (\fBQObject\fP *\fBparent\fP)"
.br
.RI "\fIReturns a list of plugin objects loaded for \fCparent\fP. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBsetInstance\fP (\fBKInstance\fP *\fBinstance\fP)"
.br
.in -1c
.SS "Static Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBQValueList\fP< Plugin::PluginInfo > \fBpluginInfos\fP (const  \fBKInstance\fP *\fBinstance\fP)"
.br
.RI "\fILook for plugins in the \fCinstance's\fP 'data' directory (+'/kpartplugins'). \fP"
.ti -1c
.RI "\fBPlugin\fP * \fBloadPlugin\fP (\fBQObject\fP *\fBparent\fP, const  char *libname)"
.br
.in -1c
.SH "Detailed Description"
.PP 
A plugin is the way to add actions to an existing KParts application, or to a \fBPart\fP. 

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.
.PP
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. 
.PP
Definition at line 46 of file plugin.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KParts::Plugin::Plugin (\fBQObject\fP * parent = 0, const char * name = 0)"
.PP
Construct a new KParts plugin. 
.SS "virtual KParts::Plugin::~\fBPlugin\fP ()\fC [virtual]\fP"
.PP
Destructor. 
.SH "Member Function Documentation"
.PP 
.SS "virtual \fBQString\fP KParts::Plugin::xmlFile () const\fC [virtual]\fP"
.PP
Reimplemented for internal reasons. Reimplemented from \fBKXMLGUIClient\fP.
.SS "virtual \fBQString\fP KParts::Plugin::localXMLFile () const\fC [virtual]\fP"
.PP
Reimplemented for internal reasons. Reimplemented from \fBKXMLGUIClient\fP.
.SS "void KParts::Plugin::loadPlugins (\fBQObject\fP * parent, const \fBKInstance\fP * instance)\fC [static]\fP"
.PP
Load the plugin libraries from the directories appropriate to \fCinstance\fP and make the \fBPlugin\fP objects children of \fCparent\fP. It is recommended to use the last \fBloadPlugins\fP method instead, to support enabling and disabling of plugins. 
.SS "void KParts::Plugin::loadPlugins (\fBQObject\fP * parent, const \fBQValueList\fP< PluginInfo > & pluginInfos)\fC [static]\fP"
.PP
Load the plugin libraries specified by the list \fCdocs\fP and make the \fBPlugin\fP objects children of \fCparent\fP . It is recommended to use the last \fBloadPlugins\fP method instead, to support enabling and disabling of plugins. 
.SS "void KParts::Plugin::loadPlugins (\fBQObject\fP * parent, const \fBQValueList\fP< PluginInfo > & pluginInfos, const \fBKInstance\fP * instance)\fC [static]\fP"
.PP
Load the plugin libraries specified by the list \fCpluginInfos\fP, make the \fBPlugin\fP objects children of \fCparent\fP, and use the given \fCinstance\fP. It is recommended to use the last \fBloadPlugins\fP method instead, to support enabling and disabling of plugins. 
.SS "void KParts::Plugin::loadPlugins (\fBQObject\fP * parent, \fBKXMLGUIClient\fP * parentGUIClient, \fBKInstance\fP * instance, bool enableNewPluginsByDefault = true)\fC [static]\fP"
.PP
Load the plugin libraries for the given \fCinstance\fP, make the \fBPlugin\fP objects children of \fCparent\fP, and insert the plugin as a child GUI client of \fCparentGUIClient\fP. This method uses the \fBKConfig\fP object of the given instance, to find out which plugins are enabled and which are disabled. What happens by default (i.e. for new plugins that are not in that config file) is controlled by \fCenableNewPluginsByDefault\fP.
.PP
If a disabled plugin is already loaded it will be removed from the GUI factory and deleted.
.PP
This method is automatically called by KParts::Plugin and by \fBKParts::MainWindow\fP. 
.SS "\fBQPtrList\fP<\fBPlugin\fP> KParts::Plugin::pluginObjects (\fBQObject\fP * parent)\fC [static]\fP"
.PP
Returns a list of plugin objects loaded for \fCparent\fP. This functions basically calls the \fBqueryList\fP method of \fBQObject\fP to retrieve the list of child objects inheriting KParts::Plugin . 
.SS "\fBQValueList\fP<Plugin::PluginInfo> KParts::Plugin::pluginInfos (const \fBKInstance\fP * instance)\fC [static, protected]\fP"
.PP
Look for plugins in the \fCinstance's\fP 'data' directory (+'/kpartplugins'). \fBReturns:\fP
.RS 4
A list of \fBQDomDocument\fP s, containing the parsed xml documents returned by plugins. 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for kparts Library from the source code.
