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

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

?? qmenubar.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/****************************************************************************** $Id: qt/src/widgets/qmenubar.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QMenuBar class**** Created : 941209**** 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.************************************************************************/// qmainwindow.h before qmenubar.h because of GCC-2.7.* compatibility// ### could be reorganised by discarding INCLUDE_MENUITEM_DEF and put// the relevant declarations in a private header?#include "qmainwindow.h"#ifndef QT_NO_MENUBAR#define	 INCLUDE_MENUITEM_DEF#include "qmenubar.h"#include "qaccel.h"#include "qpainter.h"#include "qdrawutil.h"#include "qapplication.h"#include "qguardedptr.h"#include "qlayout.h"#include "qdatetime.h"#include <ctype.h>class QMenuDataData {    // attention: also defined in qmenudata.cpppublic:    QMenuDataData();    QGuardedPtr<QWidget> aWidget;    int aInt;};static QTime moveActiveTime;// NOT REVISED/*!  \class QMenuBar qmenubar.h  \brief The QMenuBar class provides a horizontal menu bar.  \ingroup application  A menu bar consists of a list of submenu items, so-called pulldown  menus.  You add submenu items with insertItem(). Assuming that \c  menubar is a pointer to a QMenuBar and \c filemenu a pointer to a  QPopupMenu, \code  menubar->insertItem( "&File", filemenu );  \endcode  inserts the menu into the menu bar. The ampersand in the item text declares  Alt-f as shortcut for this menu. Use "&&" to get a real ampsend in the menubar.  Items are either enabled or disabled. You toggle their state with  setItemEnabled().  Note that there is no need to layout a menu bar. It automatically  sets its own geometry to the top of the parent widget and changes it  appropriately whenever the parent is resized.  \important insertItem removeItem clear insertSeparator setItemEnabled isItemEnabled  menu/menu.cpp is a typical example of QMenuBar and QPopupMenu use.  <img src=qmenubar-m.png> <img src=qmenubar-w.png>  \sa QPopupMenu  <a href="guibooks.html#fowler">GUI Design Handbook: Menu Bar</a>*//*! \enum QMenuBar::Separator  This enum type is used to decide whether QMenuBar should draw a  separator line at its bottom.  The possible values are: <ul>  <li> \c Never - in many applications, there already is a separator,  and two looks stupid.  <li> \c InWindowsStyle - in some other applications, a separator  looks good in Windows style but not else.  </ul> *//*!  \fn void QMenuBar::activated( int id )  This signal is emitted when a menu item is selected; \a id is the id  of the selected item.  Normally, you will connect each menu item to a single slot using  QMenuData::insertItem(), but sometimes you will want to connect  several items to a single slot (most often if the user selects from  an array).  This signal is handy in such cases.  \sa highlighted(), QMenuData::insertItem()*//*!  \fn void QMenuBar::highlighted( int id )  This signal is emitted when a menu item is highlighted; \a id is the  id of the highlighted item.  Normally, you will connect each menu item to a single slot using  QMenuData::insertItem(), but sometimes you will want to connect  several items to a single slot (most often if the user selects from  an array).  This signal is handy in such cases.  \sa activated(), QMenuData::insertItem()*/// Motif style parametersstatic const int motifBarHMargin	= 2;	// menu bar hor margin to itemstatic const int motifBarVMargin	= 1;	// menu bar ver margin to itemstatic const int motifItemFrame		= 2;	// menu item frame widthstatic const int motifItemHMargin	= 5;	// menu item hor text marginstatic const int motifItemVMargin	= 4;	// menu item ver text margin/*+-----------------------------|      BarFrame|   +-------------------------|   |	   V  BarMargin|   |	+---------------------|   | H |      ItemFrame|   |	|  +-----------------|   |	|  |			   \|   |	|  |  ^	 T E X T   ^	    | ItemVMargin|   |	|  |  |		   |	   /|   |	|      ItemHMargin|   ||*//*****************************************************************************  QMenuBar member functions *****************************************************************************//*!  Constructs a menu bar with a \e parent and a \e name.*/QMenuBar::QMenuBar( QWidget *parent, const char *name )    : QFrame( parent, name, 0, FALSE ){    isMenuBar = TRUE;#ifndef QT_NO_ACCEL    autoaccel = 0;#endif    irects    = 0;    rightSide = 0; // Right of here is rigth-aligned content    mseparator = 0;    waitforalt = 0;    popupvisible = 0;    hasmouse = 0;    defaultup = 0;    toggleclose = 0;    if ( parent ) {	// filter parent events for resizing	parent->installEventFilter( this );	// filter top-level-widget events for accelerators	QWidget *tlw = topLevelWidget();	if ( tlw != parent )	    tlw->installEventFilter( this );    }    QFontMetrics fm = fontMetrics();    int gs = style();    int h;    if ( gs == WindowsStyle ) {	h = 2 + fm.height() + motifItemVMargin + 2*style().defaultFrameWidth();    } else {	h =  style().defaultFrameWidth() + motifBarVMargin + fm.height()	    + motifItemVMargin + 2*style().defaultFrameWidth() + 2*motifItemFrame;    }    move( 0, 0 );    resize( width(), h );    switch ( gs ) {	case WindowsStyle:	    setFrameStyle( QFrame::NoFrame );	    setMouseTracking( TRUE );	    break;	case MotifStyle:	    setFrameStyle( QFrame::Panel | QFrame::Raised );	    setLineWidth( style().defaultFrameWidth() );	    break;	default:	    break;    }    setBackgroundMode( PaletteButton );}/*! \reimp */void QMenuBar::styleChange( QStyle& old ){    switch ( style().guiStyle() ) {	case WindowsStyle:	    setFrameStyle( QFrame::NoFrame );	    setMouseTracking( TRUE );	    break;	case MotifStyle:	    setFrameStyle( QFrame::Panel | QFrame::Raised );	    setLineWidth( style().defaultFrameWidth() );	    setMouseTracking( FALSE );	    break;	default:	    break;    }    updateGeometry();    QFrame::styleChange( old );}/*!  Destroys the menu bar.*/QMenuBar::~QMenuBar(){#ifndef QT_NO_ACCEL    delete autoaccel;#endif    if ( irects )		// Avoid purify complaint.	delete [] irects;}/*!  \internal  Needs documentation.*/void QMenuBar::updateItem( int id ){    int i = indexOf( id );    if ( i >= 0 && irects )	repaint( irects[i], FALSE );}/*!  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.*/void QMenuBar::menuContentsChanged(){#ifndef QT_NO_ACCEL    setupAccelerators();#endif    badSize = TRUE;				// might change the size    if ( isVisible() ) {	calculateRects();	update();#ifndef QT_NO_MAINWINDOW	if ( parent() && parent()->inherits( "QMainWindow" ) ) {	    ( (QMainWindow*)parent() )->triggerLayout();	    ( (QMainWindow*)parent() )->update();	}#endif#ifndef QT_NO_LAYOUT	if ( parentWidget() && parentWidget()->layout() )	    parentWidget()->layout()->activate();#endif    }}/*!  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.*/void QMenuBar::menuStateChanged(){#ifndef QT_NO_ACCEL    setupAccelerators(); // ### when we have a good solution for the accel vs. focus widget problem, remove that. That is only a workaround#endif    update();}void QMenuBar::menuInsPopup( QPopupMenu *popup ){#ifndef QT_NO_POPUPMENU    popup->parentMenu = this;			// set parent menu    connect( popup, SIGNAL(activatedRedirect(int)),	     SLOT(subActivated(int)) );    connect( popup, SIGNAL(highlightedRedirect(int)),	     SLOT(subHighlighted(int)) );#endif}void QMenuBar::menuDelPopup( QPopupMenu *popup ){#ifndef QT_NO_POPUPMENU    popup->parentMenu = 0;    popup->disconnect( SIGNAL(activatedRedirect(int)), this,		       SLOT(subActivated(int)) );    popup->disconnect( SIGNAL(highlightedRedirect(int)), this,		       SLOT(subHighlighted(int)) );#endif}void QMenuBar::frameChanged(){    menuContentsChanged();}/*!  This function is used to adjust the menu bar's geometry to the  parent widget's.  Note that this is \e not part of the public  interface - the function is \c public only because  QObject::eventFilter() is.  \internal  Resizes the menu bar to fit in the parent widget when the parent receives  a resize event.*/bool QMenuBar::eventFilter( QObject *object, QEvent *event ){    if ( object == parent() && object && !object->inherits( "QToolBar" ) &&	 event->type() == QEvent::Resize ) {	QResizeEvent *e = (QResizeEvent *)event;	int w = e->size().width();	setGeometry( 0, y(), w, heightForWidth(w) );	return FALSE;    }    if ( waitforalt && event->type() == QEvent::FocusOut ) {	// some window systems/managers use alt/meta as accelerator keys	// for switching between windows/desktops/etc.  If the focus	// widget gets unfocused, then we need to stop waiting for alt	// NOTE: this event came from the real focus widget, so we don't	// need to touch the event filters	waitforalt = 0;	return FALSE;    } else if ( style() != WindowsStyle ||	 !isVisible() ||	 !object->isWidgetType() ||	 !( event->type() == QEvent::Accel ||	    event->type() == QEvent::KeyPress ||	    event->type() == QEvent::KeyRelease ) )	return FALSE;#ifndef QT_NO_ACCEL    // look for Alt press and Alt-anything press    if ( event->type() == QEvent::Accel ) {	QWidget * f = ((QWidget *)object)->focusWidget();	QKeyEvent * ke = (QKeyEvent *) event;	if ( f ) { // ### this thinks alt and meta are the same	    if ( ke->key() == Key_Alt || ke->key() == Key_Meta ) {		if ( waitforalt ) {		    waitforalt = 0;		    if ( object->parent() )			object->removeEventFilter( this ); 		    ke->accept(); 		    return TRUE;		} else if ( hasFocus() ) { 		    setAltMode( FALSE ); 		    ke->accept(); 		    return TRUE;		} else { 		    waitforalt = 1; 		    if ( f != object ) 			f->installEventFilter( this );		}	    } else if ( ke->key() == Key_Control || ke->key() == Key_Shift)		setAltMode( FALSE );	}	// ### ! block all accelerator events when the menu bar is active	if ( qApp && qApp->focusWidget() == this ) {	    return TRUE;	}	return FALSE;    }#endif    // look for Alt release    if ( ((QWidget*)object)->focusWidget() == object ||	 (object->parent() == 0 && ((QWidget*)object)->focusWidget() == 0) ) {	if ( waitforalt &&	     event->type() == QEvent::KeyRelease &&	     (((QKeyEvent *)event)->key() == Key_Alt ||	      ((QKeyEvent *)event)->key() == Key_Meta) ) {	    setAltMode( TRUE );	    if ( object->parent() )		object->removeEventFilter( this );	    QWidget * tlw = ((QWidget *)object)->topLevelWidget();	    if ( tlw ) {		// ### !		// make sure to be the first event filter, so we can kill		// accelerator events before the accelerators get to them.		tlw->removeEventFilter( this );		tlw->installEventFilter( this );	    }	    return TRUE;	} else if ( (event->type() == QEvent::KeyPress ||		     event->type() == QEvent::KeyRelease) &&		    !(((QKeyEvent *)event)->key() == Key_Alt ||		      ((QKeyEvent *)event)->key() == Key_Meta) ) {	    if ( object->parent() )		object->removeEventFilter( this );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内精品久久久久影院一蜜桃| 亚洲精品五月天| 国产精品一区二区在线播放 | 国产人久久人人人人爽| 久久精品国产99国产| 精品国产一区二区国模嫣然| 麻豆freexxxx性91精品| 亚洲精品在线观看视频| 成人国产一区二区三区精品| 椎名由奈av一区二区三区| 成人成人成人在线视频| 亚洲欧美色一区| 51精品秘密在线观看| 国产精品2024| 亚洲影院久久精品| 欧美一区二区视频网站| 国产一区在线观看视频| 国产精品电影一区二区| 欧美三级电影网| 高清不卡一二三区| 亚洲精品少妇30p| 欧美一级二级在线观看| 成人免费av在线| 午夜成人免费视频| 久久先锋影音av鲁色资源网| 91丨九色丨蝌蚪丨老版| 热久久免费视频| 中文字幕在线不卡视频| 51久久夜色精品国产麻豆| 国产91综合一区在线观看| 亚洲一线二线三线久久久| 日韩精品一区二区三区老鸭窝| 成人午夜av在线| 午夜精品在线视频一区| 国产精品久久久久影视| 在线成人免费视频| 成人伦理片在线| 蜜桃一区二区三区在线观看| 亚洲人成在线播放网站岛国 | 精品黑人一区二区三区久久| 不卡大黄网站免费看| 久久国产精品99精品国产| 亚洲区小说区图片区qvod| 精品三级在线观看| 欧美性色黄大片| 福利一区在线观看| 免费成人在线观看视频| 亚洲一区二区三区四区的| 久久久久久久精| 欧美一级淫片007| 在线亚洲高清视频| 成人黄色小视频| 久久国产精品99精品国产| 亚洲成人在线免费| 亚洲精选视频在线| 久久久久免费观看| 精品精品国产高清一毛片一天堂| 欧美又粗又大又爽| 99精品久久只有精品| 久久成人精品无人区| 婷婷六月综合网| 亚洲精品成人精品456| 国产精品免费视频网站| 2021中文字幕一区亚洲| 日韩一区和二区| 在线不卡的av| 欧美日韩日日骚| 色婷婷av一区| 91热门视频在线观看| 丁香婷婷综合色啪| 国产福利视频一区二区三区| 激情偷乱视频一区二区三区| 久久国产生活片100| 久久国产精品第一页| 捆绑调教一区二区三区| 久久 天天综合| 色综合中文综合网| 欧美激情一区二区三区| 久久色中文字幕| 亚洲精品一区二区三区香蕉| 欧美一区二区黄| 日韩欧美的一区二区| 91麻豆精品国产自产在线| 欧美酷刑日本凌虐凌虐| 欧美片网站yy| 91.xcao| 欧美一区二区三区啪啪| 欧美一区二区三区爱爱| 精品乱码亚洲一区二区不卡| 精品国产乱子伦一区| 欧美成人激情免费网| 337p粉嫩大胆噜噜噜噜噜91av| 国产亚洲一区字幕| ㊣最新国产の精品bt伙计久久| 成人免费小视频| 亚洲综合色婷婷| 天天色综合成人网| 另类小说视频一区二区| 国产精品一区在线| 99精品黄色片免费大全| 欧美亚洲愉拍一区二区| 欧美精品久久天天躁| 日韩女优电影在线观看| 中文字幕欧美三区| 一区二区三区四区在线| 丝袜诱惑制服诱惑色一区在线观看| 日韩电影免费一区| 国产做a爰片久久毛片| 成人av网站免费观看| 欧美色综合久久| 日韩欧美一区中文| 国产精品污污网站在线观看| 夜夜嗨av一区二区三区四季av| 视频一区视频二区在线观看| 蜜臀91精品一区二区三区 | 免费在线观看精品| 国产精品白丝av| 欧美性色aⅴ视频一区日韩精品| 日韩亚洲欧美在线| 国产精品久久久久久久蜜臀| 午夜欧美电影在线观看| 国产综合成人久久大片91| 99久精品国产| 日韩一级二级三级| 亚洲欧洲制服丝袜| 精品在线播放午夜| 欧美亚洲日本国产| 久久久精品中文字幕麻豆发布| 亚洲精品你懂的| 韩国毛片一区二区三区| 色哟哟国产精品| 久久久另类综合| 爽好多水快深点欧美视频| 国产成人av一区| 这里是久久伊人| 亚洲三级免费观看| 国产一区二区女| 欧美日韩激情一区二区三区| 亚洲欧洲日韩一区二区三区| 久久精品国产一区二区| 一本色道久久综合狠狠躁的推荐| 精品国产乱码久久久久久老虎| 亚洲国产欧美日韩另类综合 | 奇米精品一区二区三区在线观看| 成人av手机在线观看| 久久综合狠狠综合久久激情| 亚洲国产欧美另类丝袜| 91老师国产黑色丝袜在线| 久久久久综合网| 老司机精品视频导航| 在线播放国产精品二区一二区四区| 国产精品婷婷午夜在线观看| 麻豆国产欧美一区二区三区| 欧美三级电影网站| 亚洲自拍偷拍欧美| 色婷婷综合久久久| 国产精品福利一区二区三区| 国产91精品一区二区麻豆亚洲| 欧美r级电影在线观看| 亚洲成人免费av| 91免费看`日韩一区二区| 日本一区二区三区高清不卡| 国产精品自拍三区| 精品嫩草影院久久| 久久成人精品无人区| 欧美哺乳videos| 另类专区欧美蜜桃臀第一页| 欧美一区二区久久久| 蜜桃免费网站一区二区三区| 2023国产精华国产精品| 毛片一区二区三区| 精品嫩草影院久久| 国产一区二区毛片| 国产午夜亚洲精品午夜鲁丝片| 国产曰批免费观看久久久| 精品成人佐山爱一区二区| 久久福利资源站| 久久精品人人做人人爽97| 国产成人在线视频网址| 国产蜜臀97一区二区三区| 丁香啪啪综合成人亚洲小说| 中文字幕av在线一区二区三区| 不卡电影免费在线播放一区| 亚洲色图视频免费播放| 色呦呦一区二区三区| 亚洲福中文字幕伊人影院| 91精品国产一区二区| 美女视频网站黄色亚洲| 久久午夜电影网| 丁香婷婷综合五月| 亚洲一本大道在线| 91精品国产综合久久香蕉麻豆 | 色婷婷综合久久久中文一区二区 | 成人午夜视频在线| 亚洲色图丝袜美腿| 91精品国产综合久久福利| 韩国中文字幕2020精品| 国产精品福利影院| 欧美美女喷水视频| 国产一区二区视频在线|