QMenuBar Class Reference


The QMenuBar class provides a horizontal menu bar. More...

#include <qmenubar.h>

Inherits QFrame and QMenuData.

List of all member functions.

Public Members

Signals

Protected Members


Detailed Description

The QMenuBar class provides a horizontal menu bar.

It automatically sets its own geometry to the top of the parent widget and changes appropriately it when the parent widget is resized.

menu/menu.cpp is a typical example of QMenuBar and QPopupMenu use.

See also: QPopupMenu.

Examples: menu/menu.cpp


Member Function Documentation

QMenuBar::QMenuBar ( QWidget *parent=0, const char *name=0)

Creates a menu bar with a parent and a name.

QMenuBar::~QMenuBar ()

Destroys the menu bar.

void QMenuBar::drawContents ( QPainter *p) [virtual protected]

Called from QFrame::paintEvent().

Reimplemented from QFrame.

bool QMenuBar::eventFilter ( QObject *object, QEvent *event) [virtual]

This function is used to adjust the menu bar's geometry to the parent widget's. Note that this is not part of the public interface - the function is public only because QObject::eventFilter() is.

Reimplemented from QObject.

void QMenuBar::fontChange ( const QFont &) [virtual protected]

For internal use only.

Reimplemented from QWidget.

void QMenuBar::hide () [virtual]

Reimplements QWidget::hide() in order to deselect any selected item.

Reimplemented from QWidget.

void QMenuBar::keyPressEvent ( QKeyEvent *e) [virtual protected]

Handles key press events for the menu bar.

Reimplemented from QWidget.

void QMenuBar::menuContentsChanged () [virtual protected]

Recomputes the menu bar's display data according to the new contents.

You should never need to call this, it is called automatically by QMenuData whenever it needs to be called.

Reimplemented from QMenuData.

void QMenuBar::menuStateChanged () [virtual protected]

Recomputes the menu bar's display data according to the new state.

You should never need to call this, it is called automatically by QMenuData whenever it needs to be called.

Reimplemented from QMenuData.

void QMenuBar::mouseMoveEvent ( QMouseEvent *e) [virtual protected]

Handles mouse move events for the menu bar.

Reimplemented from QWidget.

void QMenuBar::mousePressEvent ( QMouseEvent *e) [virtual protected]

Handles mouse press events for the menu bar.

Reimplemented from QWidget.

void QMenuBar::mouseReleaseEvent ( QMouseEvent *e) [virtual protected]

Handles mouse release events for the menu bar.

Reimplemented from QWidget.

void QMenuBar::resizeEvent ( QResizeEvent *e) [virtual protected]

Handles resize events for the menu bar.

Reimplemented from QWidget.

void QMenuBar::show () [virtual]

Reimplements QWidget::show() in order to set up the correct keyboard accelerators and raise itself to the top of the widget stack.

Reimplemented from QWidget.

void QMenuBar::updateItem ( int) [virtual]

For internal use only.

Reimplemented from QMenuData.


This file is part of the Qt toolkit, copyright © 1995-97 Troll Tech, all rights reserved.

It was generated from the following files:


Generated at 17:29, 1997/04/07 for Qt version 1.2 by the webmaster at Troll Tech