class KPopupMenu

A menu with title items. More...

Definition#include <kpopupmenu.h>
InheritsQPopupMenu (qt) [public ]
Inherited byKAccelMenu
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

KPopupMenu is a class for menus with standard title items. It acts identically to QPopupMenu, with the addition of insertTitle() and changeTitle() methods.

The titles support a text string, an icon, plus user defined gradients, colors, and background pixmaps.

 KPopupMenu (QWidget *parent=0, const char *name=0)

KPopupMenu

Creates a new KPopupMenu.

int  insertTitle (const QString &text, int id=-1, int index=-1)

insertTitle

Inserts a title item with no icon.

int  insertTitle (const QPixmap &icon, const QString &text, int id=-1, int index=-1)

insertTitle

Inserts a title item with the given icon and title.

void  changeTitle (int id, const QString &text)

changeTitle

Changes the title of the item at the specified id. If a icon was previously set it is cleared.

void  changeTitle (int id, const QPixmap &icon, const QString &text)

changeTitle

Changes the title and icon of the title item at the specified id.

QString  title (int id=-1)

title

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.

QPixmap  titlePixmap (int id)

titlePixmap

Returns the icon of the title item at the specified id.

 KPopupMenu (const QString &title, QWidget *parent=0, const char *name=0)

KPopupMenu

Obsolete method provided for backwards compatibility only. Use the normal constructor and insertTitle instead.

void  setTitle (const QString &title)

setTitle

Obsolete method provided for backwards compatibility only. Use insertTitle and changeTitle instead.