class KKeyChooser

# class KKeyChooser | Widget for configuration of KAccel and KGlobalAccel. More...
Definition | `#include <kkeydialog.h>`
Inherits | QWidget (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum ActionType { Application, ApplicationGlobal, Standard, Global }

#### Public Methods

- KKeyChooser ( QWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true )
- KKeyChooser ( KActionCollection* coll, QWidget* parent, bool bAllowLetterShortcuts = true )
- KKeyChooser ( KAccel* actions, QWidget* parent, bool bAllowLetterShortcuts = true )
- KKeyChooser ( KGlobalAccel* actions, QWidget* parent )
- KKeyChooser ( KShortcutList*, QWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true )
- virtual ~KKeyChooser ()
- bool insert ( KActionCollection* )
- bool insert ( KActionCollection *, const QString &title)
- void syncToConfig ( const QString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset )
- void commitChanges ()
- void save ()
- KKeyChooser ( KAccel* actions, QWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey = false )
- KKeyChooser ( KGlobalAccel* actions, QWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey = false )

#### Public Slots

- void allDefault ()
- void setPreferFourModifierKeys ( bool preferFourModifierKeys )
- void listSync ()

#### Signals

- void keyChange ()

#### Protected Types

- enum { NoKey = 1, DefaultKey, CustomKey }

#### Protected Methods

- void initGUI ( ActionType type, bool bAllowLetterShortcuts )
- bool insert ( KAccel* )
- bool insert ( KGlobalAccel* )
- bool insert ( KShortcutList* )
- void buildListView ( uint iList, const QString &title = QString::null )
- void readGlobalKeys ()
- void updateButtons ()
- void fontChange ( const QFont& _font )
- void setShortcut ( const KShortcut& cut )
- bool isKeyPresent ( const KShortcut& cut, bool warnuser = true )
- bool isKeyPresentLocally ( const KShortcut& cut, KKeyChooserItem* ignoreItem, const QString& warnText )
- void _warning ( const KKeySequence& seq, QString sAction, QString sTitle )
- virtual void virtual_hook ( int id, void* data )

#### Protected Slots

- void slotNoKey ()
- void slotDefaultKey ()
- void slotCustomKey ()
- void slotListItemSelected ( QListViewItem *item )
- void capturedShortcut ( const KShortcut& cut )
- void slotSettingsChanged ( int )
- void slotListItemDoubleClicked ( QListViewItem * ipoQListViewItem, const QPoint & ipoQPoint, int c )

#### Protected Members

- ActionType m_type
- bool m_bAllowLetterShortcuts
- bool m_bAllowWinKey
- bool m_bPreferFourModifierKeys
- QRadioButton* m_prbNone
- QRadioButton* m_prbDef
- QRadioButton* m_prbCustom

## Detailed Description

Configure dictionaries of key/action associations for KAccel and KGlobalAccel.

The class takes care of all aspects of configuration, including handling key conflicts internally. Connect to the allDefault() slot if you want to set all configurable shortcuts to their default values.

See also: KKeyDialog

enum ActionType { Application, ApplicationGlobal, Standard, Global } | ### ActionType

KKeyChooser ( QWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true ) | ### KKeyChooser

Constructor.

Parameters:

bAllowLetterShortcuts | Set to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts.

KKeyChooser ( KActionCollection* coll, QWidget* parent, bool bAllowLetterShortcuts = true ) | ### KKeyChooser

KKeyChooser ( KAccel* actions, QWidget* parent, bool bAllowLetterShortcuts = true ) | ### KKeyChooser

KKeyChooser ( KGlobalAccel* actions, QWidget* parent ) | ### KKeyChooser

KKeyChooser ( KShortcutList*, QWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true ) | ### KKeyChooser

~KKeyChooser () | ### ~KKeyChooser

[virtual]

bool insert ( KActionCollection* ) | ### insert

Insert an action collection, i.e. add all its actions to the ones already associated with the KKeyChooser object.

bool insert ( KActionCollection *, const QString &title) | ### insert

Insert an action collection, i.e. add all its actions to the ones already associated with the KKeyChooser object.

Parameters:

title | subtree title of this collection of shortcut.

void syncToConfig ( const QString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset ) | ### syncToConfig

void commitChanges () | ### commitChanges

This function writes any shortcut changes back to the original action set(s).

void save () | ### save

This commits and then saves the actions to disk. Any KActionCollection objects with the xmlFile() value set will be written to an xml file. All other will be written to the application's rc file.

void keyChange () | ### keyChange

[signal]

Emitted when an action's shortcut has been changed.

void allDefault () | ### allDefault

[slot]

Set all keys to their default values (bindings).

void setPreferFourModifierKeys ( bool preferFourModifierKeys ) | ### setPreferFourModifierKeys

[slot]

Specifies whether to use the 3 or 4 modifier key scheme. This determines which default is used when the 'Default' button is clicked.

enum { NoKey = 1, DefaultKey, CustomKey } | ###

[protected]

void initGUI ( ActionType type, bool bAllowLetterShortcuts ) | ### initGUI

[protected]

bool insert ( KAccel* ) | ### insert

[protected]

bool insert ( KGlobalAccel* ) | ### insert

[protected]

bool insert ( KShortcutList* ) | ### insert

[protected]

void buildListView ( uint iList, const QString &title = QString::null ) | ### buildListView

[protected]

void readGlobalKeys () | ### readGlobalKeys

[protected]

void updateButtons () | ### updateButtons

[protected]

void fontChange ( const QFont& _font ) | ### fontChange

[protected]

Reimplemented from QWidget.

void setShortcut ( const KShortcut& cut ) | ### setShortcut

[protected]

bool isKeyPresent ( const KShortcut& cut, bool warnuser = true ) | ### isKeyPresent

[protected]

bool isKeyPresentLocally ( const KShortcut& cut, KKeyChooserItem* ignoreItem, const QString& warnText ) | ### isKeyPresentLocally

[protected]

void _warning ( const KKeySequence& seq, QString sAction, QString sTitle ) | ### _warning

[protected]

void slotNoKey () | ### slotNoKey

[protected slots slot]

void slotDefaultKey () | ### slotDefaultKey

[protected slots slot]

void slotCustomKey () | ### slotCustomKey

[protected slots slot]

void slotListItemSelected ( QListViewItem *item ) | ### slotListItemSelected

[protected slots slot]

void capturedShortcut ( const KShortcut& cut ) | ### capturedShortcut

[protected slots slot]

void slotSettingsChanged ( int ) | ### slotSettingsChanged

[protected slots slot]

void slotListItemDoubleClicked ( QListViewItem * ipoQListViewItem, const QPoint & ipoQPoint, int c ) | ### slotListItemDoubleClicked

[protected slots slot]

ActionType m_type | ### m_type

[protected]

bool m_bAllowLetterShortcuts | ### m_bAllowLetterShortcuts

[protected]

bool m_bAllowWinKey | ### m_bAllowWinKey

[protected]

bool m_bPreferFourModifierKeys | ### m_bPreferFourModifierKeys

[protected]

QRadioButton* m_prbNone | ### m_prbNone

[protected]

QRadioButton* m_prbDef | ### m_prbDef

[protected]

QRadioButton* m_prbCustom | ### m_prbCustom

[protected]

KKeyChooser ( KAccel* actions, QWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey = false ) | ### KKeyChooser

@obsolete

KKeyChooser ( KGlobalAccel* actions, QWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey = false ) | ### KKeyChooser

@obsolete

void listSync () | ### listSync

[slot]

Rebuild list entries based on underlying map. Use this if you changed the underlying map.

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

- Version: $Id: kkeydialog.h,v 1.72.2.1 2003/04/25 07:38:44 mlaurent Exp $
- Author: Nicolas Hadacek
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:37 2003, using kdoc 2.0a54.