qmdiActionGroupList Class Reference

abstraction layer for QMenuBar and a list of toolbars More...

List of all members.

Public Member Functions

 qmdiActionGroupList ()
qmdiActionGroupoperator[] (const QString name)
 overloaded operator for getting the instance of a action group
qmdiActionGroupgetActionGroup (const QString name)
 get the instance of a action group
void mergeGroupList (qmdiActionGroupList *group)
 merge another action group list
void unmergeGroupList (qmdiActionGroupList *group)
 un-merge an action group list
QMenuBar * updateMenu (QMenuBar *menubar)
 update a QMenuBar from the definitions on this action group list
QList< QToolBar * > * updateToolBar (QList< QToolBar * > *toolbars, QMainWindow *window)
 update a list of QToolBars from the definitions on this action group list


Detailed Description

abstraction layer for QMenuBar and a list of toolbars

This class defines a QMenuBar and the list of toolbars available on a typical application. Each sub-menu or toolbar is defined by one qmdiActionGroup.

This class has also the ability to merge other qmdiActionGroupList (this enables widgets to add their partial menus to the menus supplied by the main application).


Constructor & Destructor Documentation

qmdiActionGroupList::qmdiActionGroupList (  ) 

Build an empty action group list. If you generate a menubar from this empty class, you will get a NIL menu. Generating a toolbar set from this empty class will generate no toolbars.


Member Function Documentation

qmdiActionGroup * qmdiActionGroupList::operator[] ( const QString  name  ) 

overloaded operator for getting the instance of a action group

Parameters:
name the action group name you want to get
Returns:
an instance of an action group
This is just an overloaded function which calls getActionGroup().

See also:
getActionGroup()

qmdiActionGroup * qmdiActionGroupList::getActionGroup ( const QString  name  ) 

get the instance of a action group

Parameters:
name the action group name you want to get
Returns:
an instance of an action group
This function returns an instance of a action group. Action groups are abstractions of QMenu and QToolBar.

If the action group requested is not available, a new instance will be created.

See also:
updateMenu()

updateToolBar()

void qmdiActionGroupList::mergeGroupList ( qmdiActionGroupList group  ) 

merge another action group list

Parameters:
group the new group to merge into this one
This function merges an action group list definition into this action group list:

Note that just merging is not enough, and you might need also to update the real widget which this action group list represents.

See also:
unmergeGroupList

updateMenu

updateToolBar

void qmdiActionGroupList::unmergeGroupList ( qmdiActionGroupList group  ) 

un-merge an action group list

Parameters:
group the old group to remove from this action group list
This function removes external definitions from this action group list. If at the end of the un-merge some action groups are empty, they will not be removed from this class. Since the generation of menus (using updateMenu() ) does not include empty menus, this is totally acceptable

Note that just un-merging an action group list will not totally reflect the GUI, and you might also need to update the real widget which this action group list represents.

See also:
mergeGroupList

updateMenu

updateToolBar

QMenuBar * qmdiActionGroupList::updateMenu ( QMenuBar *  menubar  ) 

update a QMenuBar from the definitions on this action group list

Parameters:
menubar a QMenuBar to be updated
Returns:
the updated menubar (same instance which was passed)
This function generates from the definitions on this class a valid QMenuBar which will be showed on a QMainWindow.

If menubar is NULL, a new QMenuBar will be allocated for you, and will be returned.

You cannot generate items into a QMenuBar "by hand" and then "add" the definitions on this class.

QList< QToolBar * > * qmdiActionGroupList::updateToolBar ( QList< QToolBar * > *  toolbars,
QMainWindow *  window 
)

update a list of QToolBars from the definitions on this action group list

Parameters:
window the window in which the toolbars should be place
toolbars a list o toolbars available on the main window
Returns:
a list of toolbars which has been created from this action group list
This function generates from the definitions on this class a valid list of QToolBar which will be showed on the window .

If the toolbars array will be NULL, a new one will be allocated for you.

While you can add toolbars "manually" to your main window, it's not recommended because new actions will not get merged into your toolbar. Instead you might get 2 toolbars with a similar name.


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