# eric4.Preferences.ShortcutDialog

Module implementing a dialog for the configuration of a keyboard shortcut.

### Global Attributes

None

### Classes

ShortcutDialog | Class implementing a dialog for the configuration of a keyboard shortcut.

### Functions

None

## ShortcutDialog

Class implementing a dialog for the configuration of a keyboard shortcut.

#### Signals

shortcutChanged(QKeySequence, QKeySequence, bool, objectType)
  emitted after the OK button was pressed

### Derived from

QDialog, Ui_ShortcutDialog

### Class Attributes

None

### Methods

ShortcutDialog | Constructor
__clear | Private slot to handle the Clear button press.
__setKeyLabelText | Private method to set the text of a key label.
__typeChanged | Private slot to handle the change of the shortcuts type.
eventFilter | Method called to filter the event queue.
keyPressEvent | Private method to handle a key press event.
on_buttonBox_accepted | Private slot to handle the OK button press.
setKeys | Public method to set the key to be configured.

#### ShortcutDialog (Constructor)

ShortcutDialog(parent = None, name = None, modal = False)

Constructor

parent
  The parent widget of this dialog. (QWidget)
name
  The name of this dialog. (QString)
modal
  Flag indicating a modal dialog. (boolean)

#### ShortcutDialog.__clear

__clear()

Private slot to handle the Clear button press.

#### ShortcutDialog.__setKeyLabelText

__setKeyLabelText(txt)

Private method to set the text of a key label.

txt
  text to be set (QString)

#### ShortcutDialog.__typeChanged

__typeChanged()

Private slot to handle the change of the shortcuts type.

#### ShortcutDialog.eventFilter

eventFilter(watched, event)

Method called to filter the event queue.

watched
  the QObject being watched
event
  the event that occurred

Returns:
  always False

#### ShortcutDialog.keyPressEvent

keyPressEvent(evt)

Private method to handle a key press event.

evt
  the key event (QKeyEvent)

#### ShortcutDialog.on_buttonBox_accepted

on_buttonBox_accepted()

Private slot to handle the OK button press.

#### ShortcutDialog.setKeys

setKeys(key, alternateKey, noCheck, objectType)

Public method to set the key to be configured.

key
  key sequence to be changed (QKeySequence)
alternateKey
  alternate key sequence to be changed (QKeySequence)
noCheck
  flag indicating that no uniqueness check should be performed (boolean)
objectType
  type of the object (string).

Up