class KGlobalAccel


Definition#include <kglobalaccel.h>
InheritsQObject
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals

Protected Members

KGlobalAccel ( bool _do_not_grab = false)

Creates a KGlobalAccel object.

KGlobalAccel (QWidget * parent, const char *name = 0, bool _do_not_grab = false)

Creates a KGlobalAccel object with a parent and a name. The parent has the only effect that the KGlobalAccel object will be automatically destroyed in the parent's destructor, thus releaseing the keys.

~KGlobalAccel ()

Destroys the accelerator object.and ungrabs any allocated key bindings.

void clear ()

Removes all accelerator items.

void connectItem ( const QString& action, const QObject* receiver, const char *member, bool activate = true )

Connect an accelerator item to a slot/signal in another object.

Arguments:

Parameters:
actionis the accelerator item action name.
receiveris the object to receive a signal
memberis a slot or signal in the receiver
activateindicates whether the accelrator item should be enabled immediately

uint count ()
[const]

Returns the number of accelerator items.

uint currentKey ( const QString& action )
[const]

Returns the key code of the accelerator item with the action name action, or zero if either the action name cannot be found or the current key is set to no key.

uint defaultKey ( const QString& action)
[const]

Returns the default key code of the accelerator item with the action name action, or zero if the action name cannot be found.

void disconnectItem ( const QString& action, const QObject* receiver, const char *member )

Disconnects an accelerator item from a function in another object.

QString findKey ( int key )
[const]

Returns that identifier of the accelerator item with the keycode key, or zero if the item cannot be found.

bool grabKey (uint keysym, uint mod)

Attempts to make a passive X server grab of the key specified by key symbol keysym and modifier mod. Returns false if unsuccessful.

Modifications with num lock and caps lock are also grabbed.

bool insertItem ( const QString& descr, const QString& action, uint defaultKeyCode, bool configurable = true )

Inserts an accelerator item and returns false if the key code defaultKeyCode is not valid.

Arguments:

If an action already exists the old association and connections will be removed..

Parameters:
actionis the accelerator item action name.
defaultKeyCodeis a key code to be used as the default for the action.
configurableindicates whether a user can configure the key binding using the KKeyChooser GUI and whether the key will be written back to configuration files on calling writeSettings.

bool insertItem ( const QString& descr, const QString& action, const QString& defaultKeyCode, bool configurable = true )

Inserts an accelerator item and returns false if the key code defaultKeyCode is not valid.

Arguments:

If an action already exists the old association and connections will be removed..

Parameters:
actionis the accelerator item action name.
defaultKeyCodeis a key plus a combination of SHIFT, CTRL and ALT to be used as the default for the action.
configurableindicates whether a user can configure the key binding using the KKeyChooser GUI and whether the key will be written back to configuration files on calling writeSettings.

QDict<KKeyEntry> keyDict ()

Returns the dictionary of accelerator action names and KKeyEntry objects. Note that only a shallow copy is returned so that items will be lost when the KKeyEntry objects are deleted.

void readSettings ()

Reads all key associations from the application's configuration files.

void removeItem ( const QString& action )

Removes the accelerator item with the action name action.

void setEnabled ( bool activate )

Enables the accelerator if activate is true, or disables it if activate is false...

Individual keys can also be enabled or disabled.

void setItemEnabled ( const QString& action, bool activate )

Enables or disables an accelerator item.

Arguments:

Parameters:
actionis the accelerator item action name.
activatespecifies whether the item should be enabled or disabled.

bool setKeyDict ( QDict<KKeyEntry> nKeyDict )

Sets the dictionary of accelerator action names and KKeyEntry objects to nKeyDict.. Note that only a shallow copy is made so that items will be lost when the KKeyEntry objects are deleted.

bool ungrabKey (uint keysym, uint mod)

Ungrabs the key specified by key symbol keysym and modifier mod. Returns false if unsuccessful.

Modifications with num lock and caps lock are also ungrabbed.

void writeSettings ()

Writes the current configurable associations to the application's configuration files

bool x11EventFilter (const XEvent *)

Filters X11 events ev for key bindings in the accelerator dictionary. If a match is found the activated activated is emitted and the function returns true. Return false if the event is not processed.

This is public for compatibility only. You do not need to call it.


Generated by: root@tantive.terraplex.com on Sun Feb 27 17:39:19 2000, using kdoc 2.0a33.