KParts::Plugin Class Reference
A plugin is the way to add actions to an existing KParts application, or to a Part. More...
#include <plugin.h>
Inheritance diagram for KParts::Plugin:

Public Member Functions | |
Plugin (QObject *parent=0, const char *name=0) | |
virtual | ~Plugin () |
virtual QString | xmlFile () const |
virtual QString | localXMLFile () const |
Static Public Member Functions | |
static void | loadPlugins (QObject *parent, const KInstance *instance) |
static void | loadPlugins (QObject *parent, const QValueList< PluginInfo > &pluginInfos) |
static void | loadPlugins (QObject *parent, const QValueList< PluginInfo > &pluginInfos, const KInstance *instance) |
static void | loadPlugins (QObject *parent, KXMLGUIClient *parentGUIClient, KInstance *instance, bool enableNewPluginsByDefault=true) |
static QPtrList< Plugin > | pluginObjects (QObject *parent) |
Protected Member Functions | |
virtual void | setInstance (KInstance *instance) |
Static Protected Member Functions | |
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.
Definition at line 46 of file plugin.h.
Constructor & Destructor Documentation
|
Construct a new KParts plugin.
|
|
Destructor.
|
Member Function Documentation
|
Reimplemented for internal reasons.
Reimplemented from KXMLGUIClient. |
|
Reimplemented for internal reasons.
Reimplemented from KXMLGUIClient. |
|
Load the plugin libraries from the directories appropriate to It is recommended to use the last loadPlugins method instead, to support enabling and disabling of plugins. Referenced by KParts::PartBase::loadPlugins(). |
|
Load the plugin libraries specified by the list It is recommended to use the last loadPlugins method instead, to support enabling and disabling of plugins. |
|
Load the plugin libraries specified by the list It is recommended to use the last loadPlugins method instead, to support enabling and disabling of plugins. |
|
Load the plugin libraries for the given
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 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. If you call this method in an already constructed GUI (like when the user has changed which plugins are enabled) you need to add the new plugins to the KXMLGUIFactory: if( factory() ) { QPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this ); QPtrListIterator<KParts::Plugin> it( plugins ); KParts::Plugin * plugin; while( ( plugin = it.current() ) != 0 ) { ++it; factory()->addClient( plugin ); } } |
|
Returns a list of plugin objects loaded for This functions basically calls the queryList method of QObject to retrieve the list of child objects inheriting KParts::Plugin . |
|
Look for plugins in the
|
The documentation for this class was generated from the following file: