Home

QtToolBarDialog Class Reference

The QtToolBarDialog class provides a dialog for customizing toolbars. More...

 #include <QtToolBarDialog>

Inherits QDialog.

Public Functions

Additional Inherited Members


Detailed Description

The QtToolBarDialog class provides a dialog for customizing toolbars.

QtToolBarDialog allows the user to customize the toolbars for a given main window.

The dialog lets the users add, rename and remove custom toolbars. Note that built-in toolbars are marked with a green color, and cannot be removed or renamed.

The users can also add and remove actions from the toolbars. An action can be added to many toolbars, but a toolbar can only contain one instance of each action. Actions that contains a widget are marked with a blue color in the list of actions, and can only be added to one single toolbar.

Finally, the users can add separators to the toolbars.

The original toolbars can be restored by clicking the Restore all button. All custom toolbars will then be removed, and all built-in toolbars will be restored to their original state.

The QtToolBarDialog class's functionality is controlled by an instance of the QtToolBarManager class, and the main window is specified using the QtToolBarManager::setMainWindow() function.

All you need to do to use QtToolBarDialog is to specify an QtToolBarManager instance and call the QDialog::exec() slot:

 QtToolBarManager *toolBarManager;

 void MyMainWindow::customize()
     {
         QtToolBarDialog dialog(this);
         dialog.setToolBarManager(toolBarManager);
         dialog.exec();
     }

See also QtToolBarManager.


Member Function Documentation

QtToolBarDialog::QtToolBarDialog ( QWidget * parent = 0, Qt::WFlags flags = 0 )

Creates a toolbar dialog with the given parent and the specifed window flags.

QtToolBarDialog::~QtToolBarDialog ()

Destroys the toolbar dialog.

void QtToolBarDialog::setToolBarManager ( QtToolBarManager * toolBarManager )

Connects the toolbar dialog to the given toolBarManager. Then, when exec() is called, the toolbar dialog will operate using the given toolBarManager.


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions