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 |
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.
void qmdiHost::updateGUI | ( | QMainWindow * | window = NULL |
) |
update the toolbars and menus
window | the window to update |
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.
void qmdiHost::mergeClient | ( | qmdiClient * | client | ) |
merge the toolbars and menus of another MDI client
client | the client to be merged |
After a call to this function, you should manually call updateGUI
void qmdiHost::unmergeClient | ( | qmdiClient * | client | ) |
merge the toolbars and menus of another MDI client
client | the client to be merged |
After a call to this function, you should manually call updateGUI
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.
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.
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.