.TH "KKeyChooser" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KKeyChooser \- Widget for configuration of \fBKAccel\fP and \fBKGlobalAccel\fP.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kkeydialog.h>\fP
.PP
Inherits \fBQWidget\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBActionType\fP { \fBApplication\fP, \fBApplicationGlobal\fP, \fBStandard\fP, \fBGlobal\fP }"
.br
.in -1c
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBallDefault\fP ()"
.br
.ti -1c
.RI "void \fBsetPreferFourModifierKeys\fP (bool preferFourModifierKeys)"
.br
.ti -1c
.RI "void \fBlistSync\fP ()"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBkeyChange\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKKeyChooser\fP (\fBQWidget\fP *parent, ActionType type=Application, bool bAllowLetterShortcuts=true)"
.br
.ti -1c
.RI "\fBKKeyChooser\fP (\fBKActionCollection\fP *coll, \fBQWidget\fP *parent, bool bAllowLetterShortcuts=true)"
.br
.ti -1c
.RI "\fBKKeyChooser\fP (\fBKAccel\fP *actions, \fBQWidget\fP *parent, bool bAllowLetterShortcuts=true)"
.br
.ti -1c
.RI "\fBKKeyChooser\fP (\fBKGlobalAccel\fP *actions, \fBQWidget\fP *parent)"
.br
.ti -1c
.RI "\fBKKeyChooser\fP (\fBKShortcutList\fP *, \fBQWidget\fP *parent, ActionType type=Application, bool bAllowLetterShortcuts=true)"
.br
.ti -1c
.RI "bool \fBinsert\fP (\fBKActionCollection\fP *)"
.br
.ti -1c
.RI "bool \fBinsert\fP (\fBKActionCollection\fP *, const \fBQString\fP &title)"
.br
.ti -1c
.RI "void \fBsyncToConfig\fP (const \fBQString\fP &sConfigGroup, \fBKConfigBase\fP *pConfig, bool bClearUnset)"
.br
.ti -1c
.RI "void \fBcommitChanges\fP ()"
.br
.ti -1c
.RI "void \fBsave\fP ()"
.br
.ti -1c
.RI "\fBKKeyChooser\fP (\fBKAccel\fP *actions, \fBQWidget\fP *parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey=false)"
.br
.ti -1c
.RI "\fBKKeyChooser\fP (\fBKGlobalAccel\fP *actions, \fBQWidget\fP *parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey=false)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static bool \fBcheckGlobalShortcutsConflict\fP (const \fBKShortcut\fP &cut, bool warnUser, \fBQWidget\fP *parent)"
.br
.ti -1c
.RI "static bool \fBcheckStandardShortcutsConflict\fP (const \fBKShortcut\fP &cut, bool warnUser, \fBQWidget\fP *parent)"
.br
.in -1c
.SS "Protected Types"

.in +1c
.ti -1c
.RI "enum { \fBNoKey\fP =  1, \fBDefaultKey\fP, \fBCustomKey\fP }"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBslotNoKey\fP ()"
.br
.ti -1c
.RI "void \fBslotDefaultKey\fP ()"
.br
.ti -1c
.RI "void \fBslotCustomKey\fP ()"
.br
.ti -1c
.RI "void \fBslotListItemSelected\fP (\fBQListViewItem\fP *item)"
.br
.ti -1c
.RI "void \fBcapturedShortcut\fP (const \fBKShortcut\fP &cut)"
.br
.ti -1c
.RI "void \fBslotSettingsChanged\fP (int)"
.br
.ti -1c
.RI "void \fBslotListItemDoubleClicked\fP (\fBQListViewItem\fP *ipoQListViewItem, const \fBQPoint\fP &ipoQPoint, int c)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBinitGUI\fP (ActionType type, bool bAllowLetterShortcuts)"
.br
.ti -1c
.RI "bool \fBinsert\fP (\fBKAccel\fP *)"
.br
.ti -1c
.RI "bool \fBinsert\fP (\fBKGlobalAccel\fP *)"
.br
.ti -1c
.RI "bool \fBinsert\fP (\fBKShortcutList\fP *)"
.br
.ti -1c
.RI "void \fBbuildListView\fP (uint iList, const \fBQString\fP &title=QString::null)"
.br
.ti -1c
.RI "void \fBreadGlobalKeys\fP ()"
.br
.ti -1c
.RI "void \fBupdateButtons\fP ()"
.br
.ti -1c
.RI "void \fBfontChange\fP (const \fBQFont\fP &_font)"
.br
.ti -1c
.RI "void \fBsetShortcut\fP (const \fBKShortcut\fP &cut)"
.br
.ti -1c
.RI "bool \fBisKeyPresent\fP (const \fBKShortcut\fP &cut, bool warnuser=true)"
.br
.ti -1c
.RI "bool \fBisKeyPresentLocally\fP (const \fBKShortcut\fP &cut, KKeyChooserItem *ignoreItem, const \fBQString\fP &warnText)"
.br
.ti -1c
.RI "void \fB_warning\fP (const \fBKKeySequence\fP &seq, \fBQString\fP sAction, \fBQString\fP sTitle)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "ActionType \fBm_type\fP"
.br
.ti -1c
.RI "bool \fBm_bAllowLetterShortcuts\fP"
.br
.ti -1c
.RI "bool \fBm_bAllowWinKey\fP"
.br
.ti -1c
.RI "bool \fBm_bPreferFourModifierKeys\fP"
.br
.ti -1c
.RI "\fBQRadioButton\fP * \fBm_prbNone\fP"
.br
.ti -1c
.RI "\fBQRadioButton\fP * \fBm_prbDef\fP"
.br
.ti -1c
.RI "\fBQRadioButton\fP * \fBm_prbCustom\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKKeyDialog\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Widget for configuration of \fBKAccel\fP and \fBKGlobalAccel\fP. 

Configure dictionaries of key/action associations for \fBKAccel\fP and \fBKGlobalAccel\fP.
.PP
The class takes care of all aspects of configuration, including handling key conflicts internally. Connect to the \fBallDefault()\fP slot if you want to set all configurable shortcuts to their default values.
.PP
\fBSee also:\fP
.RS 4
\fBKKeyDialog\fP 
.RE
.PP
\fBAuthor:\fP
.RS 4
Nicolas Hadacek <hadacek@via.ecp.fr> 
.RE
.PP

.PP
Definition at line 58 of file kkeydialog.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KKeyChooser::KKeyChooser (\fBQWidget\fP * parent, ActionType type = \fCApplication\fP, bool bAllowLetterShortcuts = \fCtrue\fP)"
.PP
Constructor. 
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP the parent widget for this widget 
.br
\fItype\fP the ActionType for this KKeyChooser 
.br
\fIbAllowLetterShortcuts\fP Set to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts. 
.RE
.PP

.PP
Definition at line 154 of file kkeydialog.cpp.
.SS "KKeyChooser::KKeyChooser (\fBKActionCollection\fP * coll, \fBQWidget\fP * parent, bool bAllowLetterShortcuts = \fCtrue\fP)"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP parent widget 
.br
\fIcoll\fP the \fBKActionCollection\fP to configure 
.br
\fIbAllowLetterShortcuts\fP Set to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts. 
.RE
.PP

.PP
Definition at line 160 of file kkeydialog.cpp.
.PP
References insert().
.SS "KKeyChooser::KKeyChooser (\fBKAccel\fP * actions, \fBQWidget\fP * parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey = \fCfalse\fP)"
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP

.PP
Definition at line 188 of file kkeydialog.cpp.
.PP
References insert().
.SS "KKeyChooser::KKeyChooser (\fBKGlobalAccel\fP * actions, \fBQWidget\fP * parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey = \fCfalse\fP)"
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP

.PP
Definition at line 204 of file kkeydialog.cpp.
.PP
References insert().
.SH "Member Function Documentation"
.PP 
.SS "bool KKeyChooser::insert (\fBKActionCollection\fP *)"
.PP
Insert an action collection, i.e. 
.PP
add all its actions to the ones already associated with the KKeyChooser object.
.PP
Definition at line 233 of file kkeydialog.cpp.
.PP
Referenced by KKeyDialog::configure(), KKeyDialog::insert(), and KKeyChooser().
.SS "bool KKeyChooser::insert (\fBKActionCollection\fP *, const \fBQString\fP & title)"
.PP
Insert an action collection, i.e. 
.PP
add all its actions to the ones already associated with the KKeyChooser object. 
.PP
\fBParameters:\fP
.RS 4
\fItitle\fP subtree title of this collection of shortcut. 
.RE
.PP
\fBSince:\fP
.RS 4
3.1
.RE
.PP

.PP
Definition at line 238 of file kkeydialog.cpp.
.PP
References QString::append(), and buildListView().
.SS "void KKeyChooser::commitChanges ()"
.PP
This function writes any shortcut changes back to the original action set(s). 
.PP

.PP
Definition at line 273 of file kkeydialog.cpp.
.PP
References endl(), and kdDebug().
.PP
Referenced by KKeyDialog::commitChanges(), and save().
.SS "void KKeyChooser::save ()"
.PP
This commits and then saves the actions to disk. 
.PP
Any \fBKActionCollection\fP objects with the xmlFile() value set will be written to an XML file. All other will be written to the application's rc file.
.PP
Definition at line 285 of file kkeydialog.cpp.
.PP
References commitChanges().
.SS "bool KKeyChooser::checkGlobalShortcutsConflict (const \fBKShortcut\fP & cut, bool warnUser, \fBQWidget\fP * parent)\fC [static]\fP"
.PP
Checks whether the given shortcut conflicts with global keyboard shortcuts. 
.PP
If yes, and the warnUser argument is true, warns the user and gives them a chance to reassign the shortcut from the global shortcut.
.PP
\fBReturns:\fP
.RS 4
true if there was conflict (and the user didn't reassign the shortcut) 
.RE
.PP
\fBParameters:\fP
.RS 4
\fIcut\fP the shortcut that will be checked for conflicts 
.br
\fIwarnUser\fP if true, the user will be warned about a conflict and given a chance to reassign the shortcut 
.br
\fIparent\fP parent widget for the warning dialog
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 850 of file kkeydialog.cpp.
.SS "bool KKeyChooser::checkStandardShortcutsConflict (const \fBKShortcut\fP & cut, bool warnUser, \fBQWidget\fP * parent)\fC [static]\fP"
.PP
Checks whether the given shortcut conflicts with standard keyboard shortcuts. 
.PP
If yes, and the warnUser argument is true, warns the user and gives them a chance to reassign the shortcut from the standard shortcut.
.PP
\fBReturns:\fP
.RS 4
true if there was conflict (and the user didn't reassign the shortcut) 
.RE
.PP
\fBParameters:\fP
.RS 4
\fIcut\fP the shortcut that will be checked for conflicts 
.br
\fIwarnUser\fP if true, the user will be warned about a conflict and given a chance to reassign the shortcut 
.br
\fIparent\fP parent widget for the warning dialog
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 832 of file kkeydialog.cpp.
.PP
References KShortcut::count(), KStdAccel::findStdAccel(), and KShortcut::seq().
.SS "void KKeyChooser::keyChange ()\fC [signal]\fP"
.PP
Emitted when an action's shortcut has been changed. 
.PP
Referenced by allDefault().
.SS "void KKeyChooser::allDefault ()\fC [slot]\fP"
.PP
Set all keys to their default values (bindings). 
.PP
Definition at line 616 of file kkeydialog.cpp.
.PP
References endl(), kdDebug(), and keyChange().
.SS "void KKeyChooser::setPreferFourModifierKeys (bool preferFourModifierKeys)\fC [slot]\fP"
.PP
Specifies whether to use the 3 or 4 modifier key scheme. 
.PP
This determines which default is used when the 'Default' button is clicked.
.PP
Definition at line 648 of file kkeydialog.cpp.
.SS "void KKeyChooser::buildListView (uint iList, const \fBQString\fP & title = \fCQString::null\fP)\fC [protected]\fP"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 462 of file kkeydialog.cpp.
.PP
References KShortcutList::count(), endl(), QListViewItem::firstChild(), KShortcutList::isConfigurable(), QString::isEmpty(), kdDebug(), KShortcutList::label(), KShortcutList::name(), QListViewItem::setExpandable(), QListViewItem::setOpen(), QListViewItem::setPixmap(), QListViewItem::setSelectable(), and QString::startsWith().
.PP
Referenced by insert().
.SS "void KKeyChooser::listSync ()\fC [slot]\fP"
.PP
Rebuild list entries based on underlying map. 
.PP
Use this if you changed the underlying map.
.PP
Definition at line 663 of file kkeydialog.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
