class KXMLGUIClient


Definition#include <kxmlguiclient.h>
Inherited byKDockMainWindow, KEditToolbarWidget, KTMainWindow
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

 KXMLGUIClient ()

Constructs a KXMLGUIClient which can be used with a KXMLGUIFactory to create a GUI from actions and an XML document, and which can be dynamically merged with other KXMLGUIClients.

 KXMLGUIClient ( KXMLGUIClient *parent )

Constructs a KXMLGUIClient which can be used with a KXMLGUIFactory to create a GUI from actions and an XML document, and which can be dynamically merged with other KXMLGUIClients.

This constructor takes an additional parent argument, which makes the client a child client of the parent.

Child clients are automatically added to the GUI if the parent is added.

KXMLGUIClient ()

[virtual]

Destructor

KAction*  action ( const char* name )

[const]

Retrieve an action of the client by name. This method is provided for convenience, as it uses actionCollection to get the action object.

KActionaction ( const QDomElement &element )

[const virtual]

Retrieve an action for a given QDomElement. The default implementation uses the "name" attribute to query the action object via the other action method.

KActionCollection*  actionCollection ()

[const virtual]

Retrieve the entire action collection for the GUI client

KInstanceinstance ()

[const virtual]

Returns: The instance (KInstance) for this part.

QDomDocument  document ()

[const virtual]

Returns: The parsed XML in a QDomDocument, set by setXMLFile() or setXML(). This document describes the layout of the GUI.

QString  xmlFile ()

[const virtual]

This will return the XML file as set by setXMLFile. If setXML is used directly, then this will return NULL.

The filename that this returns is obvious for components as each component has exactly one XML file. In non-components, however, there are usually two: the global file and the local file. This function doesn't really care about that, though. It will always return the last XML file set. This, in almost all cases, will be the local XML file.

Returns: The name of the XML file or QString::null

void  storeContainerStateBuffer ( const QString &key, const QByteArray &data )

[virtual]

default implementation, storing the given data in an internal map. Called from KXMLGUIFactory when removing containers which were owned by the servant.

QByteArray  takeContainerStateBuffer ( const QString &key )

[virtual]

default implementation, returning a previously via storeContainerStateBuffer saved data. Called from KXMLGUIFactory when creating a new container.

void  setContainerStates ( const QMap<QString,QByteArray> &states )

QMap<QString,QByteArray>  containerStates ()

[const]

void  setFactory ( KXMLGUIFactory *factory )

This method is called by the KXMLGUIFactory as soon as the client is added to the KXMLGUIFactory's GUI.

KXMLGUIFactoryfactory ()

[const]

Retrieve 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.

KXMLGUIClientparentClient ()

[const]

KXMLGUIClients can form a simple child/parent object tree. This method returns a pointer to the parent client or 0L if it has no parent client assigned.

void  insertChildClient ( KXMLGUIClient *child )

Use this method to make a client a child client of another client. Usually you don't need to call this method, as it is called automatically when using the second constructor, which takes a arent argument.

void  removeChildClient ( KXMLGUIClient *child )

Remove the given child from the client's children list.

const QList<KXMLGUIClient> * childClients ()

Retrieve a list of all child clients.

void  setClientBuilder ( KXMLGUIBuilder *builder )

A client can have an own KXMLGUIBuilder. Use this method to assign your builder instance to the client (so that the KXMLGUIFactory can use it when building the client's GUI)

Client specific guibuilders are useful if you want to create custom container widgets for your GUI.

KXMLGUIBuilderclientBuilder ()

[const]

Retrieve the client's GUI builder or 0L if no client specific uilder has been assigned via setClientBuilder

void  reloadXML ()

Force this client to re-read its XML resource file. This is intended to be used when you know that the resource file has changed and you will soon be rebuilding the GUI. It has no useful effect with non-KParts GUIs, so don't bother using it unless your app is component based.

void  setInstance ( KInstance *instance )

[protected virtual]

Set the instance (KInstance) for this part.

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

void  setXMLFile ( const QString& file, bool merge = false )

[protected virtual]

Set the name of the rc file containing the XML for the part.

Call this in the Part-inherited class constructor.

Parameters:
fileEither 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.

void  setXML ( const QString &document, bool merge = false )

[protected virtual]

Set the XML for the part.

Call this in the Part-inherited class constructor if you don't call setXMLFile().

void  setDocument ( const QDomDocument &document, bool merge = false )

[protected virtual]

Set the Document for the part, describing the layout of the GUI.

Call this in the Part-inherited class constructor if you don't call setXMLFile or setXML .

void  conserveMemory ()

[protected virtual]

This function will attempt to give up some memory after the GUI is built. It should never be used in apps where the GUI may be rebuilt at some later time (components, for instance).


Generated by: root@porky.devel.redhat.com on Wed May 10 08:56:43 2000, using kdoc 2.0a35.