#include <qaccel.h>
Inherits QObject.
CTRL + Key_P
could be a shortcut for printing a
document. The key codes are listed in qkeycode.h.
When pressed, an accelerator key sends out the signal activated() with a number that identifies this particular accelerator item. Accelerator items can also be individually connected, so that two different keys will activate two different slots (see connectItem()).
A QAccel object handles key events to its parent widget and all children of this parent widget.
Creates a QAccel object with a parent widget and a name.
Destroys the accelerator object.
Removes all accelerator items.
Connects an accelerator item to a function in another object.
Arguments:
a->connectItem( 201, mainView, SLOT(quit()) );
Returns the number of accelerator items.
Disables the accelerator. Individual keys cannot be enabled in this mode.
Disables the accelerator items with the identifier id.
Disconnects an accelerator item from a function in another object.
See also: connectItem().
Enables the accelerator. The accelerator is initially enabled. Individual keys can be enabled/disabled with the setItemEnabled(), enableItem() and disableItem() functions.
Enables the accelerator items with the identifier id.
Returns the identifier of the accelerator item with the key code key, or -1 if the item cannot be found.
Inserts an accelerator item.
Arguments:
QAccel *a = new QAccel( mainView ); // mainView is a top level widget
a->insertItem( Key_P | CTRL, 200 ); // Ctrl+P to print document
a->insertItem( Key_X | ALT , 201 ); // Alt+X to quit
a->insertItem( Key_D ); // gets id 2
a->insertItem( Key_P | CTRL | SHIFT ); // gets id 3
Returns TRUE if the accelerator is disabled.
Returns TRUE if the accelerator items with the identifier id is disabled. Returns FALSE if the item is enabled or cannot be found.
Returns TRUE if the accelerator items with the identifier id is enabled. Returns FALSE if the item is disabled or cannot be found.
Returns the key code of the accelerator item with the identifier id, or zero if the id cannot be found.
Removes the accelerator item with the identifier id.
Enables or disables an accelerator item.
Arguments:
This file is part of the Qt toolkit, copyright 1995 Troll Tech, all rights reserved.
It was generated from the following files: