亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? qmenudata.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/****************************************************************************** $Id: qt/src/widgets/qmenudata.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QMenuData class**** Created : 941128**** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.**** This file is part of the widgets module of the Qt GUI Toolkit.**** This file may be distributed under the terms of the Q Public License** as defined by Trolltech AS of Norway and appearing in the file** LICENSE.QPL included in the packaging of this file.**** This file may be distributed and/or modified under the terms of the** GNU General Public License version 2 as published by the Free Software** Foundation and appearing in the file LICENSE.GPL included in the** packaging of this file.**** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition** licenses may use this file in accordance with the Qt Commercial License** Agreement provided with the Software.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for**   information about Qt Commercial License Agreements.** See http://www.trolltech.com/qpl/ for QPL licensing information.** See http://www.trolltech.com/gpl/ for GPL licensing information.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.************************************************************************/#define	 INCLUDE_MENUITEM_DEF#include "qmenudata.h"#ifndef QT_NO_MENUDATA#include "qpopupmenu.h"#include "qmenubar.h"#include "qapplication.h"#include "qguardedptr.h"class QMenuItemData {public:    QCustomMenuItem    *custom_item;	// custom menu item};class QMenuDataData {    // attention: also defined in qmenubar.cpp and qpopupmenu.cpppublic:    QMenuDataData();    QGuardedPtr<QWidget> aWidget;    int aInt;};QMenuDataData::QMenuDataData()    : aInt(-1){}// NOT REVISED/*!  \class QMenuData qmenudata.h  \brief The QMenuData class is a base class for QMenuBar and QPopupMenu.  \ingroup misc  QMenuData 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).  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.  \sa QAccel*//*****************************************************************************  QMenuItem member functions *****************************************************************************/QMenuItem::QMenuItem(){    ident	 = -1;    is_separator = FALSE;    is_checked   = FALSE;    is_enabled	 = TRUE;    is_dirty	 = TRUE;    iconset_data	 = 0;    pixmap_data	 = 0;    popup_menu	 = 0;    widget_item	 = 0;    accel_key	 = 0;    signal_data	 = 0;    d = 0;}QMenuItem::~QMenuItem(){    delete iconset_data;    delete pixmap_data;    delete signal_data;    delete widget_item;    if ( d )	delete d->custom_item;    delete d;}/*****************************************************************************  QMenuData member functions *****************************************************************************/QMenuItemData* QMenuItem::extra(){    if ( !d ) d = new QMenuItemData;    return d;}QCustomMenuItem *QMenuItem::custom() const{    if ( !d ) return 0;    return d->custom_item;}static int get_seq_id(){    static int seq_no = -2;    return seq_no--;}/*!  Constructs an empty list.*/QMenuData::QMenuData(){    actItem = -1;				// no active menu item    mitems = new QMenuItemList;			// create list of menu items    CHECK_PTR( mitems );    mitems->setAutoDelete( TRUE );    parentMenu = 0;				// assume top level    isPopupMenu = FALSE;    isMenuBar = FALSE;    mouseBtDn = FALSE;    badSize = TRUE;    avoid_circularity = 0;    actItemDown = FALSE;    d = new QMenuDataData;}/*!  Removes all menu items and disconnects any signals that have been connected.*/QMenuData::~QMenuData(){    register QMenuItem *mi = mitems->first();    while ( mi ) {	if ( mi->popup_menu )			// reset parent pointer for all	    mi->popup_menu->parentMenu = 0;	//   child menus	mi = mitems->next();    }    delete mitems;				// delete menu item list    delete d;}/*!  Virtual function; notifies subclasses about an item that has been changed.*/void QMenuData::updateItem( int )		// reimplemented in subclass{}/*!  Virtual function; notifies subclasses that one or more items have been  inserted or removed.*/void QMenuData::menuContentsChanged()		// reimplemented in subclass{}/*!  Virtual function; notifies subclasses that one or more items have changed  state (enabled/disabled or checked/unchecked).*/void QMenuData::menuStateChanged()		// reimplemented in subclass{}/*!  Virtual function; notifies subclasses that a popup menu item has been  inserted.*/void QMenuData::menuInsPopup( QPopupMenu * )	// reimplemented in subclass{}/*!  Virtual function; notifies subclasses that a popup menu item has been  removed.*/void QMenuData::menuDelPopup( QPopupMenu * )	// reimplemented in subclass{}/*!  Returns the number of items in the menu.*/uint QMenuData::count() const{    return mitems->count();}    /*!  Internal function that insert a menu item.  Called by all insert()  functions.*/int QMenuData::insertAny( const QString *text, const QPixmap *pixmap,			  QPopupMenu *popup, const QIconSet* iconset, int id, int index,			  QWidget* widget, QCustomMenuItem* custom ){    if ( index < 0 || index > (int) mitems->count() )	// append	index = mitems->count();    if ( id < 0 )				// -2, -3 etc.	id = get_seq_id();    register QMenuItem *mi = new QMenuItem;    CHECK_PTR( mi );    mi->ident = id;    if ( widget != 0 ) {	mi->widget_item = widget;	mi->is_separator = !widget->isFocusEnabled();    } else if ( custom != 0 ) {	mi->extra()->custom_item = custom;	mi->is_separator = custom->isSeparator();    } else if ( text == 0 && pixmap == 0 && popup == 0 ) {	mi->is_separator = TRUE;		// separator    } else {	mi->text_data = text?*text:QString::null;	mi->accel_key = Qt::Key_unknown;	if ( pixmap )	    mi->pixmap_data = new QPixmap( *pixmap );	if ( (mi->popup_menu = popup) )	    menuInsPopup( popup );	if ( iconset )	    mi->iconset_data = new QIconSet( *iconset );    }    mitems->insert( index, mi );    menuContentsChanged();			// menu data changed    return mi->ident;}/*!  Internal function that finds the menu item where \a popup is located,  storing its index at \a index if \a index is not NULL.*/QMenuItem *QMenuData::findPopup( QPopupMenu *popup, int *index ){    int i = 0;    QMenuItem *mi = mitems->first();    while ( mi ) {	if ( mi->popup_menu == popup )		// found popup	    break;	i++;	mi = mitems->next();    }    if ( index && mi )	*index = i;    return mi;}void QMenuData::removePopup( QPopupMenu *popup ){    int index = 0;    QMenuItem *mi = findPopup( popup, &index );    if ( mi )	removeItemAt( index );}/*!  does nothing, but that virtual ### remove 3.0*/void QMenuData::setAllDirty( bool  ){}/*!  The family of insertItem() functions inserts menu items into a  popup menu or a menu bar.  A menu item is usually either a text string or a a pixmap, both with  an optional icon or keyboard accelerator. As special cases it is  also possible to insert custom items (see QCustomMenuItem) or even  widgets into popup menus.  Some insertItem() members take a popup menu as additional  argument. Use these to insert submenus to existing menus or pulldown  menus to a menu bar.  The amount of insert functions may look confusing, but is actually  quite handy to use.  This default version inserts a menu item with a text, an accelerator  key, an id and an optional index and connects it to an object/slot.  Example:  \code    QMenuBar   *mainMenu = new QMenuBar;    QPopupMenu *fileMenu = new QPopupMenu;    fileMenu->insertItem( "New",  myView, SLOT(newFile()), CTRL+Key_N );    fileMenu->insertItem( "Open", myView, SLOT(open()),    CTRL+Key_O );    mainMenu->insertItem( "File", fileMenu );  \endcode  Not all insert functions take an object/slot parameter or an  accelerator key. Use connectItem() and setAccel() on these items.  If you will need to translate accelerators, use QAccel::stringToKey()  to calculate the accelerator key:  \code    fileMenu->insertItem( tr("Open"), myView, SLOT(open()),			  QAccel::stringToKey( tr("Ctrl+O") ) );  \endcode  In the example above, pressing CTRL+N or selecting "open" from the  menu activates the myView->open() function.  Some insert functions take a QIconSet parameter to specify the  little menu item icon. Note that you can always pass a QPixmap  object instead.  The menu item is assigned the identifier \a id or an automatically  generated identifier if \a id is < 0. The generated identifiers  (negative integers) are guaranteed to be unique within the entire  application.  The \a index specifies the position in the menu.  The menu item is  appended at the end of the list if \a index is negative.  Note that keyboard accelerators in Qt are not application global, but  bound to a certain toplevel window. Accelerators in QPopupMenu items  therefore only work for menus that are associated with a certain  window. This is true for popup menus that live in a menu bar, for  instance. In that case, the accelerator will be installed on the  menu bar itself. It also works for stand-alone popup menus that have  a toplevel widget in their parentWidget()- chain. The menu will then  install its accelerator object on that toplevel widget. For all  other cases, use an independent QAccel object.  \warning 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. <tt>(QObject*)0</tt>.  \sa removeItem(), changeItem(), setAccel(), connectItem(), QAccel,  qnamespace.h*/int QMenuData::insertItem( const QString &text,			   const QObject *receiver, const char* member,			   int accel, int id, int index ){    int actualID = insertAny( &text, 0, 0, 0, id, index );    connectItem( actualID, receiver, member );    if ( accel )	setAccel( accel, actualID );    return actualID;}/*!\overload  Inserts a menu item with an icon, a text, 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 text in the item.  \sa removeItem(), changeItem(), setAccel(), connectItem(), QAccel,  qnamespace.h*/int QMenuData::insertItem( const QIconSet& icon,			   const QString &text,			   const QObject *receiver, const char* member,			   int accel, int id, int index ){    int actualID = insertAny( &text, 0, 0, &icon, id, index );    connectItem( actualID, receiver, member );    if ( accel )	setAccel( accel, actualID );    return actualID;}/*!\overload  Inserts a menu item with a pixmap, an accelerator key, an id and an  optional index and connects it to an object/slot.  To look best when being highlighted as menu item, the pixmap should  provide a mask, see QPixmap::mask().  Returns the menu item identifier.  \sa removeItem(), changeItem(), setAccel(), connectItem()*/int QMenuData::insertItem( const QPixmap &pixmap,			   const QObject *receiver, const char* member,			   int accel, int id, int index ){    int actualID = insertAny( 0, &pixmap, 0, 0, id, index );    connectItem( actualID, receiver, member );    if ( accel )	setAccel( accel, actualID );    return actualID;}/*!\overload  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.  To look best when being highlighted as menu item, the pixmap should  provide a mask, see QPixmap::mask().  Returns the menu item identifier.  \sa removeItem(), changeItem(), setAccel(), connectItem(), QAccel,  qnamespace.h*/int QMenuData::insertItem( const QIconSet& icon,			   const QPixmap &pixmap,			   const QObject *receiver, const char* member,			   int accel, int id, int index ){    int actualID = insertAny( 0, &pixmap, 0, &icon, id, index );    connectItem( actualID, receiver, member );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二三区| 亚洲国产视频a| 在线不卡一区二区| 色悠悠久久综合| 成人免费毛片a| 99热国产精品| 99视频精品全部免费在线| 成人午夜激情在线| eeuss影院一区二区三区| 波多野结衣中文字幕一区二区三区| 粉嫩一区二区三区在线看| 成人污视频在线观看| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 国产精品国产精品国产专区不蜜| 精品久久五月天| 久久精品人人做人人爽人人| 2023国产精华国产精品| 国产精品全国免费观看高清 | 欧美午夜一区二区| 在线观看一区二区视频| 国产99久久久国产精品免费看| 99久久精品久久久久久清纯| 成人一道本在线| 欧美这里有精品| 欧美精品一区二区三区高清aⅴ| 国产片一区二区| 一区2区3区在线看| 日韩精品视频网站| 成人激情免费电影网址| 欧美亚洲综合久久| 久久亚洲影视婷婷| 一区二区高清在线| 国产精品综合av一区二区国产馆| 99国产精品久久久久久久久久久| 欧美三级韩国三级日本三斤| 精品日韩欧美在线| 亚洲综合免费观看高清完整版在线| 日韩国产欧美在线观看| 国产69精品久久久久777| 欧美视频在线一区| 国产精品麻豆久久久| 免费高清视频精品| 在线观看www91| 国产精品美女久久久久久久| 午夜日韩在线观看| 一本大道久久a久久综合婷婷| 日韩精品一区二区三区老鸭窝 | 国产伦精品一区二区三区视频青涩 | 日韩电影在线看| 成人网在线免费视频| 宅男噜噜噜66一区二区66| 1024成人网色www| 国产一区免费电影| 7777精品伊人久久久大香线蕉的 | 欧美激情一区二区三区| 免费欧美高清视频| 欧美性xxxxxxxx| 一区二区三区中文字幕电影| 国产精品18久久久久久vr| 欧美系列一区二区| 国产欧美日韩卡一| 韩国av一区二区| 日韩欧美国产一区二区三区| 亚洲一二三区在线观看| 99精品视频在线免费观看| 久久综合丝袜日本网| 蜜桃av一区二区三区电影| 欧美日韩激情在线| 亚洲成人你懂的| 欧美性大战xxxxx久久久| 一区二区三区 在线观看视频| 日本久久一区二区| 亚洲一卡二卡三卡四卡| 日本精品一区二区三区四区的功能| 国产精品久久午夜| 国产精品1区2区| 国产亚洲午夜高清国产拍精品| 韩国一区二区视频| 久久欧美一区二区| 国产福利精品导航| 国产精品久久毛片a| 91亚洲精品乱码久久久久久蜜桃| 中文字幕视频一区二区三区久| www.欧美日韩国产在线| 亚洲美女免费在线| 欧美日韩精品是欧美日韩精品| 日本系列欧美系列| 日韩欧美色综合| 国产精品99久久久久久有的能看| 这里只有精品视频在线观看| 琪琪久久久久日韩精品| 精品福利一区二区三区| 丁香天五香天堂综合| 亚洲欧美色综合| 欧美日韩精品高清| 国产乱一区二区| 亚洲精品中文在线影院| 欧美精品色一区二区三区| 国内外成人在线| 日韩毛片在线免费观看| 在线观看一区二区视频| 免费观看日韩av| 中文字幕一区二区不卡 | 亚洲无线码一区二区三区| 91精品国产乱| 成人h动漫精品一区二区| 亚洲国产你懂的| 精品免费国产一区二区三区四区| 不卡大黄网站免费看| 五月天精品一区二区三区| 国产欧美一区在线| 欧美日韩你懂得| 成人免费不卡视频| 日本欧美大码aⅴ在线播放| 国产日本欧洲亚洲| 91视视频在线直接观看在线看网页在线看| 国产精品久久久一区麻豆最新章节| 91蝌蚪porny九色| 国产一区视频导航| 天天av天天翘天天综合网| 伊人夜夜躁av伊人久久| 国产成人av在线影院| 亚洲高清一区二区三区| 日韩欧美一卡二卡| 欧美视频在线一区二区三区 | 蜜臀99久久精品久久久久久软件| 亚洲欧美怡红院| 日韩美女视频在线| 欧美日韩色综合| 91在线视频免费91| 国产精品69毛片高清亚洲| 日本不卡一二三| 亚洲成人动漫一区| 亚洲免费电影在线| 中国色在线观看另类| 精品国产乱码久久| 日韩小视频在线观看专区| 91视频一区二区三区| 国产成人免费视频| 国产综合色在线| 国模娜娜一区二区三区| 日韩av一区二| 秋霞午夜鲁丝一区二区老狼| 一片黄亚洲嫩模| 一区二区三区四区不卡视频| 国产精品久久777777| 中文字幕欧美国产| 国产香蕉久久精品综合网| 精品国产91久久久久久久妲己| 日韩一区二区精品| 欧美成人精品福利| 欧美v日韩v国产v| 中文字幕亚洲在| 综合网在线视频| 亚洲人成网站色在线观看| 中文字幕一区三区| 伊人性伊人情综合网| 亚洲视频综合在线| 亚洲伊人色欲综合网| 亚洲图片自拍偷拍| 日本网站在线观看一区二区三区| 午夜电影网亚洲视频| 日本不卡视频在线观看| 蜜臀av一区二区在线观看| 激情五月婷婷综合网| 国产成人综合在线播放| a在线欧美一区| 欧美专区在线观看一区| 欧美精品xxxxbbbb| 亚洲精品在线观| 欧美经典三级视频一区二区三区| 中文字幕中文字幕中文字幕亚洲无线| 国产精品国产三级国产普通话蜜臀| 国产精品国产三级国产专播品爱网| 亚洲免费在线电影| 麻豆精品在线观看| eeuss鲁片一区二区三区| 欧美视频完全免费看| 欧美大肚乱孕交hd孕妇| 国产女主播视频一区二区| 亚洲青青青在线视频| 日韩成人午夜精品| 成人精品在线视频观看| 欧美日韩一区二区三区在线| 日韩欧美亚洲一区二区| 国产精品国产三级国产a| 丝袜美腿成人在线| av不卡在线播放| 日韩精品专区在线影院重磅| 国产欧美日韩综合| 午夜电影网亚洲视频| 99在线精品一区二区三区| 欧美日本韩国一区| 国产精品成人一区二区三区夜夜夜| 午夜精品久久久久久久 | 在线看一区二区| 久久精品人人爽人人爽| 亚洲国产精品久久久男人的天堂| 激情伊人五月天久久综合| 精品视频在线免费看|