Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | Friends

QMenu Class Reference

Search for all occurrences

Detailed Description

Definition at line 68 of file qmenu.h.

#include <qmenu.h>

Inheritance diagram for QMenu:
Inheritance graph
[legend]

List of all members.

Signals

void  aboutToShow ()
void  aboutToHide ()
void  triggered (QAction *action)
void  hovered (QAction *action)

Public Member Functions

  QMenu (QWidget *parent=0)
  QMenu (const QString &title, QWidget *parent=0)
  ~QMenu ()
QAction addAction (const QString &text)
QAction addAction (const QIcon &icon, const QString &text)
QAction addAction (const QString &text, const QObject *receiver, const char *member, const QKeySequence &shortcut=0)
QAction addAction (const QIcon &icon, const QString &text, const QObject *receiver, const char *member, const QKeySequence &shortcut=0)
QAction addMenu (QMenu *menu)
QMenu addMenu (const QString &title)
QMenu addMenu (const QIcon &icon, const QString &title)
QAction addSeparator ()
QAction insertMenu (QAction *before, QMenu *menu)
QAction insertSeparator (QAction *before)
bool  isEmpty () const
void  clear ()
void  setTearOffEnabled (bool)
bool  isTearOffEnabled () const
bool  isTearOffMenuVisible () const
void  hideTearOffMenu ()
void  setDefaultAction (QAction *)
QAction defaultAction () const
void  setActiveAction (QAction *act)
QAction activeAction () const
void  popup (const QPoint &pos, QAction *at=0)
QAction exec ()
QAction exec (const QPoint &pos, QAction *at=0)
QSize  sizeHint () const
QRect  actionGeometry (QAction *) const
QAction actionAt (const QPoint &) const
QAction menuAction () const
QString  title () const
void  setTitle (const QString &title)
QIcon  icon () const
void  setIcon (const QIcon &icon)
void  setNoReplayFor (QWidget *widget)
bool  separatorsCollapsible () const
void  setSeparatorsCollapsible (bool collapse)

Static Public Member Functions

static QAction exec (QList< QAction * > actions, const QPoint &pos, QAction *at=0)
static QAction exec (QList< QAction * > actions, const QPoint &pos, QAction *at, QWidget *parent)

Protected Member Functions

int  columnCount () const
void  changeEvent (QEvent *)
void  keyPressEvent (QKeyEvent *)
void  mouseReleaseEvent (QMouseEvent *)
void  mousePressEvent (QMouseEvent *)
void  mouseMoveEvent (QMouseEvent *)
void  wheelEvent (QWheelEvent *)
void  enterEvent (QEvent *)
void  leaveEvent (QEvent *)
void  hideEvent (QHideEvent *)
void  paintEvent (QPaintEvent *)
void  actionEvent (QActionEvent *)
void  timerEvent (QTimerEvent *)
bool  event (QEvent *)
bool  focusNextPrevChild (bool next)
void  initStyleOption (QStyleOptionMenuItem *option, const QAction *action) const

Properties

bool  tearOffEnabled
QString  title
QIcon  icon
bool  separatorsCollapsible

Friends

class  QMenuBar
class  QMenuBarPrivate
class  QTornOffMenu
class  Q3PopupMenu
class  QComboBox
class  QAction
class  QToolButtonPrivate

Constructor & Destructor Documentation

QMenu ( QWidget parent = 0 ) [explicit]
QMenu ( const QString title,
QWidget parent = 0 
) [explicit]
~QMenu ( )

Member Function Documentation

QAction* addAction ( const QString text )
QAction* addAction ( const QIcon icon,
const QString text 
)
QAction* addAction ( const QString text,
const QObject receiver,
const char *  member,
const QKeySequence shortcut = 0 
)
QAction* addAction ( const QIcon icon,
const QString text,
const QObject receiver,
const char *  member,
const QKeySequence shortcut = 0 
)
QAction* addMenu ( QMenu menu )
QMenu* addMenu ( const QString title )
QMenu* addMenu ( const QIcon icon,
const QString title 
)
QAction* addSeparator ( )
QAction* insertMenu ( QAction before,
QMenu menu 
)
QAction* insertSeparator ( QAction before )
bool isEmpty ( ) const
void clear ( )
void setTearOffEnabled ( bool  )
bool isTearOffEnabled ( ) const
bool isTearOffMenuVisible ( ) const
void hideTearOffMenu ( )
void setDefaultAction ( QAction )
QAction* defaultAction ( ) const
void setActiveAction ( QAction act )
QAction* activeAction ( ) const
void popup ( const QPoint pos,
QAction at = 0 
)
QAction* exec ( )
QAction* exec ( const QPoint pos,
QAction at = 0 
)
static QAction* exec ( QList< QAction * >  actions,
const QPoint pos,
QAction at = 0 
) [static]
static QAction* exec ( QList< QAction * >  actions,
const QPoint pos,
QAction at,
QWidget parent 
) [static]
QSize sizeHint ( ) const [virtual]

Reimplemented from QWidget.

QRect actionGeometry ( QAction ) const
QAction* actionAt ( const QPoint ) const
QAction* menuAction ( ) const
QString title ( ) const
void setTitle ( const QString title )
QIcon icon ( ) const
void setIcon ( const QIcon icon )
void setNoReplayFor ( QWidget widget )
bool separatorsCollapsible ( ) const
void setSeparatorsCollapsible ( bool  collapse )
void aboutToShow ( ) [signal]
void aboutToHide ( ) [signal]
void triggered ( QAction action ) [signal]
void hovered ( QAction action ) [signal]
int columnCount ( ) const [protected]
void changeEvent ( QEvent ) [protected, virtual]

Reimplemented from QWidget.

void keyPressEvent ( QKeyEvent ) [protected, virtual]

Reimplemented from QWidget.

void mouseReleaseEvent ( QMouseEvent ) [protected, virtual]

Reimplemented from QWidget.

void mousePressEvent ( QMouseEvent ) [protected, virtual]

Reimplemented from QWidget.

void mouseMoveEvent ( QMouseEvent ) [protected, virtual]

Reimplemented from QWidget.

void wheelEvent ( QWheelEvent ) [protected, virtual]

Reimplemented from QWidget.

void enterEvent ( QEvent ) [protected, virtual]

Reimplemented from QWidget.

void leaveEvent ( QEvent ) [protected, virtual]

Reimplemented from QWidget.

void hideEvent ( QHideEvent ) [protected, virtual]

Reimplemented from QWidget.

void paintEvent ( QPaintEvent ) [protected, virtual]

Reimplemented from QWidget.

void actionEvent ( QActionEvent ) [protected, virtual]

Reimplemented from QWidget.

void timerEvent ( QTimerEvent ) [protected, virtual]

Reimplemented from QObject.

bool event ( QEvent ) [protected, virtual]

Reimplemented from QWidget.

bool focusNextPrevChild ( bool  next ) [protected, virtual]

Reimplemented from QWidget.

void initStyleOption ( QStyleOptionMenuItem option,
const QAction action 
) const [protected]

Friends And Related Function Documentation

friend class QMenuBar [friend]

Definition at line 189 of file qmenu.h.

friend class QMenuBarPrivate [friend]

Definition at line 407 of file qmenu.h.

friend class QTornOffMenu [friend]

Definition at line 408 of file qmenu.h.

friend class Q3PopupMenu [friend]

Definition at line 409 of file qmenu.h.

friend class QComboBox [friend]

Definition at line 410 of file qmenu.h.

friend class QAction [friend]

Definition at line 411 of file qmenu.h.

friend class QToolButtonPrivate [friend]

Definition at line 412 of file qmenu.h.


Property Documentation

bool tearOffEnabled [read, write]

Definition at line 74 of file qmenu.h.

QString title [read, write]

Definition at line 75 of file qmenu.h.

QIcon icon [read, write]

Definition at line 76 of file qmenu.h.

bool separatorsCollapsible [read, write]

Definition at line 77 of file qmenu.h.


The documentation for this class was generated from the following file:

QMenu QMenu QMenu QMenu QMenu QMenu QMenu QMenu QMenu QMenu
QMenu QMenu QMenu QMenu QMenu QMenu QMenu QMenu QMenu QMenu