# kdeui Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KKeyDialog Class Reference

The KKeyDialog class is used for configuring dictionaries of key/action associations for KActionCollection, KAccel, and KGlobalAccel. Dialog for configuration of KActionCollection, KAccel, and KGlobalAccel. More...

`#include <kkeydialog.h>`

Inheritance diagram for KKeyDialog:

[legend]
Collaboration diagram for KKeyDialog:

[legend]
List of all members.

## Public Member Functions

| KKeyDialog (bool bAllowLetterShortcuts=true, QWidget *parent=0, const char *name=0)
| Constructs a KKeyDialog called `name` as a child of `parent`.
virtual | ~KKeyDialog ()
| Destructor.
bool | insert (KActionCollection *)
| Insert an action collection, i.e.
bool | insert (KActionCollection *, const QString &title)
| Insert an action collection, i.e.
bool | configure (bool bSaveSettings=true)
void | commitChanges ()
| Commit key setting changes so that changed settings actually become active.

## Static Public Member Functions

int | configure (KActionCollection *coll, QWidget *parent=0, bool bSaveSettings=true)
| Pops up a modal dialog for configuring key settings.
int | configure (KAccel *keys, QWidget *parent=0, bool bSaveSettings=true)
| This is an overloaded member function, provided for convenience.
int | configure (KGlobalAccel *keys, QWidget *parent=0, bool bSaveSettings=true)
| This is an overloaded member function, provided for convenience.
int | configure (KActionCollection *coll, bool bAllowLetterShortcuts, QWidget *parent=0, bool bSaveSettings=true)
| This is an overloaded member function, provided for convenience.
int | configure (KAccel *keys, bool bAllowLetterShortcuts, QWidget *parent=0, bool bSaveSettings=true)
| This is an overloaded member function, provided for convenience.
int | configure (KGlobalAccel *keys, bool bAllowLetterShortcuts, QWidget *parent=0, bool bSaveSettings=true)
| This is an overloaded member function, provided for convenience.
int | configureKeys (KAccel *keys, bool save_settings=true, QWidget *parent=0)
| This class or method is obsolete, it is provided for compatibility only. Obsolete.
int | configureKeys (KGlobalAccel *keys, bool save_settings=true, QWidget *parent=0)
| This class or method is obsolete, it is provided for compatibility only. Obsolete.
int | configureKeys (KActionCollection *coll, const QString &, bool save_settings=true, QWidget *parent=0)
| This class or method is obsolete, it is provided for compatibility only. Obsolete.

## Protected Member Functions

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

## Detailed Description

The KKeyDialog class is used for configuring dictionaries of key/action associations for KActionCollection, KAccel, and KGlobalAccel. Dialog for configuration of KActionCollection, KAccel, and KGlobalAccel.

It uses the KKeyChooser widget and offers buttons to set all keys to defaults and invoke on-line help.

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

     KKeyDialog::configure( actionCollection() );

Version:
  Id
    kkeydialog.h,v 1.72.2.1 2003/04/25 07:38:44 mlaurent Exp

Author:
  Nicolas Hadacek <hadacek@via.ecp.fr>

Definition at line 217 of file kkeydialog.h.

## Constructor & Destructor Documentation

KKeyDialog::KKeyDialog | ( | bool | bAllowLetterShortcuts = true,
|  | QWidget * | parent = 0,
|  | const char * | name = 0
| ) |

| Constructs a KKeyDialog called `name` as a child of `parent`. Set `bAllowLetterShortcuts` to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts. Definition at line 878 of file kkeydialog.cpp. References KGlobal::config(), KDialogBase::defaultClicked(), KDialogBase::enableButton(), KStdAccel::name(), and KDialogBase::setMainWidget().

KKeyDialog::~KKeyDialog | ( |  | ) | `[virtual]`

| Destructor. Deletes all resources used by a KKeyDialog object. Definition at line 891 of file kkeydialog.cpp. References KGlobal::config().

## Member Function Documentation

bool KKeyDialog::insert | ( | KActionCollection * |  | ) |

Insert an action collection, i.e.

add all its actions to the ones displayed by the dialog. This method can be useful in applications following the document/view design, with actions in both the document and the view. Simply call insert with the action collections of each one in turn.

Returns:
  true :)

Definition at line 897 of file kkeydialog.cpp.

References KKeyChooser::insert().

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

Insert an action collection, i.e.

add all its actions to the ones displayed by the dialog. This method can be useful in applications following the document/view design, with actions in both the document and the view. Simply call insert with the action collections of each one in turn.

Parameters:

  title | the title associated with the collection (if null, the KAboutData::progName() of the collection's instance is used)

Returns:
  true :)

Since:
  3.1

Definition at line 902 of file kkeydialog.cpp.

References KKeyChooser::insert().

void KKeyDialog::commitChanges | ( |  | ) |

| Commit key setting changes so that changed settings actually become active. This method is implicitly called from configure if `bSaveSettings` is true. Definition at line 919 of file kkeydialog.cpp. References KKeyChooser::commitChanges().

int KKeyDialog::configure | ( | KActionCollection * | coll,
|  | QWidget * | parent = 0,
|  | bool | bSaveSettings = true
| ) | `[static]`

Pops up a modal dialog for configuring key settings.

The new shortcut settings will be active if the user presses OK. If `bSaveSettings` is true, the settings will also be saved back to the *uirc file which they were intially read from.

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

Definition at line 924 of file kkeydialog.cpp.

Referenced by configure(), and configureKeys().

int KKeyDialog::configure | ( | KAccel * | keys,
|  | QWidget * | parent = 0,
|  | bool | bSaveSettings = true
| ) | `[static]`

| This is an overloaded member function, provided for convenience. It behaves essentially like the above function, except that settings are saved to a *.rc file using KConfig. Definition at line 929 of file kkeydialog.cpp. References configure().

int KKeyDialog::configure | ( | KGlobalAccel * | keys,
|  | QWidget * | parent = 0,
|  | bool | bSaveSettings = true
| ) | `[static]`

| This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Definition at line 934 of file kkeydialog.cpp. References configure().

int KKeyDialog::configure | ( | KActionCollection * | coll,
|  | bool | bAllowLetterShortcuts,
|  | QWidget * | parent = 0,
|  | bool | bSaveSettings = true
| ) | `[static]`

This is an overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters:

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

Definition at line 959 of file kkeydialog.cpp.

References configure(), KKeyChooser::insert(), and m_pKeyChooser.

int KKeyDialog::configure | ( | KAccel * | keys,
|  | bool | bAllowLetterShortcuts,
|  | QWidget * | parent = 0,
|  | bool | bSaveSettings = true
| ) | `[static]`

| This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Definition at line 939 of file kkeydialog.cpp. References configure(), KKeyChooser::insert(), m_pKeyChooser, and KAccel::updateConnections().

int KKeyDialog::configure | ( | KGlobalAccel * | keys,
|  | bool | bAllowLetterShortcuts,
|  | QWidget * | parent = 0,
|  | bool | bSaveSettings = true
| ) | `[static]`

| This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Definition at line 949 of file kkeydialog.cpp. References configure(), KKeyChooser::insert(), m_pKeyChooser, and KGlobalAccel::updateConnections().

int KKeyDialog::configureKeys | ( | KAccel * | keys,
|  | bool | save_settings = true,
|  | QWidget * | parent = 0
| ) | `[inline, static]`

| This class or method is obsolete, it is provided for compatibility only. Obsolete. Please use KKeyDialog::configure instead Definition at line 314 of file kkeydialog.h. References configure().

int KKeyDialog::configureKeys | ( | KGlobalAccel * | keys,
|  | bool | save_settings = true,
|  | QWidget * | parent = 0
| ) | `[inline, static]`

| This class or method is obsolete, it is provided for compatibility only. Obsolete. Please use KKeyDialog::configure instead Definition at line 320 of file kkeydialog.h. References configure().

int KKeyDialog::configureKeys | ( | KActionCollection * | coll,
|  | const QString & | ,
|  | bool | save_settings = true,
|  | QWidget * | parent = 0
| ) | `[inline, static]`

| This class or method is obsolete, it is provided for compatibility only. Obsolete. Please use KKeyDialog::configure instead Definition at line 326 of file kkeydialog.h. References configure().

The documentation for this class was generated from the following files:

- kkeydialog.h
- kkeydialog.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:01:45 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001