Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KParts::Plugin Class Reference

#include <plugin.h>

Inheritance diagram for KParts::Plugin:

KXMLGUIClient List of all members.

Public Methods

 Plugin (QObject *parent=0, const char *name=0)
virtual ~Plugin ()
virtual QString xmlFile () const
virtual QString localXMLFile () const

Static Public Methods

void loadPlugins (QObject *parent, const KInstance *instance)
void loadPlugins (QObject *parent, const QValueList< PluginInfo > &pluginInfos)
void loadPlugins (QObject *parent, const QValueList< PluginInfo > &pluginInfos, const KInstance *instance)
void loadPlugins (QObject *parent, KXMLGUIClient *parentGUIClient, KInstance *instance, bool enableNewPluginsByDefault=true)
QPtrList< Plugin > pluginObjects (QObject *parent)

Protected Methods

virtual void setInstance (KInstance *instance)

Static Protected Methods

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

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.

Definition at line 46 of file kparts/plugin.h.


Constructor & Destructor Documentation

KParts::Plugin::Plugin QObject *    parent = 0,
const char *    name = 0
 

Construct a new KParts plugin.

virtual KParts::Plugin::~Plugin   [virtual]
 

Destructor.


Member Function Documentation

void KParts::Plugin::loadPlugins QObject *    parent,
KXMLGUIClient   parentGUIClient,
KInstance   instance,
bool    enableNewPluginsByDefault = true
[static]
 

Load the plugin libraries for the given instance, make the Plugin objects children of parent, and insert the plugin as a child GUI client of parentGUIClient.

This method uses the KConfig 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 enableNewPluginsByDefault.

If a disabled plugin is already loaded it will be removed from the GUI factory and deleted.

This method is automatically called by KParts::Plugin and by KParts::MainWindow.

void KParts::Plugin::loadPlugins QObject *    parent,
const QValueList< PluginInfo > &    pluginInfos,
const KInstance   instance
[static]
 

Load the plugin libraries specified by the list pluginInfos, make the Plugin objects children of parent, and use the given instance.

It is recommended to use the last loadPlugins method instead, to support enabling and disabling of plugins.

void KParts::Plugin::loadPlugins QObject *    parent,
const QValueList< PluginInfo > &    pluginInfos
[static]
 

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

It is recommended to use the last loadPlugins method instead, to support enabling and disabling of plugins.

void KParts::Plugin::loadPlugins QObject *    parent,
const KInstance   instance
[static]
 

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

It is recommended to use the last loadPlugins method instead, to support enabling and disabling of plugins.

virtual QString KParts::Plugin::localXMLFile   [virtual]
 

Reimplemented for internal reasons

Reimplemented from KXMLGUIClient.

QValueList<Plugin::PluginInfo> KParts::Plugin::pluginInfos const KInstance   instance [static, protected]
 

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

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

QPtrList<Plugin> KParts::Plugin::pluginObjects QObject *    parent [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 inheriting KParts::Plugin .

virtual void KParts::Plugin::setInstance KInstance   instance [protected, virtual]
 

Sets the instance (KInstance) for this part.

Call this first in the inherited class constructor. (At least before setXMLFile().)

Reimplemented from KXMLGUIClient.

virtual QString KParts::Plugin::xmlFile   [virtual]
 

Reimplemented for internal reasons

Reimplemented from KXMLGUIClient.


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:37 2003 for kdelibs by doxygen1.2.18