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

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

?? qwhatsthis.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? 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;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产又黄又大久久| 国产一区二区视频在线播放| 国产精品免费看片| 国产农村妇女毛片精品久久麻豆| 精品成人私密视频| 欧美成人a在线| 久久久www成人免费毛片麻豆| 久久一日本道色综合| 国产精品青草综合久久久久99| 国产色91在线| 亚洲午夜免费视频| 狂野欧美性猛交blacked| 国产高清精品久久久久| 成人av综合在线| 欧美日韩国产成人在线免费| 日韩欧美国产综合在线一区二区三区| 日韩三级视频中文字幕| 久久综合九色综合久久久精品综合| 久久日韩精品一区二区五区| 国产精品护士白丝一区av| 亚洲综合无码一区二区| 国产精品自在欧美一区| 欧美三级日韩三级国产三级| 久久久久亚洲蜜桃| 午夜国产精品一区| 一本一道久久a久久精品综合蜜臀| 欧美日本在线看| 亚洲美腿欧美偷拍| 国产精品小仙女| 欧美一区二区三区白人| 亚洲精品国产无天堂网2021| 精品中文字幕一区二区| 日本高清不卡视频| 国产精品成人网| 韩国三级中文字幕hd久久精品| 欧美色网站导航| 亚洲精品成人精品456| 成人在线视频一区二区| 国产午夜精品一区二区三区嫩草| 午夜精品久久久久久久99樱桃| 色呦呦国产精品| 国产精品乱码一区二区三区软件| 国产精品亚洲专一区二区三区| 精品视频全国免费看| 亚洲一区二区三区四区五区中文| 91一区二区在线| 亚洲精品成人少妇| 欧美人妇做爰xxxⅹ性高电影| 亚洲无人区一区| 日韩欧美久久久| 国产精品主播直播| 国产精品国产三级国产有无不卡 | 国产一区二区成人久久免费影院| 欧美videofree性高清杂交| 一本色道久久综合亚洲精品按摩| voyeur盗摄精品| 一区二区日韩av| 337p亚洲精品色噜噜狠狠| 激情综合五月婷婷| 国产精品久久久久久一区二区三区 | 精品国产乱码久久久久久蜜臀| 六月丁香婷婷色狠狠久久| 久久久综合九色合综国产精品| 成人黄色免费短视频| 亚洲aaa精品| 欧美极品aⅴ影院| 欧美日韩激情一区| 国产成人高清在线| 婷婷中文字幕一区三区| 国产午夜精品理论片a级大结局| 在线观看视频91| 麻豆国产欧美一区二区三区| 国产精品久久久久久久久晋中| 欧美做爰猛烈大尺度电影无法无天| 奇米888四色在线精品| 一区二区三区视频在线看| 欧美高清在线一区二区| 日韩一区二区三区四区五区六区| 99re这里只有精品视频首页| 精品一区二区免费| 美脚の诱脚舐め脚责91 | 91丨porny丨中文| 狠狠v欧美v日韩v亚洲ⅴ| 视频在线观看一区二区三区| 综合中文字幕亚洲| 欧美国产日本韩| 国产精品天美传媒沈樵| 国产亚洲一二三区| 久久综合久久鬼色中文字| 久久久久久久一区| 国产女主播在线一区二区| 国产精品污污网站在线观看| 国产视频一区二区在线观看| 国产片一区二区| 欧美极品xxx| 亚洲一区在线观看免费观看电影高清| 一区二区三区国产| 五月婷婷综合网| 丝袜美腿成人在线| 国产ts人妖一区二区| 99精品久久久久久| 欧美日韩黄色一区二区| 日韩精品专区在线| 亚洲人被黑人高潮完整版| 亚洲成人7777| 成人看片黄a免费看在线| 97se亚洲国产综合自在线| 在线播放91灌醉迷j高跟美女| 欧美不卡123| 亚洲精品久久久久久国产精华液| 五月天精品一区二区三区| 国产成人精品免费在线| 欧美一区日本一区韩国一区| 中文字幕不卡在线播放| 麻豆精品国产传媒mv男同| 99精品久久99久久久久| 26uuu另类欧美亚洲曰本| 亚洲精品五月天| 国产成a人亚洲精| 精品欧美久久久| 丝瓜av网站精品一区二区| 色综合久久久久综合99| 久久免费视频色| 精品一区二区三区视频在线观看 | 国产欧美精品区一区二区三区 | 欧美日韩国产一级片| √…a在线天堂一区| yourporn久久国产精品| 欧美经典一区二区三区| 国产一区在线观看视频| 日韩欧美国产综合在线一区二区三区| 亚洲午夜免费福利视频| 91蝌蚪porny成人天涯| 成人免费在线视频| 99国产精品久久久久| 亚洲欧洲色图综合| 在线视频一区二区三| 亚洲综合在线电影| 欧美天堂一区二区三区| 亚洲h动漫在线| 精品久久久久久久一区二区蜜臀| 久久国产精品无码网站| 国产欧美一区二区精品仙草咪| 黄色小说综合网站| 欧美一区二区三区小说| 亚洲激情中文1区| 日韩一区二区中文字幕| 国产精品一级在线| 亚洲精品欧美在线| 欧美成人女星排名| 99久久久久久| 性久久久久久久久| 久久久一区二区| 欧美在线观看视频在线| 麻豆一区二区三| 亚洲欧美一区二区三区极速播放| 7777精品伊人久久久大香线蕉最新版| 国产一区二区三区av电影| 一区二区理论电影在线观看| 91麻豆精品国产91久久久更新时间 | 美腿丝袜亚洲三区| 亚洲免费观看高清完整版在线 | 久久精品国产在热久久| 亚洲女同一区二区| 中日韩av电影| 精品国产成人系列| 91精品午夜视频| 91精品福利视频| 波多野结衣精品在线| 国模套图日韩精品一区二区| 亚洲天堂久久久久久久| 国产欧美日韩中文久久| 欧美成人精品3d动漫h| 日韩三级av在线播放| 91麻豆精品国产无毒不卡在线观看| 成人听书哪个软件好| 国产一区免费电影| 日韩av在线免费观看不卡| 香蕉乱码成人久久天堂爱免费| 自拍视频在线观看一区二区| 亚洲欧美日本韩国| 亚洲午夜成aⅴ人片| 亚洲不卡av一区二区三区| 亚洲综合精品自拍| 日本va欧美va精品| 丁香天五香天堂综合| 97精品超碰一区二区三区| 欧美亚洲国产怡红院影院| 欧美日韩高清在线播放| 日韩欧美卡一卡二| 国产精品电影一区二区| 一区二区三区中文字幕精品精品| 亚洲综合色网站| 蜜臀国产一区二区三区在线播放| 九一九一国产精品| 成人91在线观看| 日韩免费福利电影在线观看| 91精品久久久久久久久99蜜臂| 国产大陆a不卡| 亚洲日本一区二区三区|