|
|
Simplify the use of KAccel and KKeyDialog with menus.
It also provides for the changing of menu item shortcuts by typing the key when the menu item is selected.
The exact method of setting shortcuts is the subject of some debate, currently the ' key will put up a message indicating the next key hit will change the shortcut. The Delete key removes the accelerator associated with the menu item.
Previously: The quote key was required only for keys that are used for menu accelerators.
keys = new KAccel(this); filemenu = new KAccelMenu(keys); filemenu->insItem(i18n("&Open"), "&Open", kp ,SLOT(fileOpen()), KStdAccel::Open); filemenu->insItem(i18n("Open &URL"), "Open &URL", kp, SLOT(fileOpenUrl()), "CTRL+X"); keys->readSettings(); |
Calling the KKeyDialog:
KKeyDialog::configureKeys( keys ); |
On exit you need:
keys->writeSettings(); |
|
KAccelMenu constructor.
Parameters:
~ |
Destructor.
int |
Insert a menu item with accelerator.
Parameters:
Returns: Id of the menu item.
int |
Insert a menu item with accelerator.
Parameters:
Returns: Id of the menu item.
int |
Insert a menu item with a standard accelerator
Parameters:
Returns: Id of the menu item.
int |
Insert a menu item with a standard accelerator
Parameters:
Returns: Id of the menu item.
char * |
[protected]
void |
[protected]
void |
[protected]
KAccel * |
[protected]
int |
[protected]
QIntDict<char> |
[protected]
bool |
[protected]
void |
[protected slot]
void |
[protected slot]
Generated by: baudens@ke.mandrakesoft.com on Thu Oct 26 17:36:26 2000, using kdoc 2.0a40. |