kdeui Library API Documentation

KKeyChooser Class Reference

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

#include <kkeydialog.h>

Inheritance diagram for KKeyChooser:

QWidget List of all members.

Public Slots

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

void setPreferFourModifierKeys (bool preferFourModifierKeys)
 Specifies whether to use the 3 or 4 modifier key scheme.

void listSync ()
 Rebuild list entries based on underlying map.


Signals

void keyChange ()
 Emitted when an action's shortcut has been changed.


Public Methods

 KKeyChooser (QWidget *parent, ActionType type=Application, bool bAllowLetterShortcuts=true)
 Constructor.

bool insert (KActionCollection *)
 Insert an action collection, i.e.

bool insert (KActionCollection *, const QString &title)
 Insert an action collection, i.e.

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

void save ()
 This commits and then saves the actions to disk.

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

Protected Methods

void buildListView (uint iList, const QString &title=QString::null)
 
Since:
3.1


void fontChange (const QFont &_font)

Detailed Description

Configure dictionaries of key/action associations for KAccel and KGlobalAccel. Widget for configuration of 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
Version:
Id:
kkeydialog.h,v 1.72 2002/10/31 08:45:19 lunakl Exp
Author:
Nicolas Hadacek <hadacek@via.ecp.fr>

Definition at line 58 of file kkeydialog.h.


Constructor & Destructor Documentation

KKeyChooser::KKeyChooser QWidget   parent,
ActionType    type = Application,
bool    bAllowLetterShortcuts = true
 

Constructor.

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

Definition at line 134 of file kkeydialog.cpp.

KKeyChooser::KKeyChooser KAccel   actions,
QWidget   parent,
bool    bCheckAgainstStdKeys,
bool    bAllowLetterShortcuts,
bool    bAllowWinKey = false
 

Deprecated:

Definition at line 168 of file kkeydialog.cpp.

References insert().

KKeyChooser::KKeyChooser KGlobalAccel   actions,
QWidget   parent,
bool    bCheckAgainstStdKeys,
bool    bAllowLetterShortcuts,
bool    bAllowWinKey = false
 

Deprecated:

Definition at line 184 of file kkeydialog.cpp.

References insert().


Member Function Documentation

bool KKeyChooser::insert KActionCollection  
 

Insert an action collection, i.e.

add all its actions to the ones already associated with the KKeyChooser object.

Definition at line 213 of file kkeydialog.cpp.

Referenced by KKeyDialog::configure(), KKeyDialog::insert(), and KKeyChooser().

bool KKeyChooser::insert KActionCollection  ,
const QString   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.
Since:
3.1

Definition at line 218 of file kkeydialog.cpp.

References KInstance::aboutData(), buildListView(), KActionCollection::instance(), QString::isEmpty(), and KAboutData::programName().

void KKeyChooser::commitChanges  
 

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

Definition at line 253 of file kkeydialog.cpp.

References QListViewItemIterator::current().

Referenced by KKeyDialog::commitChanges(), and save().

void KKeyChooser::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.

Definition at line 265 of file kkeydialog.cpp.

References commitChanges().

void KKeyChooser::keyChange   [signal]
 

Emitted when an action's shortcut has been changed.

Referenced by allDefault().

void KKeyChooser::allDefault   [slot]
 

Set all keys to their default values (bindings).

Definition at line 554 of file kkeydialog.cpp.

References QListViewItemIterator::current(), and keyChange().

void KKeyChooser::setPreferFourModifierKeys bool    preferFourModifierKeys [slot]
 

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

This determines which default is used when the 'Default' button is clicked.

Definition at line 574 of file kkeydialog.cpp.

void KKeyChooser::buildListView uint    iList,
const QString   title = QString::null
[protected]
 

Since:
3.1

Definition at line 412 of file kkeydialog.cpp.

References KShortcutList::count(), QListViewItem::firstChild(), KShortcutList::isConfigurable(), QString::isEmpty(), KShortcutList::label(), KShortcutList::name(), QListViewItem::setExpandable(), QListViewItem::setOpen(), QListViewItem::setSelectable(), and QString::startsWith().

Referenced by insert().

void KKeyChooser::listSync   [slot]
 

Rebuild list entries based on underlying map.

Use this if you changed the underlying map.

Definition at line 589 of file kkeydialog.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:21:05 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001