class KMenu |
|
|
These global convenience functions (that come with a varying number of template arguments) are a replacement for the RESTORE macro provided in earlier versions of KDE. The old RESTORE macro is still provided for backwards compatibility. See KMainWindow documentation for more. A menu with keyboard searching KMenu is a class for menus with keyboard accessibility for popups with many options and/or varying options. It acts identically to QMenu, with the addition of setKeyboardShortcutsEnabled() and setKeyboardShortcutsExecute() methods. The keyboard search algorithm is incremental with additional underlining for user feedback.
Author Daniel M. Duley |
|
Constructs a KMenu. |
|
Constructs a KMenu. title - The text displayed in a parent menu when it is inserted into another menu as a submenu. parent - the parent QWidget object |
|
connect to this signal to be notified when a context menu is about to be shown menu - The menu that the context menu is about to be shown for menuAction - The action that the context menu is currently on ctxMenu - The context menu itself |
|
Inserts a title item with no icon. |
|
Inserts a title item with the given icon and title. |
|
|
Returns the context menu associated with this menu The data property of all actions inserted into the context menu is modified all the time to point to the action and menu it has been shown for |
|
|
Returns the KMenu associated with the current context menu |
|
returns the QAction associated with the current context menu |
|
|
Hides the context menu if shown |
|
|
|
Return the state of the keyboard modifiers when the last menuitem was activated. |
|
Return the state of the mouse buttons when the last menuitem was activated. |
|
|
|
Enables keyboard navigation by searching for the entered key sequence. Also underlines the currently selected item, providing feedback on the search. Defaults to off. calls to text() of currently keyboard-selected items will contain additional ampersand characters. though pre-existing keyboard shortcuts will not interfere with the operation of this feature, they may be confusing to the user as the existing shortcuts will not work. In addition, where text already contains ampersands, the underline produced is likely to confuse the user (as this feature uses underlining of text to indicate the current key selection sequence). |
|
Enables execution of the menu item once it is uniquely specified. Defaults to off. |