# class KShortcutsDialog

###

Module | kdeui
Namespace |
Class | KShortcutsDialog
Inherits | KDialog

Dialog for configuration of KActionCollection and KGlobalAccel.

The KShortcutsDialog class is used for configuring dictionaries of key/action associations for KActionCollection and KGlobalAccel. It uses the KShortcutsEditor widget and offers buttons to set all keys to defaults and invoke on-line help.

Several static methods are supplied which provide the most convenient interface to the dialog. The most common and most encouraged use is with KActionCollection.

    KShortcutsDialog.configure( actionCollection() );

Author Nicolas Hadacek <hadacek@via.ecp.fr> Author Hamish Rodda <rodda@kde.org> (KDE 4 porting) Author Michael Jansen <kde@michael-jansen.biz>

### methods

- KShortcutsDialog (types, allowLetterShortcuts, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  types | KShortcutsEditor.ActionTypes | KShortcutsEditor.AllActions
  allowLetterShortcuts | KShortcutsEditor.LetterShortcuts | KShortcutsEditor.LetterShortcutsAllowed
  parent | QWidget | 0

  Constructs a KShortcutsDialog as a child of parent. Set allowLetterShortcuts to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts.

- KShortcutsDialog (a0)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | KShortcutsDialog |

- KShortcutsDialog (a0, a1, a2)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | KShortcutsEditor.ActionTypes | KShortcutsEditor.AllActions
  a1 | KShortcutsEditor.LetterShortcuts | KShortcutsEditor.LetterShortcutsAllowed
  a2 | QWidget | 0

- addCollection (a0, title)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | KActionCollection |
  title | QString | QString()

  Add all actions of the collection to the ones displayed and configured by the dialog.

  title - the title associated with the collection (if null, the KAboutData.progName() of the collection's componentData is used)

- configure (saveSettings)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  saveSettings | bool | 1

  Run the dialog and call writeSettings() on the action collections that were added if bSaveSettings is true.

- configure (collection, allowLetterShortcuts, parent, bSaveSettings)

  returns int
  static

  Argument | Type | Default
  --- | --- | ---
  collection | KActionCollection |
  allowLetterShortcuts | KShortcutsEditor.LetterShortcuts | KShortcutsEditor.LetterShortcutsAllowed
  parent | QWidget | 0
  bSaveSettings | bool | 1

  Pops up a modal dialog for configuring key settings. The new shortcut settings will become active if the user presses OK.

  collection - the KActionCollection to configure

  allowLetterShortcuts - set to KShortcutsEditor.LetterShortcutsDisallowed if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts.

  parent - the parent widget to attach to

  bSaveSettings - if true, the settings will also be saved back by calling writeSettings() on the action collections that were added.

  Returns Accept if the dialog was closed with OK, Reject otherwise.

- sizeHint ( )

  returns QSize

  See also QWidget.sizeHint()