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

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

?? qcheckbox.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
字號:
/****************************************************************************** $Id: qt/src/widgets/qcheckbox.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QCheckBox class**** Created : 940222**** 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 "qcheckbox.h"#ifndef QT_NO_CHECKBOX#include "qpainter.h"#include "qdrawutil.h"#include "qpixmap.h"#include "qpixmapcache.h"#include "qbitmap.h"#include "qtextstream.h"#include "qapplication.h"// NOT REVISED/*!  \class QCheckBox qcheckbox.h  \brief The QCheckBox widget provides a check box with a text label.  \ingroup basic  QCheckBox and QRadioButton are both option buttons. That is, they  can be switched on (checked) or off (unchecked). The classes differ  in how the choices for the user are restricted. Radio buttons define  a "one of many" choice, while check-boxes provide "many of many"  choices.  While it is technically possible to implement radio-behaviour with  check boxes and vice versa, it's strongly recommended to stick with  the well-known semantics. Otherwise your users would be pretty  confused.  Use QButtonGroup to group check-buttons visually.  Whenver a check box is checked or cleared, it emits the signal  toggled(). Connect to this signal if you want to trigger an action  each time the box changes state. Otherwise, use isChecked() to query  whether or not a particular check box is selected.  In addition to the usual checked and unchecked states, QCheckBox  optionally provides a third state to indicate "no change".  This is  useful whenever you need to give the user the option of neither  setting nor unsetting an option. If you need that third state,  enable it with setTristate() and use state() to query the current  toggle state. When a tristate box changes state, it emits the  stateChanged() signal.  \important text, setText, text, pixmap, setPixmap, accel, setAccel,  isToggleButton, setDown, isDown, isOn, state, autoRepeat,  isExclusiveToggle, group, setAutoRepeat, toggle, pressed, released,  clicked, toggled, state stateChanged  <img src=qchkbox-m.png> <img src=qchkbox-w.png>  \sa QButton QRadioButton  <a href="guibooks.html#fowler">Fowler: Check Box.</a>*//*!  Constructs a check box with no text.  The \e parent and \e name arguments are sent to the QWidget constructor.*/QCheckBox::QCheckBox( QWidget *parent, const char *name )	: QButton( parent, name, WRepaintNoErase | WResizeNoErase | WMouseNoMask ){    setToggleButton( TRUE );    setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );}/*!  Constructs a check box with a text.  The \e parent and \e name arguments are sent to the QWidget constructor.*/QCheckBox::QCheckBox( const QString &text, QWidget *parent, const char *name )	: QButton( parent, name, WRepaintNoErase | WResizeNoErase | WMouseNoMask ){    setText( text );    setToggleButton( TRUE );    setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );}/*!  \fn bool QCheckBox::isChecked() const  Returns TRUE if the check box is checked, or FALSE if it is not checked.  \sa setChecked()*//*!  \fn void QCheckBox::setChecked( bool check )  Checks the check box if \e check is TRUE, or unchecks it if \e check  is FALSE.  \sa isChecked()*//*!  Sets the checkbox into the "no change" state.  \sa setTristate()*/void QCheckBox::setNoChange(){    setTristate(TRUE);    setState( NoChange );}/*!  Makes the check box a tristate check box if \a y is TRUE.  A tristate  check box provides an additional state NoChange.  Use tristate check boxes whenever you need to give the user the  option of neither setting nor unsetting an option. A typical example  is the "Italic" check box in the font dialog of a word processor  when the marked text is partially Italic and partially not.  \sa isTristate(), setNoChange() stateChanged(), state()*/void QCheckBox::setTristate(bool y){    setToggleType( y ? Tristate : Toggle );}/*!  Returns TRUE if the checkbox is a tristate checkbox. Otherwise returns  FALSE.  \sa setTristate()*/bool QCheckBox::isTristate() const{    return toggleType() == Tristate;}static int extraWidth( const QWidget *w ){    if ( w->style().guiStyle() == Qt::MotifStyle )	return 8;    else	return w->style().pixelMetric(QStyle::CheckBoxGap);}/*!\reimp*/QSize QCheckBox::sizeHint() const{    // Any more complex, and we will use style().itemRect()    // NB: QCheckBox::sizeHint() is similar    constPolish();    QSize sz;    if (pixmap()) {	sz = pixmap()->size();    } else {	sz = fontMetrics().size( ShowPrefix, text() );    }    QSize bmsz = style().indicatorSize();    if ( sz.height() < bmsz.height() )	sz.setHeight( bmsz.height() );    return (sz + QSize( bmsz.width() + (style()==MotifStyle ? 1 : 0)	+ (text().isEmpty() ? 0 : 4 + extraWidth(this)),	4 )).expandedTo( QApplication::globalStrut() );}/*!\reimp*/void QCheckBox::drawButton( QPainter *paint ){    QPainter	*p = paint;    GUIStyle	 gs = style().guiStyle();    const QColorGroup & g = colorGroup();    int		 x, y;    QFontMetrics fm = fontMetrics();    QSize lsz = fm.size(ShowPrefix, text());    QSize sz = style().indicatorSize();    x = gs == MotifStyle ? 1 : 0;    /* ### why?    if ( text().isEmpty() )	x += 1;    */    y = (height() - lsz.height() + fm.height() - sz.height())/2;#ifndef QT_NO_TEXTSTREAM#define SAVE_CHECKBOX_PIXMAPS#endif#if defined(SAVE_CHECKBOX_PIXMAPS)    QString pmkey;				// pixmap key    int kf = 0;    if ( isDown() )	kf |= 1;    if ( isEnabled() )	kf |= 2;    if ( hasFocus() )	kf |= 4;				// active vs. normal colorgroup    kf |= state() << 3;    QTextOStream os(&pmkey);    os << "$qt_check_" << style().className() << "_"			 << palette().serialNumber() << "_" << kf;    QPixmap *pm = QPixmapCache::find( pmkey );    if ( pm ) {					// pixmap exists	p->drawPixmap( x, y, *pm );	drawButtonLabel( p );	return;    }    bool use_pm = TRUE;    QPainter pmpaint;    int wx, wy;    if ( use_pm ) {	pm = new QPixmap( sz );			// create new pixmap	CHECK_PTR( pm );	pmpaint.begin( pm );	p = &pmpaint;				// draw in pixmap	wx=x;  wy=y;				// save x,y coords	x = y = 0;	p->setBackgroundColor( g.background() );    }#endif    style().drawIndicator(p, x, y, sz.width(), sz.height(), colorGroup(), state(), isDown(), isEnabled());#if defined(SAVE_CHECKBOX_PIXMAPS)    if ( use_pm ) {	pmpaint.end();	if ( backgroundPixmap() || backgroundMode() == X11ParentRelative ) {	    QBitmap bm( pm->size() );	    bm.fill( color0 );	    pmpaint.begin( &bm );	    style().drawIndicatorMask( &pmpaint, 0, 0, bm.width(), bm.height(), isOn() );	    pmpaint.end();	    pm->setMask( bm );	}	p = paint;				// draw in default device	p->drawPixmap( wx, wy, *pm );	if (!QPixmapCache::insert(pmkey, pm) )	// save in cache	    delete pm;    }#endif    drawButtonLabel( p );}/*!\reimp*/void QCheckBox::drawButtonLabel( QPainter *p ){    int x, y, w, h;    QSize sz = style().indicatorSize();    y = 0;    x = sz.width() + extraWidth( this ); //###    w = width() - x;    h = height();    style().drawItem( p, x, y, w, h,		      AlignLeft|AlignVCenter|ShowPrefix,		      colorGroup(), isEnabled(),		      pixmap(), text() );    if ( hasFocus() ) {	QRect br = style().itemRect( p, x, y, w, h,		AlignLeft|AlignVCenter|ShowPrefix,		isEnabled(),		pixmap(), text() );	QSize sz = style().indicatorSize();	br.setLeft( QMAX(br.left()-3, sz.width()+2) );	br.setRight( QMIN(br.right()+2, width()) );	br.setTop( QMAX(br.top()-2, 1) );	br.setBottom( QMIN(br.bottom()+2, height()-2) );	br = br.intersect( QRect(0,0,width(),height()) );	if ( !text().isEmpty() )	    style().drawFocusRect(p, br, colorGroup());	else {	    br.setRight( br.left() );	    br.setLeft( br.left()-16 );	    br.setTop( br.top() );	    br.setBottom( br.bottom() );	    style().drawFocusRect( p, br, colorGroup() );	}    }}/*!  \reimp*/void QCheckBox::resizeEvent( QResizeEvent* ){    int x, w, h;    QSize sz = style().indicatorSize();    x = sz.width() + extraWidth( this );    w = width() - x;    h = height();    if (isVisible()) {	QPainter p(this);	QRect br = style().itemRect( &p, x, 0, w, h,		AlignLeft|AlignVCenter|ShowPrefix,		isEnabled(),		pixmap(), text() );	update( br.right(), w, 0, h );    }    if ( autoMask() )	updateMask();}/*!  \reimp*/void QCheckBox::updateMask(){    QBitmap bm(width(),height());    bm.fill(color0);    QPainter p( &bm, this );    int x, y, w, h;    QFontMetrics fm = fontMetrics();    QSize lsz = fm.size(ShowPrefix, text());    QSize sz = style().indicatorSize();    y = 0;    x = sz.width() + extraWidth(this);    w = width() - x;    h = height();    QColorGroup cg(color1,color1,color1,color1,color1,color1,color1,color1,color0);    style().drawItem( &p, x, y, w, h,		      AlignLeft|AlignVCenter|ShowPrefix,		      cg, TRUE,		      pixmap(), text() );    x = 0;    y = (height() - lsz.height() + fm.height() - sz.height())/2;	    style().drawIndicatorMask(&p, x, y, sz.width(), sz.height(), state() );    if ( hasFocus() ) {	y = 0;	x = sz.width() + extraWidth(this);	QRect br = style().itemRect( &p, x, y, w, h,				     AlignLeft|AlignVCenter|ShowPrefix,				     isEnabled(),				     pixmap(), text() );	br.setLeft( br.left()-3 );	br.setRight( br.right()+2 );	br.setTop( br.top()-2 );	br.setBottom( br.bottom()+2 );	br = br.intersect( QRect(0,0,width(),height()) );	if ( !text().isEmpty() )	    style().drawFocusRect( &p, br, cg );	else {	    br.setRight( br.left() );	    br.setLeft( br.left()-17 );	    br.setTop( br.top() );	    br.setBottom( br.bottom() );	    style().drawFocusRect( &p, br, cg );	}    }    setMask(bm);}/*!\reimp*/QSizePolicy QCheckBox::sizePolicy() const{    //### removeme 3.0    return QWidget::sizePolicy();}#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜臀99久久精品久久久久久软件| 欧美日韩你懂得| 亚洲成av人片在线观看无码| 国产精品免费网站在线观看| 日韩欧美国产综合一区| 欧美丝袜丝交足nylons图片| 波多野结衣欧美| 国产成人免费视频网站高清观看视频| 日本伊人精品一区二区三区观看方式| 亚洲乱码精品一二三四区日韩在线| 国产午夜精品在线观看| 欧美成人三级电影在线| 日韩一区二区电影网| 91麻豆精品国产自产在线观看一区| 91视频91自| 在线看国产一区二区| 欧美色倩网站大全免费| 91精品国产综合久久蜜臀| 日韩一级视频免费观看在线| 欧美电影一区二区| 日韩午夜中文字幕| 久久九九久久九九| 亚洲免费观看在线视频| 亚洲图片一区二区| 美女网站在线免费欧美精品| 久久精品国产亚洲aⅴ| 国产一本一道久久香蕉| 99国产精品视频免费观看| 欧美午夜精品理论片a级按摩| 欧美另类videos死尸| 精品成人在线观看| 亚洲日穴在线视频| 偷拍一区二区三区四区| 国产精品自产自拍| 在线视频亚洲一区| 久久久久久久综合色一本| 一区二区三区在线看| 国产在线精品一区在线观看麻豆| www.亚洲色图.com| 日韩免费观看高清完整版| 中文字幕一区二区不卡| 奇米色一区二区三区四区| 99久久99久久免费精品蜜臀| 日韩欧美在线观看一区二区三区| 国产精品久久久久久久久免费桃花 | 日本成人在线看| 欧美在线|欧美| 日本一区二区高清| 国产一区不卡在线| 精品日韩99亚洲| 亚洲va在线va天堂| 岛国精品在线播放| 欧美日韩大陆一区二区| jlzzjlzz亚洲女人18| 欧美日韩一区二区三区不卡| 免费不卡在线视频| 麻豆91小视频| 亚洲一级二级三级| 91福利视频久久久久| 亚洲日本在线看| 91麻豆123| 亚洲免费在线视频一区 二区| 丰满岳乱妇一区二区三区| 日韩欧美色综合| 日韩va亚洲va欧美va久久| 欧美一区二区三区免费观看视频 | 精品国产乱码久久久久久久| 国产精品久久久久久久裸模 | 99精品视频在线观看| 中文成人综合网| 91视频免费看| 亚洲午夜精品久久久久久久久| 色哟哟亚洲精品| 亚洲成av人片在线观看无码| 在线观看日韩精品| 天堂蜜桃91精品| 日韩免费观看高清完整版| 国产一区二区三区国产| 亚洲欧洲国产专区| 欧美天堂一区二区三区| 久久国内精品自在自线400部| 日韩精品一区二区三区四区| 国产精品99久久久久久有的能看 | 蜜臀av性久久久久av蜜臀妖精| 精品黑人一区二区三区久久| 国产麻豆日韩欧美久久| 亚洲成av人片在线| 精品久久国产97色综合| 色拍拍在线精品视频8848| 日韩影院免费视频| 中文字幕一区二区在线观看| 欧美精品色一区二区三区| 成人综合在线观看| 麻豆国产91在线播放| 一区二区三区精密机械公司| 久久久久久久综合狠狠综合| 欧美视频在线一区二区三区| 国产精品一区三区| 亚洲成av人片| 国产精品传媒视频| 国产午夜精品一区二区三区四区| 欧美三片在线视频观看| 色综合久久中文字幕| 丰满少妇在线播放bd日韩电影| 久久超级碰视频| 五月天网站亚洲| 亚洲午夜久久久久久久久电影院| 国产精品美女www爽爽爽| 日韩免费高清视频| 欧美日韩激情在线| 欧美日韩一区小说| 欧美日韩精品免费| 欧美精品日韩一本| 欧美日韩免费一区二区三区视频| 91麻豆蜜桃一区二区三区| 成人动漫一区二区三区| 成人av在线资源| 色综合 综合色| 91黄视频在线| 9191久久久久久久久久久| 欧美高清视频不卡网| 欧美久久久久中文字幕| 日韩午夜激情av| 337p日本欧洲亚洲大胆色噜噜| 精品国产露脸精彩对白| 337p粉嫩大胆噜噜噜噜噜91av| 久久久久久久电影| 亚洲天天做日日做天天谢日日欢| 亚洲精品国产无天堂网2021| 轻轻草成人在线| 麻豆精品在线视频| 国产不卡视频一区二区三区| 色综合亚洲欧洲| 日韩精品中文字幕一区二区三区| 国产片一区二区| 洋洋av久久久久久久一区| 日本 国产 欧美色综合| 国产精品资源网| 欧美视频一区二| 国产三级三级三级精品8ⅰ区| 亚洲狠狠丁香婷婷综合久久久| 久久精品国产在热久久| 99re这里都是精品| 久久夜色精品一区| 亚洲国产成人精品视频| 99精品在线观看视频| 欧美不卡一区二区三区四区| 亚洲天堂久久久久久久| 国产成人综合网| 日韩欧美一二三四区| 亚洲一区中文日韩| 成人av先锋影音| 国产欧美一区二区精品性色 | 欧美日韩综合一区| 亚洲私人黄色宅男| 99国产麻豆精品| 中文字幕一区二区三区在线不卡 | 亚洲一区二区三区美女| 丰满岳乱妇一区二区三区| 欧美不卡一区二区| 日本网站在线观看一区二区三区| 91亚洲永久精品| 国产精品久久久久久久久果冻传媒 | 久久97超碰国产精品超碰| 欧美午夜一区二区三区免费大片| 中文字幕色av一区二区三区| 国产一区二区成人久久免费影院| 91麻豆精品久久久久蜜臀| 婷婷综合五月天| 欧美日韩欧美一区二区| 日韩av午夜在线观看| 91精品国产欧美日韩| 日韩专区中文字幕一区二区| 欧美日韩精品三区| 黑人精品欧美一区二区蜜桃| 久久精品网站免费观看| 成人激情动漫在线观看| 亚洲女人****多毛耸耸8| 色噜噜狠狠色综合欧洲selulu| 一区二区在线观看av| 欧美日韩电影一区| 狠狠色丁香久久婷婷综| 中文字幕一区二区在线观看| 亚洲国产欧美日韩另类综合| 日韩欧美国产一区二区三区| 欧美经典一区二区三区| 夜夜亚洲天天久久| 精品国产免费一区二区三区香蕉| 精品在线播放免费| 亚洲欧美一区二区三区久本道91| 在线观看亚洲一区| 国产一区二区三区蝌蚪| 一区二区三区在线视频免费| 欧美另类高清zo欧美| 成人免费黄色大片| 日韩精品一卡二卡三卡四卡无卡| 久久精品一二三| 欧美一区二区三级| 91原创在线视频| 国产真实乱偷精品视频免|