Public Member Functions | |
qmdiActionGroupList () | |
qmdiActionGroup * | operator[] (const QString name) |
overloaded operator for getting the instance of a action group | |
qmdiActionGroup * | getActionGroup (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 |
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).
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.
qmdiActionGroup * qmdiActionGroupList::operator[] | ( | const QString | name | ) |
overloaded operator for getting the instance of a action group
name | the action group name you want to get |
qmdiActionGroup * qmdiActionGroupList::getActionGroup | ( | const QString | name | ) |
get the instance of a action group
name | the action group name you want to get |
If the action group requested is not available, a new instance will be created.
void qmdiActionGroupList::mergeGroupList | ( | qmdiActionGroupList * | group | ) |
merge another action group list
group | the new group to merge into this one |
Note that just merging is not enough, and you might need also to update the real widget which this action group list represents.
void qmdiActionGroupList::unmergeGroupList | ( | qmdiActionGroupList * | group | ) |
un-merge an action group list
group | the old group to remove from this action group list |
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.
QMenuBar * qmdiActionGroupList::updateMenu | ( | QMenuBar * | menubar | ) |
update a QMenuBar from the definitions on this action group list
menubar | a QMenuBar to be updated |
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
window | the window in which the toolbars should be place | |
toolbars | a list o toolbars available on the main window |
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.