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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? qwhatsthis.cpp

?? qtopia-phone-2.2.0下公共的控件實(shí)現(xiàn)源代碼。
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/****************************************************************************** $Id: qt/src/widgets/qwhatsthis.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QWhatsThis class**** 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.************************************************************************/#include "qwhatsthis.h"#ifndef QT_NO_WHATSTHIS#include "qapplication.h"#include "qpaintdevicemetrics.h"#include "qpixmap.h"#include "qpainter.h"#include "qtimer.h"#include "qptrdict.h"#include "qtoolbutton.h"#include "qshared.h"#include "qcursor.h"#include "qbitmap.h"#include "qtooltip.h"#include "qsimplerichtext.h"#include "qstylesheet.h"// REVISED: warwick/*!  \class QWhatsThis qwhatsthis.h  \brief The QWhatsThis class provides a simple description of any  widget, e.g. answering the question "what's this?"  \ingroup helpsystem  <i>What's This</i> help is part of an application's  <a href=helpsystem.html>online help systems</a>,  offering users a level of detail between  tool tips and full text browsing windows.  QWhatsThis provides a single window with a single explanatory  text, which pops up quickly when the user asks "what's this?", and  goes away as soon as the user does something else.  To assign <i>What's This?</i> text to a widget, you simply  call QWhatsThis::add() for the widget. To assign text to a  menu item, call QMenuData::setWhatsThis(), and for a global  accelerator key, call QAccel::setWhatsThis().  The text can be either rich text or plain text.  If you  specify a rich text formatted string, it will be rendered using the  default stylesheet. This makes it also possible to embed images. See  QStyleSheet::defaultSheet() for details.  By default, the user will be able to view the text for a widget  by pressing Shift-F1 while the widget has focus.  On window systems where a context help button is provided in  the window decorations, that button enters <i>What's This?</i> mode.  In this mode, if the user  clicks on a widget, help will be given for the widget.  The mode  is left when help is given or when the user presses the Escape key.  An alternative way to enter <i>What's This?</i> mode is  to use the ready-made toolbar tool button from  QWhatsThis::whatsThisButton().  If you are using QMainWindow, you can also use  the QMainWindow::whatsThis() slot to invoke the mode from a menu item.  <img src="whatsthis.png" width="284" height="246">  For more control, you can create a dedicated QWhatsThis object for a  special widget. By subclassing and reimplementing QWhatsThis::text()  it is possible to have different explanatory texts depending on the  position of the mouse click.  If your widget needs even more control, see  QWidget::customWhatsThis().  To remove added text, you can use QWhatsThis::remove(), but since  the text is automatically removed when the widget is destroyed,  this is rarely needed.  \sa QToolTip*/// a special buttonclass QWhatsThisButton: public QToolButton{    Q_OBJECTpublic:    QWhatsThisButton( QWidget * parent, const char * name );    ~QWhatsThisButton();public slots:    void mouseReleased();};class QWhatsThisPrivate: public QObject{    Q_OBJECTpublic:    // an item for storing texts    struct WhatsThisItem: public QShared    {	WhatsThisItem(): QShared() { whatsthis = 0; }	~WhatsThisItem();	QString s;	QWhatsThis* whatsthis;    };    // the (these days pretty small) state machine    enum State { Inactive, Waiting };    QWhatsThisPrivate();    ~QWhatsThisPrivate();    bool eventFilter( QObject *, QEvent * );    WhatsThisItem* newItem( QWidget * widget );    void add( QWidget * widget, QWhatsThis* special );    void add( QWidget * widget, const QString& text );    // say it.    void say( QWidget *, const QString&, const QPoint&  );    void say_helper(QWidget*,const QPoint& ppos,bool);    // setup and teardown    static void tearDownWhatsThis();    static void setUpWhatsThis();    void leaveWhatsThisMode();    // variables    QWidget * whatsThat;    QPtrDict<WhatsThisItem> * dict;    QPtrDict<QWidget> * tlw;    QPtrDict<QWhatsThisButton> * buttons;    State state;#ifndef QT_NO_CURSOR    QCursor * cursor;#endif    QString currentText;private slots:    void cleanupWidget()    {	const QObject* o = sender();	if ( o->isWidgetType() ) // sanity	    QWhatsThis::remove((QWidget*)o);    }};// static, but static the less-typing waystatic QWhatsThisPrivate * wt = 0;// the itemQWhatsThisPrivate::WhatsThisItem::~WhatsThisItem(){    if ( count )	qFatal( "Internal error #10%d in What's This", count );}static const char * const button_image[] = {"16 16 3 1"," 	c None","o	c #000000","a	c #000080","o        aaaaa  ","oo      aaa aaa ","ooo    aaa   aaa","oooo   aa     aa","ooooo  aa     aa","oooooo  a    aaa","ooooooo     aaa ","oooooooo   aaa  ","ooooooooo aaa   ","ooooo     aaa   ","oo ooo          ","o  ooo    aaa   ","    ooo   aaa   ","    ooo         ","     ooo        ","     ooo        "};#ifndef QT_NO_CURSOR#define cursor_bits_width 32#define cursor_bits_height 32static unsigned char cursor_bits_bits[] = {  0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0xf0, 0x07, 0x00,  0x09, 0x18, 0x0e, 0x00, 0x11, 0x1c, 0x0e, 0x00, 0x21, 0x1c, 0x0e, 0x00,  0x41, 0x1c, 0x0e, 0x00, 0x81, 0x1c, 0x0e, 0x00, 0x01, 0x01, 0x07, 0x00,  0x01, 0x82, 0x03, 0x00, 0xc1, 0xc7, 0x01, 0x00, 0x49, 0xc0, 0x01, 0x00,  0x95, 0xc0, 0x01, 0x00, 0x93, 0xc0, 0x01, 0x00, 0x21, 0x01, 0x00, 0x00,  0x20, 0xc1, 0x01, 0x00, 0x40, 0xc2, 0x01, 0x00, 0x40, 0x02, 0x00, 0x00,  0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };#define cursor_mask_width 32#define cursor_mask_height 32static unsigned char cursor_mask_bits[] = {  0x01, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x07, 0x00, 0x07, 0xf8, 0x0f, 0x00,  0x0f, 0xfc, 0x1f, 0x00, 0x1f, 0x3e, 0x1f, 0x00, 0x3f, 0x3e, 0x1f, 0x00,  0x7f, 0x3e, 0x1f, 0x00, 0xff, 0x3e, 0x1f, 0x00, 0xff, 0x9d, 0x0f, 0x00,  0xff, 0xc3, 0x07, 0x00, 0xff, 0xe7, 0x03, 0x00, 0x7f, 0xe0, 0x03, 0x00,  0xf7, 0xe0, 0x03, 0x00, 0xf3, 0xe0, 0x03, 0x00, 0xe1, 0xe1, 0x03, 0x00,  0xe0, 0xe1, 0x03, 0x00, 0xc0, 0xe3, 0x03, 0x00, 0xc0, 0xe3, 0x03, 0x00,  0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };#endif// the button classQWhatsThisButton::QWhatsThisButton( QWidget * parent, const char * name )    : QToolButton( parent, name ){    QPixmap p( (const char **)button_image );    setPixmap( p );    setToggleButton( TRUE );    setAutoRaise( TRUE );    setFocusPolicy( NoFocus );    setTextLabel( tr( "What's this?" ) );    wt->buttons->insert( (void *)this, this );    connect( this, SIGNAL( released() ),	     this, SLOT( mouseReleased() ) );}QWhatsThisButton::~QWhatsThisButton(){    if ( wt && wt->buttons )	wt->buttons->take( (void *)this );}void QWhatsThisButton::mouseReleased(){    if ( wt->state == QWhatsThisPrivate::Inactive && isOn() ) {	QWhatsThisPrivate::setUpWhatsThis();#ifndef QT_NO_CURSOR	QApplication::setOverrideCursor( *wt->cursor, FALSE );#endif	wt->state = QWhatsThisPrivate::Waiting;	qApp->installEventFilter( wt );    }}// the what's this manager classQWhatsThisPrivate::QWhatsThisPrivate()    : QObject( 0, "global what's this object" ){    qAddPostRoutine( tearDownWhatsThis );    whatsThat = 0;    dict = new QPtrDict<QWhatsThisPrivate::WhatsThisItem>;    tlw = new QPtrDict<QWidget>;    wt = this;    buttons = new QPtrDict<QWhatsThisButton>;    state = Inactive;#ifndef QT_NO_CURSOR    cursor = new QCursor( QBitmap( cursor_bits_width, cursor_bits_height,				   cursor_bits_bits, TRUE ),			  QBitmap( cursor_mask_width, cursor_mask_height,				   cursor_mask_bits, TRUE ),			  1, 1 );#endif}QWhatsThisPrivate::~QWhatsThisPrivate(){#ifndef QT_NO_CURSOR    if ( state == Waiting )	QApplication::restoreOverrideCursor();#endif    // the two straight-and-simple dicts    delete tlw;    delete buttons;    // then delete the complex one.    QPtrDictIterator<WhatsThisItem> it( *dict );    WhatsThisItem * i;    QWidget * w;    while( (i=it.current()) != 0 ) {	w = (QWidget *)it.currentKey();	++it;	dict->take( w );	i->deref();	if ( !i->count )	    delete i;    }    delete dict;#ifndef QT_NO_CURSOR    delete cursor;#endif    delete whatsThat;    // and finally lose wt    wt = 0;}bool QWhatsThisPrivate::eventFilter( QObject * o, QEvent * e ){    if ( !o || !e )	return FALSE;    if ( o == whatsThat ) {	if (e->type() == QEvent::MouseButtonPress  ||	    e->type() == QEvent::KeyPress ) {	    whatsThat->hide();	    return TRUE;	}#ifdef _WS_QWS_       else if ( e->type() == QEvent::Paint ) {	   wt->say_helper(0,QPoint(0,0),FALSE);       }#endif	return FALSE;    }    switch( state ) {    case Waiting:	if ( e->type() == QEvent::MouseButtonPress && o->isWidgetType() ) {	    QWidget * w = (QWidget *) o;	    if ( ( (QMouseEvent*)e)->button() == RightButton )		return FALSE; // ignore RMB	    if ( w->customWhatsThis() )		return FALSE;	    QWhatsThisPrivate::WhatsThisItem * i = 0;	    while( w && !i ) {		i = dict->find( w );		if ( !i )		    w = w->parentWidget();	    }	    leaveWhatsThisMode();	    if (!i )		return TRUE;	    QPoint pos =  ((QMouseEvent*)e)->pos();	    if ( i->whatsthis )		say( w, i->whatsthis->text( pos ), w->mapToGlobal(pos) );	    else		say( w, i->s, w->mapToGlobal(pos) );	    return TRUE;	} else if ( e->type() == QEvent::MouseButtonRelease ) {	    if ( ( (QMouseEvent*)e)->button() == RightButton )		return FALSE; // ignore RMB	    return !o->isWidgetType() || !((QWidget*)o)->customWhatsThis();	} else if ( e->type() == QEvent::MouseMove ) {	    return !o->isWidgetType() || !((QWidget*)o)->customWhatsThis();	} else if ( e->type() == QEvent::KeyPress ) {	    QKeyEvent* kev = (QKeyEvent*)e;	    if (kev->key() == Qt::Key_Escape) {		leaveWhatsThisMode();		return TRUE;	    } else if ( o->isWidgetType() && ((QWidget*)o)->customWhatsThis() ) 		return FALSE;	    else if ( kev->key() == Key_Menu ||		      ( kev->key() == Key_F10 && kev->state() == ShiftButton ) )		return FALSE; // ignore these keys, they are used for context menus	    else if ( kev->state() == kev->stateAfter() &&		      kev->key() != Key_Meta )  // not a modifier key		leaveWhatsThisMode();	} else if ( e->type() == QEvent::MouseButtonDblClick ) {	    return TRUE;	}	break;    case Inactive: 	if ( e->type() == QEvent::Accel && 	     ((QKeyEvent *)e)->key() == Key_F1 && 	     o->isWidgetType() && 	     ((QKeyEvent *)e)->state() == ShiftButton ) { 	    QWidget * w = ((QWidget *)o)->focusWidget(); 	    QWhatsThisPrivate::WhatsThisItem *i = w ? dict->find(w) : 0; 	    if ( i && !i->s.isNull() ) {		if ( i->whatsthis )		    say( w, i->whatsthis->text( QPoint(0,0) ),			 w->mapToGlobal( w->rect().center() ) );		else		    say( w, i->s, w->mapToGlobal( w->rect().center() ));		((QKeyEvent *)e)->accept();		return TRUE; 	    } 	}	break;    }    return FALSE;}void QWhatsThisPrivate::setUpWhatsThis(){    if ( !wt )	wt = new QWhatsThisPrivate();}void QWhatsThisPrivate::tearDownWhatsThis(){    delete wt;    wt = 0;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产色综合久久| 日韩一卡二卡三卡四卡| 欧美在线播放高清精品| 在线观看免费亚洲| 欧美一区二区国产| 亚洲一区二区三区免费视频| 国产精品系列在线| 亚洲色图第一区| 日韩有码一区二区三区| 国产精品香蕉一区二区三区| 色综合久久中文字幕| av不卡免费在线观看| 成人动漫在线一区| 欧美一区三区四区| 亚洲国产综合91精品麻豆| 91精品国产免费久久综合| 日韩午夜中文字幕| 石原莉奈在线亚洲二区| 欧洲一区在线电影| 国产精品欧美久久久久一区二区| 欧美一级国产精品| 日韩免费视频一区二区| 精品免费日韩av| 欧美丰满少妇xxxbbb| 日韩欧美综合一区| 亚洲国产精品精华液2区45| 欧美国产一区在线| 一级做a爱片久久| 国产乱码精品一区二区三区忘忧草 | 免费观看成人鲁鲁鲁鲁鲁视频| 成人在线视频首页| 中文字幕一区二区三区av| 色哟哟一区二区在线观看| 欧美精品一区二区三区蜜桃视频| 亚洲成人激情综合网| 91精品国产乱| 亚洲天堂成人网| 99久久综合国产精品| 国产欧美日产一区| 国产精品538一区二区在线| 日韩欧美在线影院| 日本va欧美va瓶| 7777精品伊人久久久大香线蕉的 | 色屁屁一区二区| 亚洲一区国产视频| 欧美撒尿777hd撒尿| 视频在线观看一区二区三区| 欧美日韩精品一区二区三区四区| 亚洲国产视频a| 欧美一区二区在线免费观看| 毛片一区二区三区| 久久先锋影音av鲁色资源网| 国产伦理精品不卡| 国产精品国产馆在线真实露脸| 97久久超碰精品国产| 国产日韩欧美麻豆| 91免费精品国自产拍在线不卡| 亚洲色图一区二区| 欧美一区二区三区视频在线观看 | 国产伦理精品不卡| 久久久精品影视| 色婷婷综合激情| 亚洲国产视频a| 日韩欧美www| caoporm超碰国产精品| 亚洲激情图片一区| 久久一夜天堂av一区二区三区| 欧美日本国产一区| 日本女优在线视频一区二区| 日韩欧美国产三级电影视频| 99精品视频一区| 日韩精品电影在线| 欧美精品日韩综合在线| 韩国av一区二区三区在线观看| 国产色一区二区| 色哟哟在线观看一区二区三区| 视频一区二区三区在线| 国产精品三级电影| 91麻豆精品国产91久久久资源速度 | 欧美国产日产图区| 欧美丰满嫩嫩电影| 91官网在线免费观看| 国产一区二区不卡在线| 亚洲国产成人av| 亚洲欧美精品午睡沙发| 国产色爱av资源综合区| 日韩精品一区二区在线观看| 欧美日韩一区二区在线视频| 99精品视频在线免费观看| 精品一区二区av| 麻豆91免费观看| 日本成人中文字幕| 日本大胆欧美人术艺术动态| 亚洲一区二区偷拍精品| 一区二区三区四区在线免费观看 | 精品sm捆绑视频| 宅男噜噜噜66一区二区66| 在线成人av影院| 欧美男生操女生| 91精品免费在线| 欧美一级片免费看| 欧美va在线播放| 亚洲一区二区三区四区的| 国产精品久久久久影院色老大| 中文字幕一区二区三区在线播放 | 丁香另类激情小说| 成人h动漫精品| 5566中文字幕一区二区电影 | 91天堂素人约啪| 在线不卡免费av| 久久人人97超碰com| 日韩写真欧美这视频| 欧美成人一区二区| 日韩三级.com| 中文字幕免费在线观看视频一区| 欧美激情一区二区在线| 亚洲人成网站色在线观看| 一级特黄大欧美久久久| 手机精品视频在线观看| 激情综合色综合久久| 91免费精品国自产拍在线不卡| 欧美人妇做爰xxxⅹ性高电影| 日韩欧美一二三| 中文在线一区二区| 亚洲日本在线看| 日本麻豆一区二区三区视频| 久久99国产精品久久| 91麻豆精品在线观看| 欧美一级片在线观看| 国产精品成人午夜| 日本免费在线视频不卡一不卡二 | 美国精品在线观看| av电影在线观看不卡| 宅男噜噜噜66一区二区66| 国产欧美日韩在线看| 日韩avvvv在线播放| 欧美日韩精品综合在线| 精品少妇一区二区三区免费观看 | 91精品国产乱码| 亚洲乱码国产乱码精品精小说| 日韩av成人高清| 在线免费观看日本欧美| 国产性色一区二区| 日本中文一区二区三区| 91福利社在线观看| 国产精品乱码一区二三区小蝌蚪| 日本在线不卡一区| 99热在这里有精品免费| 国产网站一区二区三区| 一区二区三区日韩在线观看| 韩国成人在线视频| 日韩欧美一二区| 另类小说综合欧美亚洲| 日本福利一区二区| 亚洲色图制服诱惑| 91免费在线视频观看| www国产精品av| 国产成人免费在线视频| 久久久不卡影院| 肉肉av福利一精品导航| 欧美乱妇一区二区三区不卡视频| 亚洲综合成人在线| 欧美另类z0zxhd电影| 天天色天天操综合| 欧美一区二区在线观看| 久久黄色级2电影| 久久美女艺术照精彩视频福利播放| 麻豆成人91精品二区三区| 色婷婷综合中文久久一本| 中文字幕综合网| 欧美裸体一区二区三区| 成人国产精品免费观看视频| 午夜精品久久一牛影视| 欧美激情一区二区| 3atv一区二区三区| 99久久国产综合色|国产精品| 免费人成在线不卡| 亚洲欧美乱综合| 久久久精品黄色| 91精品久久久久久久91蜜桃| 成人综合在线观看| 激情文学综合丁香| 激情综合网激情| 亚洲中国最大av网站| 国产精品成人一区二区艾草| 欧美成人一区二区三区| 欧美日韩高清一区| 欧洲中文字幕精品| 91在线观看美女| 国产精品18久久久久久久网站| 日韩电影免费在线观看网站| 亚洲乱码国产乱码精品精98午夜| 精品国产免费人成在线观看| 69成人精品免费视频| 欧美日韩国产不卡| 欧美丰满美乳xxx高潮www| 欧美另类高清zo欧美| 欧美丰满少妇xxxxx高潮对白| 91久久国产综合久久| 91麻豆国产精品久久|