.TH "KPopupMenu" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KPopupMenu \- KPopupMenu is a class for menus with standard title items and keyboard accessibility for popups with many options and/or varying options. A menu with title items.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kpopupmenu.h>\fP
.PP
Inherits \fBQPopupMenu\fP.
.PP
Inherited by \fBKPanelMenu\fP, and KWindowListMenu.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKPopupMenu\fP (\fBQWidget\fP *parent=0, const  char *name=0)"
.br
.RI "\fIConstructs a KPopupMenu. \fP"
.ti -1c
.RI "\fB~KPopupMenu\fP ()"
.br
.RI "\fIDestructs the object. \fP"
.ti -1c
.RI "int \fBinsertTitle\fP (const  \fBQString\fP &\fBtext\fP, int id=-1, int index=-1)"
.br
.RI "\fIInserts a title item with no icon. \fP"
.ti -1c
.RI "int \fBinsertTitle\fP (const  \fBQPixmap\fP &icon, const  \fBQString\fP &\fBtext\fP, int id=-1, int index=-1)"
.br
.RI "\fIInserts a title item with the given icon and title. \fP"
.ti -1c
.RI "void \fBchangeTitle\fP (int id, const  \fBQString\fP &\fBtext\fP)"
.br
.RI "\fIChanges the title of the item at the specified id. \fP"
.ti -1c
.RI "void \fBchangeTitle\fP (int id, const  \fBQPixmap\fP &icon, const  \fBQString\fP &\fBtext\fP)"
.br
.RI "\fIChanges the title and icon of the title item at the specified id. \fP"
.ti -1c
.RI "\fBQString\fP \fBtitle\fP (int id=-1) const "
.br
.RI "\fIReturns the title of the title item at the specified id. \fP"
.ti -1c
.RI "\fBQPixmap\fP \fBtitlePixmap\fP (int id) const "
.br
.RI "\fIReturns the icon of the title item at the specified id. \fP"
.ti -1c
.RI "void \fBsetKeyboardShortcutsEnabled\fP (bool enable)"
.br
.RI "\fIEnables keyboard navigation by searching for the entered key sequence. \fP"
.ti -1c
.RI "void \fBsetKeyboardShortcutsExecute\fP (bool enable)"
.br
.RI "\fIEnables execution of the menu item once it is uniquely specified. \fP"
.ti -1c
.RI "\fBKPopupMenu\fP (const  \fBQString\fP &title, \fBQWidget\fP *parent=0, const  char *name=0)"
.br
.RI "\fIObsolete method provided for backwards compatibility only. \fP"
.ti -1c
.RI "void \fBsetTitle\fP (const  \fBQString\fP &title)"
.br
.RI "\fIObsolete method provided for backwards compatibility only. \fP"
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "\fBQString\fP \fBunderlineText\fP (const  \fBQString\fP &\fBtext\fP, uint length)"
.br
.RI "\fI\fBSince:\fP
.RS 4
3.1 
.RE
.PP
\fP"
.ti -1c
.RI "void \fBresetKeyboardVars\fP (bool noMatches=false)"
.br
.RI "\fI\fBSince:\fP
.RS 4
3.1 
.RE
.PP
\fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBcloseEvent\fP (\fBQCloseEvent\fP *)"
.br
.RI "\fIThis is re-implemented for keyboard navigation. \fP"
.ti -1c
.RI "virtual void \fBkeyPressEvent\fP (\fBQKeyEvent\fP *\fBe\fP)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
KPopupMenu is a class for menus with standard title items and keyboard accessibility for popups with many options and/or varying options. A menu with title items. 

It acts identically to \fBQPopupMenu\fP, with the addition of \fBinsertTitle()\fP, \fBchangeTitle()\fP, \fBsetKeyboardShortcutsEnabled()\fP and \fBsetKeyboardShortcutsExecute()\fP methods.
.PP
The titles support a text string, an icon, plus user defined gradients, colors, and background pixmaps.
.PP
The keyboard search algorithm is incremental with additional underlining for user feedback.
.PP
\fBAuthor:\fP
.RS 4
Daniel M. Duley <mosfet@kde.org> 
.PP
Hamish Rodda <meddie@yoyo.its.monash.edu.au> 
.RE
.PP

.PP
Definition at line 116 of file kpopupmenu.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KPopupMenu::KPopupMenu (\fBQWidget\fP * parent = 0, const char * name = 0)"
.PP
Constructs a KPopupMenu. Definition at line 223 of file kpopupmenu.cpp.
.PP
References KStdAccel::name(), and resetKeyboardVars().
.SS "KPopupMenu::~\fBKPopupMenu\fP ()"
.PP
Destructs the object. Definition at line 231 of file kpopupmenu.cpp.
.SS "KPopupMenu::KPopupMenu (const \fBQString\fP & title, \fBQWidget\fP * parent = 0, const char * name = 0)"
.PP
Obsolete method provided for backwards compatibility only. Use the normal constructor and insertTitle instead. Definition at line 515 of file kpopupmenu.cpp.
.PP
References KStdAccel::name(), and setTitle().
.SH "Member Function Documentation"
.PP 
.SS "int KPopupMenu::insertTitle (const \fBQString\fP & text, int id = -1, int index = -1)"
.PP
Inserts a title item with no icon. Definition at line 236 of file kpopupmenu.cpp.
.PP
References QPopupMenu::insertItem(), QPopupMenu::setItemEnabled(), and KPopupTitle::setTitle().
.PP
Referenced by KSystemTray::KSystemTray().
.SS "int KPopupMenu::insertTitle (const \fBQPixmap\fP & icon, const \fBQString\fP & text, int id = -1, int index = -1)"
.PP
Inserts a title item with the given icon and title. Definition at line 245 of file kpopupmenu.cpp.
.PP
References QPopupMenu::insertItem(), QPopupMenu::setItemEnabled(), and KPopupTitle::setTitle().
.SS "void KPopupMenu::changeTitle (int id, const \fBQString\fP & text)"
.PP
Changes the title of the item at the specified id. If a icon was previously set it is cleared. Definition at line 255 of file kpopupmenu.cpp.
.SS "void KPopupMenu::changeTitle (int id, const \fBQPixmap\fP & icon, const \fBQString\fP & text)"
.PP
Changes the title and icon of the title item at the specified id. Definition at line 268 of file kpopupmenu.cpp.
.SS "\fBQString\fP KPopupMenu::title (int id = -1) const"
.PP
Returns the title of the title item at the specified id. The default id of -1 is for backwards compatibility only, you should always specify the id. Definition at line 281 of file kpopupmenu.cpp.
.SS "\fBQPixmap\fP KPopupMenu::titlePixmap (int id) const"
.PP
Returns the icon of the title item at the specified id. Definition at line 297 of file kpopupmenu.cpp.
.SS "void KPopupMenu::setKeyboardShortcutsEnabled (bool enable)"
.PP
Enables keyboard navigation by searching for the entered key sequence. Also underlines the currently selected item, providing feedback on the search.
.PP
Defaults to off.
.PP
WARNING: calls to \fBtext()\fP of currently keyboard-selected items will contain additional ampersand characters.
.PP
WARNING: 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. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 501 of file kpopupmenu.cpp.
.PP
Referenced by KPanelMenu::init().
.SS "void KPopupMenu::setKeyboardShortcutsExecute (bool enable)"
.PP
Enables execution of the menu item once it is uniquely specified. Defaults to off. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 506 of file kpopupmenu.cpp.
.SS "void KPopupMenu::setTitle (const \fBQString\fP & title)"
.PP
Obsolete method provided for backwards compatibility only. Use insertTitle and changeTitle instead. Definition at line 523 of file kpopupmenu.cpp.
.PP
References QPopupMenu::insertItem(), and KPopupTitle::setTitle().
.PP
Referenced by KPopupMenu().
.SS "void KPopupMenu::closeEvent (\fBQCloseEvent\fP * e)\fC [protected, virtual]\fP"
.PP
This is re-implemented for keyboard navigation. Definition at line 315 of file kpopupmenu.cpp.
.PP
References resetKeyboardVars().
.SS "\fBQString\fP KPopupMenu::underlineText (const \fBQString\fP & text, uint length)\fC [protected, slot]\fP"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 476 of file kpopupmenu.cpp.
.PP
References QString::insert().
.SS "void KPopupMenu::resetKeyboardVars (bool noMatches = false)\fC [protected, slot]\fP"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 486 of file kpopupmenu.cpp.
.PP
References QPopupMenu::changeItem(), and QPopupMenu::idAt().
.PP
Referenced by closeEvent(), and KPopupMenu().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
