kdeui Library API Documentation

KXMLGUIBuilder Class Reference

Abstract interface for a "GUI builder", used by the GUIFactory This interface is implemented by KMainWindow for the case where the toplevel widget is a KMainWindow. More...

#include <kxmlguibuilder.h>

Inheritance diagram for KXMLGUIBuilder:

KMainWindow KDockMainWindow List of all members.

Public Methods

virtual QWidgetcreateContainer (QWidget *parent, int index, const QDomElement &element, int &id)
 Creates a container (menubar/menu/toolbar/statusbar/separator/...) from an element in the XML file.

virtual void removeContainer (QWidget *container, QWidget *parent, QDomElement &element, int id)
 Removes the given (and previously via createContainer ) created container.


Detailed Description

Abstract interface for a "GUI builder", used by the GUIFactory This interface is implemented by KMainWindow for the case where the toplevel widget is a KMainWindow.

Other implementations may appear in the future (dialogs for instance)

Definition at line 37 of file kxmlguibuilder.h.


Member Function Documentation

QWidget * KXMLGUIBuilder::createContainer QWidget   parent,
int    index,
const QDomElement   element,
int &    id
[virtual]
 

Creates a container (menubar/menu/toolbar/statusbar/separator/...) from an element in the XML file.

Parameters:
parent  The parent for the container
index  The index where the container should be inserted into the parent container/widget
element  The element from the DOM tree describing the container (use it to access container specified attributes or child elements)
containerStateBuffer  A buffer which possibibly contains previously saved container state information, return via removeContainer .

Definition at line 126 of file kxmlguibuilder.cpp.

References QDomElement::attribute(), KGlobal::instance(), KNotifyClient::instance(), QString::isEmpty(), QCString::isEmpty(), KToolBar::loadState(), QWidget::parentWidget(), KToolBar::setXMLGUIClient(), KMenuBar::show(), KMainWindow::statusBar(), QDomElement::tagName(), and QDomElement::text().

void KXMLGUIBuilder::removeContainer QWidget   container,
QWidget   parent,
QDomElement   element,
int    id
[virtual]
 

Removes the given (and previously via createContainer ) created container.

Returns:
A buffer containing state information about the deleted container (like the last position of a toolbar container for example). The buffer is passed again to createContainer when the same container is about to be created again later.

Definition at line 243 of file kxmlguibuilder.cpp.

References QWidget::hide(), QMenuBar::hide(), and KToolBar::saveState().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:21:08 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001