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

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

?? qbutton.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/****************************************************************************** $Id: qt/src/widgets/qbutton.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QButton widget class**** Created : 940206**** 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 "qbutton.h"#ifndef QT_NO_BUTTON#include "qbuttongroup.h"#include "qbitmap.h"#include "qpainter.h"#include "qtimer.h"#include "qaccel.h"#include "qpixmapcache.h"#include "qfocusdata.h"#include "qapplication.h"#include "qpushbutton.h"#include <ctype.h>static const int autoRepeatDelay  = 300;static const int autoRepeatPeriod = 100;#ifdef _WS_QWS_// Small in Qt/Embedded - 5K on 32bppstatic const int drawingPixWidth  = 64;static const int drawingPixHeight = 20;#else// 120K on 32bppstatic const int drawingPixWidth  = 300;static const int drawingPixHeight = 100;#endif#ifdef QT_KEYPAD_MODEextern bool qt_modalEditingEnabled;#endif/*  Returns a pixmap of dimension (drawingPixWidth x drawingPixHeight). The  pixmap is used by paintEvent for flicker-free drawing. */static QPixmap *drawpm = 0;static void cleanupButtonPm(){    delete drawpm;    drawpm = 0;}static inline void makeDrawingPixmap(){    if ( !drawpm ) {	qAddPostRoutine( cleanupButtonPm );	drawpm = new QPixmap( drawingPixWidth, drawingPixHeight );	CHECK_PTR( drawpm );    }}struct QButtonData{    QButtonData() {#ifndef QT_NO_BUTTONGROUP	group = 0;#endif#ifndef QT_NO_ACCEL	a = 0;#endif    }#ifndef QT_NO_BUTTONGROUP    QButtonGroup *group;#endif    QTimer timer;#ifndef QT_NO_ACCEL    QAccel *a;#endif};void QButton::ensureData(){    if ( !d ) {	d = new QButtonData;	CHECK_PTR( d );	connect(&d->timer, SIGNAL(timeout()), this, SLOT(autoRepeatTimeout()));    }}/*! Returns a pointer to the group of which this button is a member.  If the button is not a member of any QButtonGroup, this function  returns 0.  \sa setGroup() QButtonGroup*/QButtonGroup *QButton::group() const{#ifndef QT_NO_BUTTONGROUP    return d ? d->group : 0;#else    return 0;#endif}void QButton::setGroup( QButtonGroup* g ){#ifndef QT_NO_BUTTONGROUP    ensureData();    d->group = g;#endif}QTimer *QButton::timer(){    ensureData();    return &d->timer;}// NOT REVISED/*!  \class QButton qbutton.h  \brief The QButton class is the abstract base class of button  widgets, providing functionality common to buttons.  \ingroup abstractwidgets  The QButton class implements an abstract button, and lets subclasses  specify how to reply to user actions and how to draw the button.  QButton provides both push and toggle buttons.  The QRadioButton and  QCheckBox classes provide only toggle buttons, QPushButton and  QToolButton provide both toggle and push buttons.  Any button can have either a text or pixmap label.  setText() sets  the button to be a text button and setPixmap() sets it to be a  pixmap button.  The text/pixmap is manipulated as necessary to  create "disabled" appearance when the button is disabled.  QButton provides most of the states used for buttons:  <ul>  <li>isDown() determines whether the button is \e pressed down.  <li>isOn() determines whether the button is \e on.  Only toggle buttons can be switched on and off  (see below).  <li>isEnabled() determines whether the button can be pressed by the  user.  <li>setAutoRepeat() determines whether the button will auto-repeat  if the user holds it down.  <li>setToggleButton() determines whether the button is a toggle  button or not.  </ul>  The difference between isDown() and isOn() is as follows:  When the user clicks a toggle button to toggle it on, the button is  first \e pressed, then released into \e on state.  When the user  clicks it again (to toggle it off) the button moves first to the \e  pressed state, then to the \e off state (isOn() and isDown() are  both FALSE).  Default buttons (as used in many dialogs) are provided by  QPushButton::setDefault() and QPushButton::setAutoDefault().  QButton provides four signals:  <ul>  <li>pressed() is emitted when the left mouse button is pressed while  the mouse cursor is inside the button.  <li>released() is emitted when the left mouse button is released.  <li>clicked() is emitted when the button is first pressed then  released, or when the accelerator key is typed, or when animateClick()  is called.  <li>toggled(bool) is emitted when the state of a toggle button changes.  <li>stateChanged(int) is emitted when the state of a tristate			toggle button changes.  </ul>  If the button is a text button with "&" in its text, QButton creates  an automatic accelerator key.  This code creates a push button  labelled "Rock & Roll" (where the c is underscored).  The button  gets an automatic accelerator key, Alt-C:  \code    QPushButton *p = new QPushButton( "Ro&ck && Roll", this );  \endcode  In this example, when the user presses Alt-C the button will  call animateClick().  You can also set a custom accelerator using the setAccel() function.  This is useful mostly for pixmap buttons since they have no  automatic accelerator.  \code    QPushButton *p;    p->setPixmap( QPixmap("print.png") );    p->setAccel( ALT+Key_F7 );  \endcode  All of the buttons provided by Qt (\l QPushButton, \l QToolButton,  \l QCheckBox and \l QRadioButton) can display both text and pixmaps.  To subclass QButton, you have to reimplement at least drawButton()  (to draw the button's outskirts) and drawButtonLabel() (to draw its  text or pixmap).  It is generally advisable to reimplement  sizeHint() as well, and sometimes hitButton() (to determine whether  a button press is within the button).  To reduce flickering the QButton::paintEvent() sets up a pixmap that the  drawButton() function draws in. You should not reimplement paintEvent()  for a subclass of QButton unless you want to take over all drawing.  \sa QButtonGroup*//*! \enum QButton::ToggleType  This enum type defines what a button can do in response to a  mouse/keyboard press: <ul>  <li> \c SingleShot - pressing the button causes an action, then the  button returns to the unpressed state.  <li> \c Toggle - pressing the button toggles it between an \c On and  and \c Off state.  <li> \c Tristate - pressing the button cycles between the three  states \c On, \c Off and \c NoChange  </ul>*//*! \enum QButton::ToggleState  This enum defines the state of a toggle button at any moment.  The possible values are: <ul>  <li> \c Off - the button is in the "off" state  <li> \c NoChange - the button is in the default/unchanged state  <li> \c On - the button is in the "on" state  </ul>*//*!  Constructs a standard button with a parent widget and a name.  If \a parent is a QButtonGroup, this constructor calls  QButtonGroup::insert().*/QButton::QButton( QWidget *parent, const char *name, WFlags f )    : QWidget( parent, name, f ){    bpixmap    = 0;    toggleTyp  = SingleShot;			// button is simple    buttonDown = FALSE;				// button is up    stat       = Off;				// button is off    mlbDown    = FALSE;				// mouse left button up    autoresize = FALSE;				// not auto resizing    animation  = FALSE;				// no pending animateClick    repeat     = FALSE;				// not in autorepeat mode    d	       = 0;#ifndef QT_NO_BUTTONGROUP    if ( parent && parent->inherits("QButtonGroup") ) {	setGroup((QButtonGroup*)parent);	group()->insert( this );		// insert into button group    }#endif    setFocusPolicy( TabFocus );}/*!  Destructs the button, deleting all its child widgets.*/QButton::~QButton(){#ifndef QT_NO_BUTTONGROUP    if ( group() )	group()->remove( this );#endif    delete bpixmap;    delete d;}/*!  \fn void QButton::pressed()  This signal is emitted when the button is pressed down.  \sa released(), clicked()*//*!  \fn void QButton::released()  This signal is emitted when the button is released.  \sa pressed(), clicked(), toggled()*//*!  \fn void QButton::clicked() This signal is emitted when the button  is activated, i.e. first pressed down and then released when the  mouse cursor is inside the button, or when the accelerator key is  typed, or when animateClick() is called.  \sa pressed(), released(), toggled()*//*!  \fn void QButton::toggled( bool on )  This signal is emitted whenever a toggle button changes status.  \e on is TRUE if the button is on, or FALSE if the button is off.  This may be the result of a user action, toggle() slot activation,  or because setOn() was called.  \sa clicked()*//*!  \fn void QButton::stateChanged( int state )  This signal is emitted whenever a toggle button changes status.  \e state is 2 if the button is on, 1 if it is in the  \link QCheckBox::setTristate() "no change" state\endlink  or 0 if the button is off.  This may be the result of a user action, toggle() slot activation,  setState(), or because setOn() was called.  \sa clicked()*//*!  \fn QString QButton::text() const  Returns the button text, or  \link QString::operator!() null string\endlink  if the button has no text.  \sa setText()*//*!  Sets the button to display \e text.  If the text contains an ampersand, QButton creates an automatic  accelerator for it, such as  Alt-c for "&Cancel".  \sa text(), setPixmap(), setAccel(), QPixmap::mask()*/void QButton::setText( const QString &text ){    if ( btext == text )	return;    btext = text;    if ( bpixmap ) {	delete bpixmap;	bpixmap = 0;    }    if ( autoresize )	adjustSize();#ifndef QT_NO_ACCEL    setAccel( QAccel::shortcutKey( btext ) );#endif    update();    updateGeometry();}/*!  \fn const QPixmap *QButton::pixmap() const  Returns the button pixmap, or 0 if the button has no pixmap.*//*!  Sets the button to display \a pixmap  If \a pixmap is monochrome (i.e. it is a QBitmap or its \link  QPixmap::depth() depth\endlink is 1) and it does not have a mask,  this function sets the pixmap to be its own mask. The purpose of  this is to draw transparent bitmaps, which is important for  e.g. toggle buttons.  \sa pixmap(), setText(), setAccel(), QPixmap::mask()*/void QButton::setPixmap( const QPixmap &pixmap ){    if ( bpixmap && bpixmap->serialNumber() == pixmap.serialNumber() )	return;    bool newSize;    if ( bpixmap ) {	newSize = pixmap.width() != bpixmap->width() ||		  pixmap.height() != bpixmap->height();	*bpixmap = pixmap;    } else {	newSize = TRUE;	bpixmap = new QPixmap( pixmap );	CHECK_PTR( bpixmap );    }    if ( bpixmap->depth() == 1 && !bpixmap->mask() )	bpixmap->setMask( *((QBitmap *)bpixmap) );    if ( !btext.isNull() )	btext = QString::null;    if ( autoresize && newSize )	adjustSize();    setAccel( 0 );    if ( autoMask() )	updateMask();    update();    updateGeometry();}/*!  Returns the accelerator key currently set for the button, or 0  if no accelerator key has been set.  \sa setAccel()*/int QButton::accel() const{#ifndef QT_NO_ACCEL    return d && d->a ? d->a->key( 0 ) : 0;#else    return 0;#endif}/*!  Specifies an accelerator \a key for the button, or removes the  accelerator if \a key is 0.  Setting a button text containing a shortcut character (for  example the 'x' in E&xit) automatically defines an ALT+letter  accelerator for the button.  You only need to call this function in order to specify a custom  accelerator.  Example:  \code    QPushButton *b1 = new QPushButton;    b1->setText( "&OK" );		// sets accel ALT+'O'    QPushButton *b2 = new QPushButton;    b2->setPixmap( printIcon );		// pixmap instead of text    b2->setAccel( CTRL+'P' );		// custom accel  \endcode  \sa accel(), setText(), QAccel*/void QButton::setAccel( int key ){#ifndef QT_NO_ACCEL    if ( d && d->a )	d->a->clear();    if ( !key )	return;    ensureData();    if ( !d->a )	d->a = new QAccel( this, "buttonAccel" );    d->a->connectItem( d->a->insertItem( key, 0 ),		       this, SLOT(animateClick()) );#endif}/*!  \fn bool QButton::autoResize() const  \obsolete  Strange pre-layout stuff.  Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing is  disabled.  Auto-resizing is disabled by default.  \sa setAutoResize()*//*!\obsolete  Strange pre-layout stuff.  Enables auto-resizing if \e enable is TRUE, or disables it if \e enable is  FALSE.  When auto-resizing is enabled, the button will resize itself whenever  the contents change.  \sa autoResize(), adjustSize()*/void QButton::setAutoResize( bool enable ){    if ( (bool)autoresize != enable ) {	autoresize = enable;	if ( autoresize )	    adjustSize();			// calls resize which repaints    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人在线视频免费播放| 91视频免费播放| 成人的网站免费观看| 4438x亚洲最大成人网| 国产精品素人视频| 美女视频网站黄色亚洲| 欧美午夜宅男影院| 国产精品毛片高清在线完整版| 日韩精品成人一区二区三区| 一本大道av伊人久久综合| 国产欧美日韩另类视频免费观看| 五月天久久比比资源色| 欧美在线观看18| 亚洲男人电影天堂| 9人人澡人人爽人人精品| 久久一区二区三区国产精品| 日韩成人精品在线| 欧美精选一区二区| 亚洲成av人片| 精品视频一区三区九区| 一区二区三区国产精华| 波多野结衣一区二区三区| 精品久久久久久久久久久久包黑料 | 一本久久精品一区二区| 国产欧美一区二区三区在线老狼| 日本欧美肥老太交大片| 91精品国产综合久久精品| 亚洲成人av一区二区| 欧美一a一片一级一片| 中文字幕亚洲一区二区av在线 | 国产精品亚洲视频| 日韩欧美国产三级| 美国三级日本三级久久99| 欧美一级黄色录像| 精品一区二区免费在线观看| 日韩精品影音先锋| 国产在线观看一区二区| 精品粉嫩超白一线天av| 国产传媒欧美日韩成人| 久久久久国产精品厨房| 不卡影院免费观看| 亚洲精品五月天| 欧洲激情一区二区| 日韩综合一区二区| 久久在线免费观看| 91在线视频在线| 亚洲v精品v日韩v欧美v专区| 日韩三级视频中文字幕| 国产美女主播视频一区| 国产精品区一区二区三区| 91视视频在线观看入口直接观看www| 亚洲精品高清视频在线观看| 6080亚洲精品一区二区| 国产精品综合久久| 亚洲蜜臀av乱码久久精品蜜桃| 欧美日韩一区二区在线观看| 精品一区二区在线免费观看| 国产精品久久久久三级| 欧美日韩精品一区视频| 国产一区二区精品久久99| 国产精品的网站| 91麻豆精品国产综合久久久久久| 国产一区999| 一区二区在线观看不卡| 日韩一区二区免费高清| 国产福利一区在线观看| 亚洲精品成人在线| 久久久www成人免费毛片麻豆 | 欧美日韩激情在线| 韩国午夜理伦三级不卡影院| 中文字幕亚洲区| 日韩欧美区一区二| 在线观看免费成人| 国产传媒欧美日韩成人| 视频精品一区二区| 亚洲欧美色图小说| 亚洲精品一区二区三区福利| 欧美最猛性xxxxx直播| 国产成人免费视频网站| 青青草国产成人99久久| 亚洲美女精品一区| 国产日韩欧美高清在线| 欧美疯狂做受xxxx富婆| 99久精品国产| 国产99久久久国产精品潘金网站| 亚洲观看高清完整版在线观看| 久久久精品人体av艺术| 欧美一级国产精品| 欧美吻胸吃奶大尺度电影| 成人av在线网站| 国产精品正在播放| 美女被吸乳得到大胸91| 亚洲成人av电影在线| 综合久久综合久久| 国产精品麻豆一区二区| 2023国产精品| 精品精品国产高清一毛片一天堂| 欧美日韩色综合| 欧美最新大片在线看| 色综合一个色综合亚洲| 99久久伊人网影院| 成人美女视频在线看| 国产91清纯白嫩初高中在线观看| 美女性感视频久久| 久久国产尿小便嘘嘘| 日韩 欧美一区二区三区| 亚洲h在线观看| 亚洲午夜久久久| 亚洲国产精品久久人人爱 | 日韩精品亚洲专区| 午夜影院久久久| 石原莉奈在线亚洲三区| 日本在线不卡视频一二三区| 亚洲一区二区中文在线| 亚洲国产欧美另类丝袜| 午夜视频在线观看一区二区| 亚洲高清免费观看| 三级亚洲高清视频| 久久99在线观看| 国产美女视频91| 成人一区二区视频| 色999日韩国产欧美一区二区| 91网页版在线| 欧美撒尿777hd撒尿| 欧美高清hd18日本| 久久综合网色—综合色88| 精品99999| 中文字幕精品—区二区四季| 亚洲欧洲成人自拍| 天天影视色香欲综合网老头| 青青草国产成人99久久| 国产一区二区在线看| 成人免费视频网站在线观看| 91免费精品国自产拍在线不卡| 色哟哟国产精品免费观看| 欧美在线观看视频在线| 日韩欧美国产一区在线观看| 国产三级一区二区| 亚洲黄网站在线观看| 奇米影视在线99精品| 国产成人欧美日韩在线电影| 91看片淫黄大片一级在线观看| 欧美日韩小视频| 26uuu色噜噜精品一区二区| 国产精品萝li| 视频一区二区中文字幕| 国产高清精品在线| 欧美日韩国产首页在线观看| 日韩精品一区二区三区视频 | 欧美大片拔萝卜| 中文字幕在线播放不卡一区| 一区二区三区不卡在线观看| 免费一区二区视频| 国产91丝袜在线18| 91精品国产高清一区二区三区| 国产日韩欧美高清在线| 日韩二区三区在线观看| 成人动漫中文字幕| 精品国精品自拍自在线| 亚洲精品国产视频| 国产成人精品1024| 91精品欧美一区二区三区综合在| 国产女人18毛片水真多成人如厕| 亚洲高清久久久| 成人毛片老司机大片| 精品久久免费看| 悠悠色在线精品| 成人污视频在线观看| 日韩欧美成人一区二区| 亚洲自拍都市欧美小说| 成人美女视频在线看| 日韩免费高清电影| 香蕉影视欧美成人| 色综合中文字幕国产 | 91麻豆精品国产91久久久资源速度 | 午夜不卡av免费| 91在线国产福利| 国产欧美精品一区二区三区四区| 日韩精品三区四区| 在线观看中文字幕不卡| 亚洲欧美在线另类| 丁香啪啪综合成人亚洲小说| 欧美va亚洲va在线观看蝴蝶网| 午夜久久电影网| 精品视频1区2区| 亚洲美女屁股眼交| 91丨国产丨九色丨pron| 国产精品乱人伦中文| 国产69精品久久99不卡| 国产天堂亚洲国产碰碰| 国产精品一级在线| 久久亚洲一区二区三区明星换脸| 日本午夜精品视频在线观看| 欧美日韩激情一区| 视频精品一区二区| 欧美一区二区三区免费观看视频 | 亚洲精品成a人| 色天天综合久久久久综合片| 《视频一区视频二区| 色综合中文综合网|