⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qmenudata.3qt

📁 tmark1.11:用于生成QT/EMBEDDED应用工程的Markfile文件
💻 3QT
📖 第 1 页 / 共 2 页
字号:
.TH QMenuData 3qt "6 July 1999" "Troll Tech AS" \" -*- nroff -*-.\" Copyright 1992-1999 Troll Tech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQMenuData \- Base class for QMenuBar and QPopupMenu.SH SYNOPSIS.br.PP\fC#include <qmenudata.h>\fR.PPInherited by QMenuBar and QPopupMenu..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQMenuData\fR ()".br.ti -1c.BI "virtual \fB~QMenuData\fR ()".br.ti -1c.BI "uint \fBcount\fR () const".br.ti -1c.BI "int \fBinsertItem\fR ( const QString & " "text" ", const QObject * " "receiver" ", const char * " "member" ", int " "accel" " = 0, int " "id" " = -1, int " "index" " = -1 )".br.ti -1c.BI "int \fBinsertItem\fR ( const QIconSet & " "icon" ", const QString & " "text" ", const QObject * " "receiver" ", const char * " "member" ", int " "accel" " = 0, int " "id" " = -1, int " "index" " = -1 )".br.ti -1c.BI "int \fBinsertItem\fR ( const QPixmap & " "pixmap" ", const QObject * " "receiver" ", const char * " "member" ", int " "accel" " = 0, int " "id" " = -1, int " "index" " = -1 )".br.ti -1c.BI "int \fBinsertItem\fR ( const QIconSet & " "icon" ", const QPixmap & " "pixmap" ", const QObject * " "receiver" ", const char * " "member" ", int " "accel" " = 0, int " "id" " = -1, int " "index" " = -1 )".br.ti -1c.BI "int \fBinsertItem\fR ( const QString & " "text" ", int " "id" "=-1, int " "index" "=-1 )".br.ti -1c.BI "int \fBinsertItem\fR ( const QIconSet & " "icon" ", const QString & " "text" ", int " "id" "=-1, int " "index" "=-1 )".br.ti -1c.BI "int \fBinsertItem\fR ( const QString & " "text" ", QPopupMenu * " "popup" ", int " "id" "=-1, int " "index" "=-1 )".br.ti -1c.BI "int \fBinsertItem\fR ( const QIconSet & " "icon" ", const QString & " "text" ", QPopupMenu * " "popup" ", int " "id" "=-1, int " "index" "=-1 )".br.ti -1c.BI "int \fBinsertItem\fR ( const QPixmap & " "pixmap" ", int " "id" "=-1, int " "index" "=-1 )".br.ti -1c.BI "int \fBinsertItem\fR ( const QIconSet & " "icon" ", const QPixmap & " "pixmap" ", int " "id" "=-1, int " "index" "=-1 )".br.ti -1c.BI "int \fBinsertItem\fR ( const QPixmap & " "pixmap" ", QPopupMenu * " "popup" ", int " "id" "=-1, int " "index" "=-1 )".br.ti -1c.BI "int \fBinsertItem\fR ( const QIconSet & " "icon" ", const QPixmap & " "pixmap" ", QPopupMenu * " "popup" ", int " "id" "=-1, int " "index" "=-1 )".br.ti -1c.BI "void \fBinsertSeparator\fR ( int " "index" "=-1 )".br.ti -1c.BI "void \fBremoveItem\fR ( int id )".br.ti -1c.BI "void \fBremoveItemAt\fR ( int index )".br.ti -1c.BI "void \fBclear\fR ()".br.ti -1c.BI "int \fBaccel\fR ( int id ) const".br.ti -1c.BI "void \fBsetAccel\fR ( int " "key" ", int id )".br.ti -1c.BI "QIconSet* \fBiconSet\fR ( int id ) const".br.ti -1c.BI "QString \fBtext\fR ( int id ) const".br.ti -1c.BI "QPixmap* \fBpixmap\fR ( int id ) const".br.ti -1c.BI "void \fBsetWhatsThis\fR ( int " "id" ", const QString & )".br.ti -1c.BI "QString \fBwhatsThis\fR ( int id ) const".br.ti -1c.BI "void \fBchangeItem\fR ( int " "id" ", const QString & text )".br.ti -1c.BI "void \fBchangeItem\fR ( int " "id" ", const QPixmap & pixmap )".br.ti -1c.BI "void \fBchangeItem\fR ( int " "id" ", const QIconSet & " "icon" ", const QString & text )".br.ti -1c.BI "void \fBchangeItem\fR ( int " "id" ", const QIconSet & " "icon" ", const QPixmap & pixmap )".br.ti -1c.BI "void \fBchangeItem\fR ( const QString & " "text" ", int id )".br.ti -1c.BI "void \fBchangeItem\fR ( const QPixmap & " "pixmap" ", int id )".br.ti -1c.BI "void \fBchangeItem\fR ( const QIconSet & " "icon" ", const QString & " "text" ", int id )".br.ti -1c.BI "bool \fBisItemEnabled\fR ( int id ) const".br.ti -1c.BI "void \fBsetItemEnabled\fR ( int " "id" ", bool enable )".br.ti -1c.BI "bool \fBisItemChecked\fR ( int id ) const".br.ti -1c.BI "void \fBsetItemChecked\fR ( int " "id" ", bool check )".br.ti -1c.BI "virtual void \fBupdateItem\fR ( int id )".br.ti -1c.BI "int \fBindexOf\fR ( int id ) const".br.ti -1c.BI "int \fBidAt\fR ( int index ) const".br.ti -1c.BI "virtual void \fBsetId\fR ( int " "index" ", int id )".br.ti -1c.BI "bool \fBconnectItem\fR ( int " "id" ", const QObject * " "receiver" ", const char * member )".br.ti -1c.BI "bool \fBdisconnectItem\fR ( int " "id" ", const QObject * " "receiver" ", const char * member )".br.ti -1c.BI "QMenuItem* \fBfindItem\fR ( int id ) const".br.ti -1c.BI "QMenuItem* \fBfindItem\fR ( int " "id" ", QMenuData ** parent ) const".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual void \fBmenuContentsChanged\fR ()".br.ti -1c.BI "virtual void \fBmenuStateChanged\fR ()".br.ti -1c.BI "virtual void \fBmenuInsPopup\fR ( QPopupMenu * )".br.ti -1c.BI "virtual void \fBmenuDelPopup\fR ( QPopupMenu * )".br.ti -1c.BI "QMenuItem* \fBfindPopup\fR ( QPopupMenu *, int * " "index" " = 0 )".br.in -1c.SH DESCRIPTIONThe QMenuData class is a base class for QMenuBar and QPopupMenu..PPQMenuData has an internal list of menu items. A menu item is a text, pixmap or a separator, and may also have a popup menu (separators have no popup menus)..PPThe menu item sends out an activated() signal when it is selected, and a highlighted() signal when it receives the user input focus..PPMenu items can be accessed through identifiers..PPSee also: QAccel..SH MEMBER FUNCTION DOCUMENTATION.SH "QMenuData::QMenuData ()"Constructs an empty list..SH "QMenuData::~QMenuData () \fC[virtual]\fR"Removes all menu items and disconnects any signals that have been connected..SH "int QMenuData::accel ( int id ) const"Returns the accelerator key that has been defined for the menu item \fIid,\fR or 0 if it has no accelerator key..PPSee also: setAccel(), QAccel and qnamespace.h..SH "void QMenuData::changeItem ( const QIconSet & icon, const QString & text, int id )"\fBThis function is obsolete.\fR It is provided to keep old programs working. We strongly advise against using it in new code..PPChanges the icon and text of the menu item \fIid.\fR.PPSee also: pixmap()..SH "void QMenuData::changeItem ( const QPixmap & pixmap, int id )"\fBThis function is obsolete.\fR It is provided to keep old programs working. We strongly advise against using it in new code..PPChanges the pixmap of the menu item \fIid.\fR If the item has an icon, the icon remains unchanged..PPSee also: pixmap()..SH "void QMenuData::changeItem ( const QString & text, int id )"\fBThis function is obsolete.\fR It is provided to keep old programs working. We strongly advise against using it in new code..PPChanges the text of the menu item \fIid.\fR If the item has an icon, the icon remains unchanged..PPSee also: text()..SH "void QMenuData::changeItem ( int id, const QIconSet & icon, const QPixmap & pixmap )"Changes the icon and pixmap of the menu item \fIid.\fR.PPSee also: pixmap()..SH "void QMenuData::changeItem ( int id, const QIconSet & icon, const QString & text )"Changes the icon and text of the menu item \fIid.\fR.PPSee also: pixmap()..SH "void QMenuData::changeItem ( int id, const QPixmap & pixmap )"Changes the pixmap of the menu item \fIid.\fR If the item has an icon, the icon remains unchanged..PPSee also: pixmap()..SH "void QMenuData::changeItem ( int id, const QString & text )"Changes the text of the menu item \fIid.\fR If the item has an icon, the icon remains unchanged..PPSee also: text()..SH "void QMenuData::clear ()"Removes all menu items..PPSee also: removeItem() and removeItemAt()..SH "bool QMenuData::connectItem ( int id, const QObject * receiver, const char * member )"Connects a menu item to a receiver and a slot or signal..PPThe receiver's slot/signal is activated when the menu item is activated..SH "uint QMenuData::count () const"Returns the number of items in the menu..SH "bool QMenuData::disconnectItem ( int id, const QObject * receiver, const char * member )"Disconnects a receiver/member from a menu item..PPAll connections are removed when the menu data object is destroyed..SH "QMenuItem * QMenuData::findItem ( int id ) const"Returns a pointer to the menu item with identifier \fIid,\fR or 0 if there is no item with such an identifier..PPSee also: indexOf()..SH "QMenuItem * QMenuData::findItem ( int id, QMenuData ** parent ) const"Returns a pointer to the menu item with identifier \fIid,\fR or 0 if there is no item with such an identifier, and changes \fIparent\fR to point to the parent of the return value..PPSee also: indexOf()..SH "QMenuItem * QMenuData::findPopup ( QPopupMenu * popup, int * index = 0 ) \fC[protected]\fR"Internal function that finds the menu item where \fIpopup\fR is located, storing its index at \fIindex\fR if \fIindex\fR is not NULL..SH "QIconSet* QMenuData::iconSet ( int id ) const"Returns the icon set that has been set for menu item \fIid,\fR or 0 if no icon set has been set..PPSee also: changeItem(), text() and pixmap()..SH "int QMenuData::idAt ( int index ) const"Returns the identifier of the menu item at position \fIindex\fR in the internal list, or -1 if \fIindex\fR is out of range..PPSee also: setId() and indexOf()..SH "int QMenuData::indexOf ( int id ) const"Returns the index of the menu item with identifier \fIid,\fR or -1 if there is no item with such an identifier..PPSee also: idAt() and findItem()..PPExamples:.(lscrollview/scrollview.cpp.)l.SH "int QMenuData::insertItem ( const QIconSet & icon, const QPixmap & pixmap, QPopupMenu * popup, int id=-1, int index=-1 )"Inserts a menu item with an icon, a pixmap and a sub menu. The icon will be displayed to the left of the pixmap in the item. Returns the menu item identifier..PPThe \fIpopup\fR must be deleted by the programmer or by its parent widget. It is not deleted when this menu item is removed or when the menu is deleted..PPThe menu item is assigned the identifier \fIid\fR or an automatically generated identifier if \fIid\fR is < 0. The generated identifiers (negative integers) are guaranteed to be unique within the entire application..PPThe \fIindex\fR specifies the position in the menu. The menu item is appended at the end of the list if \fIindex\fR is negative..PP\fBWarning:\fR Be careful when passing a literal 0 to insertItem(), as some C++ compilers choose the wrong overloaded function. Cast the 0 to what you mean, eg. \fC(QObject*)0\fR..PPSee also: removeItem(), changeItem(), setAccel() and connectItem()..SH "int QMenuData::insertItem ( const QIconSet & icon, const QPixmap & pixmap, const QObject * receiver, const char * member, int accel = 0, int id = -1, int index = -1 )"Inserts a menu item with an icon, a pixmap, an accelerator key, an id and an optional index and connects it to an object/slot. The icon will be displayed to the left of the pixmap in the item..PPThe menu item is assigned the identifier \fIid\fR or an automatically generated identifier if \fIid\fR is < 0. The generated identifiers (negative integers) are guaranteed to be unique within the entire application..PPThe \fIindex\fR specifies the position in the menu. The menu item is appended at the end of the list if \fIindex\fR is negative..PPNote that accelerators only work for QPopupMenu items that live in a menu bar. For stand-alone popup menus, use an independent QAccel object.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -