QMenuData Class Reference
The QMenuData class is a base class for QMenuBar and QPopupMenu.
(details)
(complete member list)
#include <qmenudta.h>
Inherited by QMenuBar and QPopupMenu.
Public Members
- QMenuData ()
- virtual ~QMenuData ()
- int count () const
- void insertItem (const char* string, int id=-1, int index=-1)
- void insertItem (const char* string, QPopupMenu* popup, int id=-1, int index=-1)
- void insertItem (const QPixmap& pixmap, int id=-1, int index=-1)
- void insertItem (const QPixmap& pixmap, QPopupMenu* popup, int id=-1, int index=-1)
- void insertSeparator (int index=-1)
- void removeItem (int id)
- void removeItemAt (int index)
- void clear ()
- long accel (int id) const
- void setAccel (long key, int id)
- const char* string (int id) const
- QPixmap* pixmap (int id) const
- void changeItem (const char* string, int id)
- void changeItem (const QPixmap& pixmap, int id)
- bool isItemDisabled (int id) const
- bool isItemEnabled (int id) const
- void setItemEnabled (int id, bool enable)
- void enableItem (int id)
- void disableItem (int id)
- bool isItemChecked (int id) const
- void setItemChecked (int id, bool check)
- void checkItem (int id)
- void uncheckItem (int id)
- virtual void updateItem (int id)
- int indexOf (int id) const
- int idAt (int index) const
- void setId (int index, int id)
- bool connectItem (int id, const QObject* receiver, const char* member)
- bool disconnectItem (int id, const QObject* receiver, const char* member)
- QMenuItem* findItem (int id) const
Protected Members
- virtual void menuContentsChanged ()
- virtual void menuStateChanged ()
- virtual void menuInsPopup (QPopupMenu*)
- virtual void menuDelPopup (QPopupMenu*)
The QMenuData class is a base class for QMenuBar and QPopupMenu.
QMenuData has an internal list of menu items. A menu item is a text
or a pixmap in a menu. The menu item sends out an activated() signal
when it is selected, and a highlighted() signal when it receives the
user input focus.
Menu items can be accessed through identifiers.
Member Function Documentation
Constructs an empty list.
Removes all menu items and disconnects any signals that have been connected.
Changes the text of the menu item id.
Changes the pixmap of the menu item id.
Connects a menu item to a receiver and a slot or signal.
The receiver will be notified when the menu item is activated.
Returns the number of items in the menu.
Disconnects a receiver/member from a menu item.
All connections are removed when the menu data object is destroyed.
void QMenuData::insertItem (const char *string, int id=-1, int index=-1)
Inserts a menu item with a text.
Inserts a menu item with a text and a sub menu.
Inserts a menu item with a pixmap.
Inserts a menu item with a pixmap and a sub menu.
Returns TRUE if the menu item has been checked.
Returns TRUE if the item is disabled.
Removes the menu item which has the identifier id.
Checks a menu item if check is TRUE, or unchecks it if check is
FALSE.
Enables the menu item if enable is TRUE, or disables the item if
enable is FALSE.
This file is part of the Qt toolkit,
copyright 1995
Troll Tech, all rights reserved.
It was generated from the following files:
- qmenudta.h: 1995/05/11
- qmenudta.cpp: 1995/05/11
Generated at 04:27, 1995/05/20 by the webmaster at Troll Tech