# class KEditToolBarWidget

###

Table of contents
Modules
kdeui Classes
All Classes

Module | kdeui
Namespace | global
Class | KEditToolBarWidget
Inherits | QWidget, KXMLGUIClient

A widget used to customize or configure toolbars

This is the widget that does all of the work for the KEditToolBar dialog. In most cases, you will want to use the dialog instead of this widget directly.

Typically, you would use this widget only if you wanted to embed the toolbar editing directly into your existing configure or preferences dialog.

This widget only works if your application uses the XML UI framework for creating menus and toolbars. It depends on the XML files to describe the toolbar layouts and it requires the actions to determine which buttons are active.

Author Kurt Granroth <granroth@kde.org>

### methods

- KEditToolBarWidget (collection, parent)

  returns a KEditToolBarWidget object

  Argument | Type | Default
  --- | --- | ---
  collection | KActionCollection |
  parent | QWidget | None

  Constructor. This is the only entry point to this class. You must pass along your collection of actions (some of which appear in your toolbars). The other three parameters are optional.

  The second parameter, xmlfile, is the name (absolute or relative) of your application's UI resource file. If it is left blank, then the resource file: share/apps/appname/appnameui.rc is used. This is the same resource file that is used by the default createGUI function in KMainWindow so you're usually pretty safe in leaving it blank.

  The third parameter, global, controls whether or not the global resource file is used. If this is true, then you may

- KEditToolBarWidget (parent)

  returns a KEditToolBarWidget object

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | None

  Constructor for KParts based apps.

  The first parameter, factory, is a pointer to the XML GUI factory object for your application. It contains a list of all of the GUI clients (along with the action collections and xml files) and the toolbar editor uses that.

  The second parameter, parent, is the standard parent

  Use this like so:

      KEditToolBar edit(factory());
      if ( edit.exec() )
      ...

  factory - Your application's factory object

  parent - This widget's parent

- KEditToolBarWidget (a0)

  returns a KEditToolBarWidget object

  Argument | Type | Default
  --- | --- | ---
  a0 | KEditToolBarWidget |

- actionCollection ()

  returns (KActionCollection)

  Internal Reimplemented for internal purposes.

- enableOk (a0) signal

  returns nothing
  SIGNAL ("enableOk (bool)")

  Argument | Type | Default
  --- | --- | ---
  a0 | bool |

  Emitted whenever any modifications are made by the user.

- load (resourceFile, global, defaultToolBar)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  resourceFile | QString |
  global | bool | True
  defaultToolBar | QString | QString ()

  Loads the toolbar configuration into the widget. Should be called before being shown.

  See also KEditToolBar

- load (factory, defaultToolBar)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  factory | KXMLGUIFactory |
  defaultToolBar | QString | QString ()

  Loads the toolbar configuration into the widget. Should be called before being shown.

  See also KEditToolBar

- rebuildKXMLGUIClients ()

  returns nothing

  Remove and readd all KMXLGUIClients to update the GUI

- save ()

  returns (bool)

  Save any changes the user made. The file will be in the user's local directory (usually $HOME/.kde/share/apps/\<appname\>). The filename will be the one specified in the constructor.. or the made up one if the filename was 0.

  Returns The status of whether or not the save succeeded.