org.kde.koala

Class KKeyChooser

public class KKeyChooser extends QWidget

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 KKeyChooserSignals for signals emitted by KKeyChooser

Author: Nicolas Hadacek

See Also: KKeyDialog

UNKNOWN: Widget for configuration of KAccel and KGlobalAccel.

Field Summary
static intApplication
static intApplicationGlobal
static intCustomKey
static intDefaultKey
static intGlobal
static intNoKey
static intStandard
Constructor Summary
protected KKeyChooser(Class dummy)
KKeyChooser(QWidget parent)
Constructor.
KKeyChooser(KActionCollection coll, QWidget parent, boolean bAllowLetterShortcuts)
\overload
KKeyChooser(KActionCollection coll, QWidget parent)
KKeyChooser(KAccel actions, QWidget parent, boolean bAllowLetterShortcuts)
KKeyChooser(KAccel actions, QWidget parent)
KKeyChooser(KGlobalAccel actions, QWidget parent)
KKeyChooser(KShortcutList arg1, QWidget parent)
Method Summary
voidallDefault()
Set all keys to their default values (bindings).
protected voidbuildListView(int iList, String title)
protected voidbuildListView(int iList)
protected voidcapturedShortcut(KShortcut cut)
static booleancheckGlobalShortcutsConflict(KShortcut cut, boolean warnUser, QWidget parent)
Checks whether the given shortcut conflicts with global keyboard shortcuts.
static booleancheckStandardShortcutsConflict(KShortcut cut, boolean warnUser, QWidget parent)
Checks whether the given shortcut conflicts with standard keyboard shortcuts.
StringclassName()
voidcommitChanges()
This function writes any shortcut changes back to the original action set(s).
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
protected voidfontChange(QFont _font)
booleaninsert(KActionCollection arg1)
Insert an action collection, i.e. add all its actions to the ones already associated with the KKeyChooser object.
booleaninsert(KActionCollection arg1, String title)
Insert an action collection, i.e. add all its actions to the ones already associated with the KKeyChooser object.
protected booleaninsert(KAccel arg1)
protected booleaninsert(KGlobalAccel arg1)
protected booleaninsert(KShortcutList arg1)
booleanisDisposed()
Has the wrapped C++ instance been deleted?
protected booleanisKeyPresent(KShortcut cut, boolean warnuser)
protected booleanisKeyPresent(KShortcut cut)
voidlistSync()
Rebuild list entries based on underlying map.
QMetaObjectmetaObject()
protected voidreadGlobalKeys()
voidsave()
This commits and then saves the actions to disk.
voidsetPreferFourModifierKeys(boolean preferFourModifierKeys)
Specifies whether to use the 3 or 4 modifier key scheme.
protected voidsetShortcut(KShortcut cut)
protected voidslotCustomKey()
protected voidslotDefaultKey()
protected voidslotListItemDoubleClicked(QListViewItem ipoQListViewItem, QPoint ipoQPoint, int c)
protected voidslotListItemSelected(QListViewItem item)
protected voidslotNoKey()
protected voidslotSettingsChanged(int arg1)
voidsyncToConfig(String sConfigGroup, KConfigBase pConfig, boolean bClearUnset)
protected voidupdateButtons()
protected void_warning(KKeySequence seq, String sAction, String sTitle)

Field Detail

Application

public static final int Application

ApplicationGlobal

public static final int ApplicationGlobal

CustomKey

public static final int CustomKey

DefaultKey

public static final int DefaultKey

Global

public static final int Global

NoKey

public static final int NoKey

Standard

public static final int Standard

Constructor Detail

KKeyChooser

protected KKeyChooser(Class dummy)

KKeyChooser

public KKeyChooser(QWidget parent)
Constructor.

Parameters: parent the parent widget for this widget type the ActionType for this KKeyChooser bAllowLetterShortcuts Set to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts.

UNKNOWN: Constructor.

KKeyChooser

public KKeyChooser(KActionCollection coll, QWidget parent, boolean bAllowLetterShortcuts)
\overload

Parameters: parent parent widget coll the KActionCollection to configure bAllowLetterShortcuts Set to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts.

UNKNOWN: \overload

KKeyChooser

public KKeyChooser(KActionCollection coll, QWidget parent)

KKeyChooser

public KKeyChooser(KAccel actions, QWidget parent, boolean bAllowLetterShortcuts)

KKeyChooser

public KKeyChooser(KAccel actions, QWidget parent)

KKeyChooser

public KKeyChooser(KGlobalAccel actions, QWidget parent)

KKeyChooser

public KKeyChooser(KShortcutList arg1, QWidget parent)

Method Detail

allDefault

public void allDefault()
Set all keys to their default values (bindings).

UNKNOWN: Set all keys to their default values (bindings).

buildListView

protected void buildListView(int iList, String title)

buildListView

protected void buildListView(int iList)

capturedShortcut

protected void capturedShortcut(KShortcut cut)

checkGlobalShortcutsConflict

public static boolean checkGlobalShortcutsConflict(KShortcut cut, boolean warnUser, QWidget parent)
Checks whether the given shortcut conflicts with global keyboard shortcuts. If yes, and the warnUser argument is true, warns the user and gives them a chance to reassign the shortcut from the global shortcut.

Parameters: cut the shortcut that will be checked for conflicts warnUser if true, the user will be warned about a conflict and given a chance to reassign the shortcut parent parent widget for the warning dialog

Returns: true if there was conflict (and the user didn't reassign the shortcut)

UNKNOWN: Checks whether the given shortcut conflicts with global keyboard shortcuts.

checkStandardShortcutsConflict

public static boolean checkStandardShortcutsConflict(KShortcut cut, boolean warnUser, QWidget parent)
Checks whether the given shortcut conflicts with standard keyboard shortcuts. If yes, and the warnUser argument is true, warns the user and gives them a chance to reassign the shortcut from the standard shortcut.

Parameters: cut the shortcut that will be checked for conflicts warnUser if true, the user will be warned about a conflict and given a chance to reassign the shortcut parent parent widget for the warning dialog

Returns: true if there was conflict (and the user didn't reassign the shortcut)

UNKNOWN: Checks whether the given shortcut conflicts with standard keyboard shortcuts.

className

public String className()

commitChanges

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

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

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

fontChange

protected void fontChange(QFont _font)

insert

public boolean insert(KActionCollection arg1)
Insert an action collection, i.e. add all its actions to the ones already associated with the KKeyChooser object.

UNKNOWN: Insert an action collection, i.

insert

public boolean insert(KActionCollection arg1, String title)
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.

UNKNOWN: Insert an action collection, i.

insert

protected boolean insert(KAccel arg1)

insert

protected boolean insert(KGlobalAccel arg1)

insert

protected boolean insert(KShortcutList arg1)

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

isKeyPresent

protected boolean isKeyPresent(KShortcut cut, boolean warnuser)

isKeyPresent

protected boolean isKeyPresent(KShortcut cut)

listSync

public void listSync()
Rebuild list entries based on underlying map. Use this if you changed the underlying map.

UNKNOWN: Rebuild list entries based on underlying map.

metaObject

public QMetaObject metaObject()

readGlobalKeys

protected void readGlobalKeys()

save

public void 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.

UNKNOWN: This commits and then saves the actions to disk.

setPreferFourModifierKeys

public void setPreferFourModifierKeys(boolean preferFourModifierKeys)
Specifies whether to use the 3 or 4 modifier key scheme. This determines which default is used when the 'Default' button is clicked.

UNKNOWN: Specifies whether to use the 3 or 4 modifier key scheme.

setShortcut

protected void setShortcut(KShortcut cut)

slotCustomKey

protected void slotCustomKey()

slotDefaultKey

protected void slotDefaultKey()

slotListItemDoubleClicked

protected void slotListItemDoubleClicked(QListViewItem ipoQListViewItem, QPoint ipoQPoint, int c)

slotListItemSelected

protected void slotListItemSelected(QListViewItem item)

slotNoKey

protected void slotNoKey()

slotSettingsChanged

protected void slotSettingsChanged(int arg1)

syncToConfig

public void syncToConfig(String sConfigGroup, KConfigBase pConfig, boolean bClearUnset)

updateButtons

protected void updateButtons()

_warning

protected void _warning(KKeySequence seq, String sAction, String sTitle)