qmdiHost Class Reference

The class which contain the menus and toolbars defined by qmdiClient. More...

List of all members.

Public Member Functions

void updateGUI (QMainWindow *window=NULL)
 update the toolbars and menus
void mergeClient (qmdiClient *client)
 merge the toolbars and menus of another MDI client
void unmergeClient (qmdiClient *client)
 merge the toolbars and menus of another MDI client

Public Attributes

qmdiActionGroupList menus
 the default menus defined in this MDI host
qmdiActionGroupList toolbars
 the default toolbars defined in this MDI host
QList< QToolBar * > * toolBarList
 internal list of available toolbars


Detailed Description

The class which contain the menus and toolbars defined by qmdiClient.

Every time a user selects a new widget in the MDI server (for example qmdiTabWidget), the server will try and ask the host to modify the menus. The interface in which the QTabWidget and QMainWindow talk is this class.

Generally speaking, you don't have to know much of this class, only inherit it in your main windows.


Member Function Documentation

void qmdiHost::updateGUI ( QMainWindow *  window = NULL  ) 

update the toolbars and menus

Parameters:
window the window to update
This function generates the menubar and toolbars from the toolbar and menus definitions.

You should call this method after every time you modify the menus or structures.

The parameter window should be generally this , it's passed on as a parameter, since qmdiHost cannot dynamic_cast it self to an QObject (this just does not work). On the other hand, this can give you more freedom, as you do not have to derive the main window also from qmdiHost, and the host can be a separate object.

Since version 0.0.4, the window parameter is optional. This method will try and see it this is a QMainWindow, and then update itself.

See also:
qmdiActionGroupList

void qmdiHost::mergeClient ( qmdiClient client  ) 

merge the toolbars and menus of another MDI client

Parameters:
client the client to be merged
This function is used to merge the toolbars and contents of the MDI client to be merged into this client. The menus and toolbars of the host will be appended to the end of the menus and toolbars of this MDI host.

After a call to this function, you should manually call updateGUI

See also:
updateGUI

unmergeClient

void qmdiHost::unmergeClient ( qmdiClient client  ) 

merge the toolbars and menus of another MDI client

Parameters:
client the client to be merged
This function is used to un-merge the toolbars and contents of the MDI client to be un-merged into this client. The menus and toolbars of host will be updated, and all the entries defined in the client will be removed.

After a call to this function, you should manually call updateGUI

See also:
updateGUI

mergeClient


Member Data Documentation

qmdiHost::menus

the default menus defined in this MDI host

When you construct a window which derives this class, you cannot define the menus the way which is dictated by Qt. Instead you must follow the code guidelines provided by this library.

The menus defined in this class, will be displayed by default on the MDI host. It is a wise idea to define the order of the menus on your application on the initialization of the application, since there is no way of changing the order of the menus later on.

 menus["&File"];
 menus["&Edit"];
 menus["&Help"];

See also:
Small tutorial and introduction

qmdiServer

qmdiActionGroupList

qmdiHost::toolbars

the default toolbars defined in this MDI host

When you construct a window which derives this class, you cannot define the toolbars the way which is dictated by Qt. Instead you must follow the code guidelines provided by this library.

The toolbars defined in this class, will be displayed by default on the MDI host.

See also:
Small tutorial and introduction

qmdiServer

qmdiActionGroupList

qmdiHost::toolBarList

internal list of available toolbars

As Qt4 does not provide an interface for listing the available toolbars, the list is maintained as a separate list.

You should usually not use this list directly.


The documentation for this class was generated from the following files:
Generated on Fri Jun 29 21:56:34 2007 for qmdilib by  doxygen 1.5.1