org.kde.koala
public class KXMLGUIFactory extends QObject
UNKNOWN: KXMLGUIFactory, together with KXMLGUIClient objects, can be used to create a GUI of container widgets (like menus, toolbars, etc.
Constructor Summary | |
---|---|
protected | KXMLGUIFactory(Class dummy) |
KXMLGUIFactory(KXMLGUIBuilderInterface builder, QObject parent, String name)
Constructs a KXMLGUIFactory. | |
KXMLGUIFactory(KXMLGUIBuilderInterface builder, QObject parent) | |
KXMLGUIFactory(KXMLGUIBuilderInterface builder) |
Method Summary | |
---|---|
static QDomElement | actionPropertiesElement(QDomDocument doc)
Find or create the ActionProperties element, used when saving custom action properties |
void | addClient(KXMLGUIClientInterface client)
Creates the GUI described by the QDomDocument of the client,
using the client's actions, and merges it with the previously
created GUI.
|
String | className() |
int | configureShortcuts(boolean bAllowLetterShortcuts, boolean bSaveSettings)
Show a standard configure shortcut for every action in this factory.
|
int | configureShortcuts(boolean bAllowLetterShortcuts) |
int | configureShortcuts() |
QWidget | container(String containerName, KXMLGUIClientInterface client, boolean useTagName)
Use this method to get access to a container widget with the name specified with containerName
and which is owned by the client. The container name is specified with a "name" attribute in the
XML document.
|
QWidget | container(String containerName, KXMLGUIClientInterface client) |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
static String | documentToXML(QDomDocument doc) |
static String | elementToXML(QDomElement elem) |
protected void | finalize() Deletes the wrapped C++ instance |
static QDomElement | findActionByName(QDomElement elem, String sName, boolean create)
Find or create the element for a given action, by name.
|
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
QMetaObject | metaObject() |
static String | readConfigFile(String filename, boolean never_null, KInstanceInterface instance) |
static String | readConfigFile(String filename, boolean never_null) |
static String | readConfigFile(String filename, KInstanceInterface instance) |
static String | readConfigFile(String filename) |
void | removeClient(KXMLGUIClientInterface client)
Removes the GUI described by the client, by unplugging all
provided actions and removing all owned containers (and storing
container state information in the given client) |
static void | removeDOMComments(QDomNode node)
Removes all QDomComment objects from the specified node and all its children. |
void | reset()
Use this method to free all memory allocated by the KXMLGUIFactory. |
void | resetContainer(String containerName, boolean useTagName)
Use this method to free all memory allocated by the KXMLGUIFactory for a specific container,
including all child containers and actions. |
void | resetContainer(String containerName) |
static boolean | saveConfigFile(QDomDocument doc, String filename, KInstanceInterface instance) |
static boolean | saveConfigFile(QDomDocument doc, String filename) |
void | unplugActionList(KXMLGUIClientInterface client, String name) |
builder
KXMLGUIBuilder will be called
for creating and removing container widgets, when clients are added/removed from the GUI.
Note that the ownership of the given KXMLGUIBuilder object won't be transferred to this
KXMLGUIFactory, so you have to take care of deleting it properly.UNKNOWN: Constructs a KXMLGUIFactory.
UNKNOWN:
UNKNOWN: Creates the GUI described by the QDomDocument of the client, using the client's actions, and merges it with the previously created GUI.
KStdAction.keyBindings( guiFactory(), SLOT("configureShortcuts()"), actionCollection() );
Parameters: bAllowLetterShortcuts Set to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts. bSaveSettings if true, the settings will also be saved back to the uirc file which they were intially read from.
UNKNOWN: Show a standard configure shortcut for every action in this factory.
containerName
and which is owned by the client.
The container name is specified with a "name" attribute in the
XML document.
This function is particularly useful for getting hold of a popupmenu defined in an XMLUI file.
For instance:
QPopupMenu popup = (QPopupMenu)(factory().container("my_popup",this));where
"my_popup" is the name of the menu in the XMLUI file, and
"this" is XMLGUIClient which owns the popupmenu (e.g. the mainwindow, or the part, or the plugin...)Parameters: containerName Name of the container widget client Owner of the container widget useTagName Specifies whether to compare the specified name with the name attribute or the tag name. This method may return null if no container with the given name exists or is not owned by the client.
UNKNOWN: Use this method to get access to a container widget with the name specified with containerName
and which is owned by the client.
UNKNOWN:
UNKNOWN: Removes the GUI described by the client, by unplugging all provided actions and removing all owned containers (and storing container state information in the given client)
UNKNOWN: Removes all QDomComment objects from the specified node and all its children.
UNKNOWN: Use this method to free all memory allocated by the KXMLGUIFactory.
UNKNOWN: Use this method to free all memory allocated by the KXMLGUIFactory for a specific container, including all child containers and actions.