org.kde.koala
public class KContextMenuManager extends QObject
KContextMenuManager.insert( myWidget, myPopupMenu );Context menus are invoked with either a special shortcut key (usually the menu key) or the right mouse button. Menus are configurable in the [ContextMenus] group of the application's configuration file, usually in kdeglobals:
[ContextMenus] ShowOnPress=true|false
ShowOnPress
defines whether the menu shall be shown on mouse
press or on mouse release.
The shortcut key to invoke the context menu is defined in the standard
[Keys] section of the application configuration:
[Keys] ... PopupContextMenu=Menu ...The key can be configured with the standard keys module in the KDE control center. If the popup menu is invoked with the keyboard shortcut, it's shown at the position of the micro focus hint of the widget ( QWidget.microFocusHint() ).
UNKNOWN: Convenience class to mangage context menus.
Constructor Summary | |
---|---|
protected | KContextMenuManager(Class dummy) |
Method Summary | |
---|---|
String | className() |
static void | insert(QWidget widget, QPopupMenu popup)
Makes popup a context popup menu for widget widget.
Ownership of the popup menu is not transferred to the context
menu manager. |
QMetaObject | metaObject() |
static boolean | showOnButtonPress()
Use this method to get information about when a popup menu
should be activated. |
popup
a context popup menu for widget widget.
Ownership of the popup menu is not transferred to the context
menu manager.UNKNOWN: Makes popup
a context popup menu for widget widget.
Returns: true if the menu should be made visible on a button press or false after a button press-release sequence.
UNKNOWN: Use this method to get information about when a popup menu should be activated.