org.kde.koala
public class Plugin extends QObject implements KXMLGUIClientInterface
UNKNOWN: A plugin is the way to add actions to an existing KParts application, or to a Part.
Constructor Summary | |
---|---|
protected | Plugin(Class dummy) |
Plugin(QObject parent, String name)
Construct a new KParts plugin. | |
Plugin(QObject parent) | |
Plugin() |
Method Summary | |
---|---|
KAction | action(String name)
Retrieves an action of the client by name. |
KAction | action(QDomElement element)
Retrieves an action for a given QDomElement. |
KActionCollection | actionCollection()
Retrieves the entire action collection for the GUI client. |
void | addStateActionDisabled(String state, String action) |
void | addStateActionEnabled(String state, String action) |
void | beginXMLPlug(QWidget arg1) |
String | className() |
KXMLGUIBuilderInterface | clientBuilder()
Retrieves the client's GUI builder or null if no client specific
builder has been assigned via setClientBuilder() |
protected void | conserveMemory()
This function will attempt to give up some memory after the GUI
is built. |
QDomDocument | domDocument() |
void | endXMLPlug() |
KXMLGUIFactory | factory()
Retrieves a pointer to the KXMLGUIFactory this client is
associated with (will return null if the client's GUI has not been built
by a KXMLGUIFactory. |
static String | findMostRecentXMLFile(String[] files, StringBuffer doc) |
void | insertChildClient(KXMLGUIClientInterface child)
Use this method to make a client a child client of another client.
|
KInstanceInterface | instance() |
protected static Plugin | loadPlugin(QObject parent, String libname) |
static void | loadPlugins(QObject parent, KInstanceInterface instance)
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. |
static void | loadPlugins(QObject parent, KXMLGUIClientInterface parentGUIClient, KInstanceInterface instance, boolean enableNewPluginsByDefault)
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. |
static void | loadPlugins(QObject parent, KXMLGUIClientInterface parentGUIClient, KInstanceInterface instance) |
String | localXMLFile()
Reimplemented for internal reasons |
QMetaObject | metaObject() |
KXMLGUIClientInterface | parentClient()
KXMLGUIClients can form a simple child/parent object tree. |
void | prepareXMLUnplug(QWidget arg1) |
void | reloadXML()
Forces this client to re-read its XML resource file. |
void | removeChildClient(KXMLGUIClientInterface child)
Removes the given child from the client's children list. |
void | setClientBuilder(KXMLGUIBuilderInterface builder)
A client can have an own KXMLGUIBuilder.
|
protected void | setDOMDocument(QDomDocument document, boolean merge)
Sets the Document for the part, describing the layout of the GUI.
|
protected void | setDOMDocument(QDomDocument document) |
void | setFactory(KXMLGUIFactory factory)
This method is called by the KXMLGUIFactory as soon as the client
is added to the KXMLGUIFactory's GUI. |
protected void | setInstance(KInstanceInterface instance)
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 . |
protected void | setLocalXMLFile(String file) |
protected void | setXML(String document, boolean merge)
Sets the XML for the part.
|
protected void | setXML(String document) |
protected void | setXMLFile(String file, boolean merge, boolean setXMLDoc)
Sets the name of the rc file containing the XML for the part.
|
protected void | setXMLFile(String file, boolean merge) |
protected void | setXMLFile(String file) |
void | setXMLGUIBuildDocument(QDomDocument doc) |
protected void | stateChanged(String newstate, int reverse)
Actions can collectively be assigned a "State". |
protected void | stateChanged(String newstate) |
void | unplugActionList(String name)
The complement of plugActionList() ... |
String | xmlFile()
Reimplemented for internal reasons |
QDomDocument | xmlguiBuildDocument() |
UNKNOWN: Construct a new KParts plugin.
UNKNOWN: Retrieves an action of the client by name.
UNKNOWN: Retrieves an action for a given QDomElement.
See Also: (
#kde#qt#QWidget*
UNKNOWN: Retrieves the entire action collection for the GUI client.
UNKNOWN: Retrieves the client's GUI builder or 0L if no client specific builder has been assigned via setClientBuilder()
UNKNOWN: This function will attempt to give up some memory after the GUI is built.
Returns: The parsed XML in a QDomDocument, set by setXMLFile() or setXML(). This document describes the layout of the GUI.
UNKNOWN:
UNKNOWN: Retrieves a pointer to the KXMLGUIFactory this client is associated with (will return 0L if the client's GUI has not been built by a KXMLGUIFactory.
UNKNOWN: Use this method to make a client a child client of another client.
Returns: The instance ( KInstance ) for this GUI client.
UNKNOWN:
Returns: The plugin created from the library libname
UNKNOWN:
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.UNKNOWN: Load the plugin libraries from the directories appropriate to instance
and make the Plugin objects children of parent.
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.
It can be overridden by the plugin if it
sets the X-KDE-PluginInfo-EnabledByDefault key in the .desktop file
(with the same name as the .rc file)
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() ) { QPtrListplugins = KParts.Plugin.pluginObjects( this ); QPtrListIterator it( plugins ); KParts.Plugin plugin; while( ( plugin = it.current() ) != 0 ) { ++it; factory().addClient( plugin ); } }
UNKNOWN: 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.
UNKNOWN: Reimplemented for internal reasons
UNKNOWN: KXMLGUIClients can form a simple child/parent object tree.
UNKNOWN: Forces this client to re-read its XML resource file.
child
from the client's children list.UNKNOWN: Removes the given child
from the client's children list.
UNKNOWN: A client can have an own KXMLGUIBuilder.
UNKNOWN: Sets the Document for the part, describing the layout of the GUI.
UNKNOWN: This method is called by the KXMLGUIFactory as soon as the client is added to the KXMLGUIFactory's GUI.
parent.
This
functions basically calls the queryList method of
QObject to retrieve the list of child objects inheriting
KParts.Plugin .UNKNOWN: Returns a list of plugin objects loaded for parent.
UNKNOWN: Sets the XML for the part.
Parameters: file Either an absolute path for the file, or simply the filename, which will then be assumed to be installed in the "data" resource, under a directory named like the instance. merge Whether to merge with the global document. setXMLDoc Specify whether to call setXML. Default is true. and the DOM document at once.
UNKNOWN: Sets the name of the rc file containing the XML for the part.
UNKNOWN:
Parameters: newstate Name of a State in the XMLfile. reverse If the flag reverse is set to StateReverse, the State is reversed. (actions to be enabled will be disabled and action to be disabled will be enabled) Default is reverse=false.
UNKNOWN: Actions can collectively be assigned a "State".
UNKNOWN: The complement of plugActionList() .
UNKNOWN: Reimplemented for internal reasons
UNKNOWN: