• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdeui
 

kdeui

Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Protected Attributes | Friends
KKeyChooser Class Reference

#include <kkeydialog.h>

Inherits TQWidget.

List of all members.

Public Types

enum  ActionType { Application, ApplicationGlobal, Standard, Global }

Public Slots

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

Signals

void keyChange ()

Public Member Functions

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

Static Public Member Functions

static bool checkGlobalShortcutsConflict (const KShortcut &cut, bool warnUser, TQWidget *parent)
static bool checkStandardShortcutsConflict (const KShortcut &cut, bool warnUser, TQWidget *parent)

Protected Types

enum  { NoKey = 1, DefaultKey, CustomKey }

Protected Slots

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

Protected Member Functions

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

Protected Attributes

ActionType m_type
bool m_bAllowLetterShortcuts
bool m_bAllowWinKey
bool m_bPreferFourModifierKeys
TQRadioButton * m_prbNone
TQRadioButton * m_prbDef
TQRadioButton * m_prbCustom

Friends

class KKeyDialog

Detailed Description

Widget for configuration of KAccel and KGlobalAccel.

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
Author:
Nicolas Hadacek <hadacek@via.ecp.fr>

Definition at line 58 of file kkeydialog.h.


Constructor & Destructor Documentation

KKeyChooser::KKeyChooser ( TQWidget *  parent,
ActionType  type = Application,
bool  bAllowLetterShortcuts = true 
)

Constructor.

Parameters:
parentthe parent widget for this widget
typethe ActionType for this KKeyChooser
bAllowLetterShortcutsSet to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts.

Definition at line 154 of file kkeydialog.cpp.

KKeyChooser::KKeyChooser ( KActionCollection *  coll,
TQWidget *  parent,
bool  bAllowLetterShortcuts = true 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
parentparent widget
collthe KActionCollection to configure
bAllowLetterShortcutsSet to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts.

Definition at line 160 of file kkeydialog.cpp.

KKeyChooser::KKeyChooser ( KAccel *  actions,
TQWidget *  parent,
bool  bCheckAgainstStdKeys,
bool  bAllowLetterShortcuts,
bool  bAllowWinKey = false 
)
Deprecated:

Definition at line 188 of file kkeydialog.cpp.

KKeyChooser::KKeyChooser ( KGlobalAccel *  actions,
TQWidget *  parent,
bool  bCheckAgainstStdKeys,
bool  bAllowLetterShortcuts,
bool  bAllowWinKey = false 
)
Deprecated:

Definition at line 204 of file kkeydialog.cpp.


Member Function Documentation

void KKeyChooser::allDefault ( ) [slot]

Set all keys to their default values (bindings).

Definition at line 615 of file kkeydialog.cpp.

void KKeyChooser::buildListView ( uint  iList,
const TQString &  title = TQString::null 
) [protected]
Since:
3.1

Definition at line 461 of file kkeydialog.cpp.

bool KKeyChooser::checkGlobalShortcutsConflict ( const KShortcut &  cut,
bool  warnUser,
TQWidget *  parent 
) [static]

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.

Returns:
true if there was conflict (and the user didn't reassign the shortcut)
Parameters:
cutthe shortcut that will be checked for conflicts
warnUserif true, the user will be warned about a conflict and given a chance to reassign the shortcut
parentparent widget for the warning dialog
Since:
3.2

Definition at line 849 of file kkeydialog.cpp.

bool KKeyChooser::checkStandardShortcutsConflict ( const KShortcut &  cut,
bool  warnUser,
TQWidget *  parent 
) [static]

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.

Returns:
true if there was conflict (and the user didn't reassign the shortcut)
Parameters:
cutthe shortcut that will be checked for conflicts
warnUserif true, the user will be warned about a conflict and given a chance to reassign the shortcut
parentparent widget for the warning dialog
Since:
3.2

Definition at line 831 of file kkeydialog.cpp.

void KKeyChooser::commitChanges ( )

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

Definition at line 273 of file kkeydialog.cpp.

bool KKeyChooser::insert ( KActionCollection *  pColl)

Insert an action collection, i.e.

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

Definition at line 233 of file kkeydialog.cpp.

bool KKeyChooser::insert ( KActionCollection *  pColl,
const TQString &  title 
)

Insert an action collection, i.e.

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

Parameters:
titlesubtree title of this collection of shortcut.
Since:
3.1

Definition at line 238 of file kkeydialog.cpp.

void KKeyChooser::keyChange ( ) [signal]

Emitted when an action's shortcut has been changed.

void KKeyChooser::listSync ( ) [slot]

Rebuild list entries based on underlying map.

Use this if you changed the underlying map.

Definition at line 662 of file kkeydialog.cpp.

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 285 of file kkeydialog.cpp.

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 647 of file kkeydialog.cpp.


The documentation for this class was generated from the following files:
  • kkeydialog.h
  • kkeydialog.cpp

kdeui

Skip menu "kdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeui

Skip menu "kdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeui by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |