KContextMenuManager Class Reference
Convenience class to mangage context menus. More...
#include <kcmenumngr.h>
Inheritance diagram for KContextMenuManager:

Static Public Member Functions | |
void | insert (QWidget *widget, QPopupMenu *popup) |
bool | showOnButtonPress (void) |
Detailed Description
Convenience class to mangage context menus.
- Author:
- Matthias Ettrich <ettrich@kde.org>
- Version:
- Id
- kcmenumngr.h,v 1.11 2003/08/16 19:45:01 coolo Exp
Example:
#include <kcmenumngr.h> ... 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:
The key can be configured with the standard keys module in the KDE control center.[Keys] ... PopupContextMenu=Menu ...
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() ).
Definition at line 77 of file kcmenumngr.h.
Member Function Documentation
|
Makes Ownership of the popup menu is not transferred to the context menu manager. Definition at line 57 of file kcmenumngr.cpp. References QObject::connect(), QObject::destroyed(), QPtrDict< QPopupMenu >::insert(), insert(), and menus. Referenced by insert(). |
|
Use this method to get information about when a popup menu should be activated. This can be useful if the popup menu is to be activated from a listview.
Definition at line 49 of file kcmenumngr.cpp. References showOnPress. |
The documentation for this class was generated from the following files: