|  | Home

# QtToolBarDialog Class Reference

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

     #include <QtToolBarDialog>

Inherits QDialog.

- List of all members, including inherited members

### Public Functions

- QtToolBarDialog ( QWidget * parent = 0, Qt::WFlags flags = 0 )
- ~QtToolBarDialog ()
- void setToolBarManager ( QtToolBarManager * toolBarManager )

- 5 public functions inherited from QDialog
- 207 public functions inherited from QWidget
- 12 public functions inherited from QPaintDevice
- 29 public functions inherited from QObject

### Additional Inherited Members

- 2 properties inherited from QDialog
- 57 properties inherited from QWidget
- 1 property inherited from QObject
- 5 public slots inherited from QDialog
- 19 public slots inherited from QWidget
- 1 public slot inherited from QObject
- 3 signals inherited from QDialog
- 1 signal inherited from QWidget
- 1 signal inherited from QObject
- 1 public type inherited from QObject
- 4 static public members inherited from QWidget
- 4 static public members inherited from QObject
- 37 protected functions inherited from QWidget
- 1 protected function inherited from QPaintDevice
- 7 protected functions inherited from QObject
- 1 protected slot inherited from QWidget
- 1 protected type inherited from QPaintDevice
- 2 protected variables inherited from QObject

## 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.