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

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

?? qtoolbutton.cpp

?? qtopia-phone-2.2.0下公共的控件實(shí)現(xiàn)源代碼。
?? CPP
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/****************************************************************************** $Id: qt/src/widgets/qtoolbutton.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QToolButton class**** Created : 980320**** 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 "qtoolbutton.h"#ifndef QT_NO_TOOLBUTTON#include "qdrawutil.h"#include "qpainter.h"#include "qpixmap.h"#include "qwmatrix.h"#include "qapplication.h"#include "qtooltip.h"#include "qtoolbar.h"#include "qimage.h"#include "qiconset.h"#include "qtimer.h"#include "qpopupmenu.h"#include "qguardedptr.h"#ifdef QT_KEYPAD_MODEextern bool qt_modalEditingEnabled;#endifstatic QToolButton * threeDeeButton = 0;class QToolButtonPrivate{    // ### add tool tip magic herepublic:#ifndef QT_NO_POPUPMENU    QGuardedPtr<QPopupMenu> popup;    QTimer* popupTimer;    int delay;#endif    bool autoraise, repeat;    Qt::ArrowType arrow;};// NOT REVISED/*!  \class QToolButton qtoolbutton.h  \brief The QToolButton class provides a quick-access button to  specific commands or options, usually used inside a QToolBar.  \ingroup basic  A tool button is a special button that provides quick-access to  specific commands or options. As opposed to a normal command button,  a tool button usually doesn't show a text label, but an icon.  Its  classic usage is to select tools, for example the "pen"-tool in a  drawing program. This would be implemented with a QToolButton as  toggle button (see setToggleButton() ).  QToolButton supports auto-raising. In auto-raise mode, the button  draws a 3D frame only when the mouse points at it.  The feature is  automatically turned on when a button is used inside a QToolBar.  Change it with setAutoRaise().  A tool button's icon is set as QIconSet. This makes it possible to  specify different pixmaps for the disabled and active state. The  disabled pixmap is used when the button's functionality is not  available. The active pixmap is displayed when the button is  auto-raised because the user is pointing at it.  The button's look and dimension is adjustable with  setUsesBigPixmap() and setUsesTextLabel(). When used inside a  QToolBar, the button automatically adjusts to QMainWindow's settings  (see QMainWindow::setUsesTextLabel() and  QMainWindow::setUsesBigPixmaps()).  A tool button can offer additional choices in a popup menu.  The  feature is sometimes used with the "Back" button in a web browsers:  After pressing the button down for a while, a menu pops up showing  all possible pages to browse back.  With QToolButton, you can set a  popup menu using setPopup(). The default delay is 600ms, you may  adjust it with setPopupDelay().  \sa QPushButton QToolBar QMainWindow  <a href="guibooks.html#fowler">GUI Design Handbook: Push Button</a>*//*!  Constructs an empty tool button.*/QToolButton::QToolButton( QWidget * parent, const char *name )    : QButton( parent, name ){    init();#ifndef QT_NO_TOOLBAR    if ( parent && parent->inherits( "QToolBar" ) ) {	setAutoRaise( TRUE );	QToolBar* tb = (QToolBar*)parent;	if ( tb->mainWindow() ) {	    connect( tb->mainWindow(), SIGNAL(pixmapSizeChanged(bool)),	             this, SLOT(setUsesBigPixmap(bool)) );	    setUsesBigPixmap( tb->mainWindow()->usesBigPixmaps() );	    connect( tb->mainWindow(), SIGNAL(usesTextLabelChanged(bool)),	             this, SLOT(setUsesTextLabel(bool)) );	    setUsesTextLabel( tb->mainWindow()->usesTextLabel() );	} else {	    setUsesBigPixmap( FALSE );	}    } else#endif    {	setUsesBigPixmap( FALSE );    }}/*!  Constructs a tool button as arrow button. The ArrowType \a type  defines the arrow direction. Possible values are LeftArrow,  RightArrow, UpArrow and DownArrow.  An arrow button has auto repeat turned on.  The \a parent and \a name arguments are sent to the QWidget constructor.*/QToolButton::QToolButton( ArrowType type, QWidget *parent, const char *name )    : QButton( parent, name ){    init();    setUsesBigPixmap( FALSE );    setAutoRepeat( TRUE );    d->arrow = type;    hasArrow = TRUE;}/*!  Set-up code common to all the constructors */void QToolButton::init(){    d = new QToolButtonPrivate;#ifndef QT_NO_POPUPMENU    d->delay = 600;    d->popup = 0;    d->popupTimer = 0;#endif    d->autoraise = FALSE;    d->arrow = LeftArrow;    bpID = bp.serialNumber();    spID = sp.serialNumber();    utl = FALSE;    ubp = TRUE;    hasArrow = FALSE;    s = 0;    son = 0;#ifdef QT_KEYPAD_MODE    if( !qt_modalEditingEnabled )#endif    setFocusPolicy( NoFocus );    setBackgroundMode( PaletteButton);    setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );}#ifndef QT_NO_TOOLBAR/*!  Constructs a tool button that is a child of \a parent (which must be  a QToolBar) and named \a name.  The tool button will display \a pm, with text label or tool tip \a  textLabel and status-bar message \a grouptext, connected to \a slot  in object \a receiver, and returns the button.*/QToolButton::QToolButton( const QPixmap &pm, const QString &textLabel,			  const QString &grouptext,			  QObject * receiver, const char *slot,			  QToolBar * parent, const char *name )    : QButton( parent, name ){    init();    setAutoRaise( TRUE );    setPixmap( pm );    setTextLabel( textLabel );    if ( receiver && slot )	connect( this, SIGNAL(clicked()), receiver, slot );    if ( parent->mainWindow() ) {	connect( parent->mainWindow(), SIGNAL(pixmapSizeChanged(bool)),		 this, SLOT(setUsesBigPixmap(bool)) );	setUsesBigPixmap( parent->mainWindow()->usesBigPixmaps() );	connect( parent->mainWindow(), SIGNAL(usesTextLabelChanged(bool)),		 this, SLOT(setUsesTextLabel(bool)) );	setUsesTextLabel( parent->mainWindow()->usesTextLabel() );    } else {	setUsesBigPixmap( FALSE );    }#ifndef QT_NO_TOOLTIP    if ( !textLabel.isEmpty() ) {	if ( !grouptext.isEmpty() )	    QToolTip::add( this, textLabel,			   parent->mainWindow()->toolTipGroup(), grouptext );	else	    QToolTip::add( this, textLabel );    }#endif	}/*!  Constructs a tool button that is a child of \a parent (which must be  a QToolBar) and named \a name.  The tool button will display \a iconSet, with text label or tool tip \a  textLabel and status-bar message \a grouptext, connected to \a slot  in object \a receiver, and returns the button.*/QToolButton::QToolButton( const QIconSet& iconSet, const QString &textLabel,			  const QString& grouptext,			  QObject * receiver, const char *slot,			  QToolBar * parent, const char *name )    : QButton( parent, name ){    init();    setAutoRaise( TRUE );    setIconSet( iconSet );    setTextLabel( textLabel );    if ( receiver && slot )	connect( this, SIGNAL(clicked()), receiver, slot );    if ( parent->mainWindow() ) {	connect( parent->mainWindow(), SIGNAL(pixmapSizeChanged(bool)),		 this, SLOT(setUsesBigPixmap(bool)) );	setUsesBigPixmap( parent->mainWindow()->usesBigPixmaps() );	connect( parent->mainWindow(), SIGNAL(usesTextLabelChanged(bool)),		 this, SLOT(setUsesTextLabel(bool)) );	setUsesTextLabel( parent->mainWindow()->usesTextLabel() );    } else {	setUsesBigPixmap( FALSE );    }#ifndef QT_NO_TOOLTIP    if ( !textLabel.isEmpty() ) {	if ( !grouptext.isEmpty() )	    QToolTip::add( this, textLabel,			   parent->mainWindow()->toolTipGroup(), grouptext );	else	    QToolTip::add( this, textLabel );    }#endif}#endif/*! Destroys the object and frees any allocated resources. */QToolButton::~QToolButton(){#ifndef QT_NO_POPUPMENU    d->popupTimer = 0;    d->popup = 0;#endif    delete d;    delete s;    delete son;    threeDeeButton = 0;}/*!  Makes the tool button a toggle button if \e enable is TRUE, or a normal  tool button if \e enable is FALSE.  Toggle buttons have an on/off state similar to \link QCheckBox check  boxes. \endlink A tool button is initially not a toggle button.  \sa setOn(), toggle(), isToggleButton() toggled()*/void QToolButton::setToggleButton( bool enable ){    QButton::setToggleButton( enable );}/*!  \reimp*/QSize QToolButton::sizeHint() const{    constPolish();    int w = 0;    int h = 0;    if ( !text().isNull()) {	w = fontMetrics().width( text() );	h = fontMetrics().height(); // boundingRect()?    } else if ( usesBigPixmap() ) {	QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal);	w = pm.width();	h = pm.height();	if ( w < 32 )	    w = 32;	if ( h < 32 )	    h = 32;    } else {	w = h = 16;	QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal);	w = pm.width();	h = pm.height();#ifndef _WS_QWS_ // shouldn't be on any platform...	if ( w < 16 )	    w = 16;	if ( h < 16 )	    h = 16;#endif    }    if ( usesTextLabel() ) {	h += 4 + fontMetrics().height();	int tw = fontMetrics().width( textLabel() ) + fontMetrics().width("  ");	if ( tw > w )	    w = tw;    }    return QSize( w + 7, h + 6 ).expandedTo( QApplication::globalStrut() );}/*!\reimp*/QSizePolicy QToolButton::sizePolicy() const{    //### removeme 3.0    return QWidget::sizePolicy();}/* \fn bool QToolButton::usesBigPixmap() const  Returns TRUE or FALSE.*//* \fn bool QToolButton::usesTextLabel() const  Returns TRUE or FALSE.*//*! \fn QString QToolButton::textLabel() const  Returns the text label in use by this tool button, or 0.  \sa setTextLabel() usesTextLabel() setUsesTextLabel() setText()*//*!  Sets this button to use the big pixmaps provided by its QIconSet  if \a enable is TRUE, and to use the small ones else.  QToolButton automatically connects this slot to the relevant signal  in the QMainWindow in which it resides.  You're strongly urged to  use QMainWindow::setUsesBigPixmaps() instead.  \warning If you set some buttons (in a QMainWindow) to have big and  others small pixmaps, QMainWindow may have trouble getting the  geometry correct.*/void QToolButton::setUsesBigPixmap( bool enable ){    if ( (bool)ubp == enable )	return;    ubp = enable;    if ( isVisible() ) {	update();	updateGeometry();    }}/*!  \fn bool QToolButton::usesBigPixmap() const  Returns TRUE if this tool button uses the big (32-pixel) pixmaps,  and FALSE if it does not.  \sa setUsesBigPixmap(), setPixmap(),  usesTextLabel*//*!  Sets this button to draw a text label below the icon if \a enable  is TRUE, and to not draw it if \a enable is FALSE.  QToolButton automatically connects this slot to the relevant signal  in the QMainWindow in which is resides.*/void QToolButton::setUsesTextLabel( bool enable ){    if ( (bool)utl == enable )	return;    utl = enable;    if ( isVisible() ) {	update();	updateGeometry();    }}/*! \fn bool QToolButton::usesTextLabel() const

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本欧美久久久久免费播放网| 亚洲国产精品成人综合| 91黄色免费网站| 欧美在线观看禁18| 欧美疯狂做受xxxx富婆| 欧美tickle裸体挠脚心vk| 欧美成人艳星乳罩| 中文字幕中文乱码欧美一区二区| 亚洲精品免费在线| 亚洲成人1区2区| 国模无码大尺度一区二区三区| 国产成人综合精品三级| 在线观看亚洲精品| 精品国产一区二区三区不卡| 国产精品久久三| 国产欧美精品区一区二区三区| 亚洲特级片在线| 国产自产2019最新不卡| 91亚洲大成网污www| 精品99999| 免费在线观看精品| 欧美视频在线观看一区二区| 国产午夜亚洲精品羞羞网站| 天天综合网天天综合色| 色天使久久综合网天天| 欧美精品一区二区三区四区| 亚洲一区av在线| 成人福利视频网站| 久久精品欧美日韩精品| 日韩精品乱码免费| 日本久久一区二区三区| 国产精品久久久久久户外露出| 美女精品一区二区| 欧美一区二区三区人| 一区二区日韩av| 不卡的av电影在线观看| 亚洲国产精品ⅴa在线观看| 久久国产免费看| 精品不卡在线视频| 另类中文字幕网| 精品国产乱码久久久久久浪潮| 日韩av一区二区在线影视| 欧美美女直播网站| 日韩国产欧美视频| 欧美一级夜夜爽| 久久不见久久见中文字幕免费| 精品免费国产一区二区三区四区| 美女视频黄免费的久久| 欧美大片免费久久精品三p| 七七婷婷婷婷精品国产| 久久久欧美精品sm网站| 91猫先生在线| 免费成人美女在线观看.| 久久综合久久99| 色综合中文综合网| 紧缚捆绑精品一区二区| 亚洲精品在线网站| 99久久国产综合精品麻豆| 偷拍自拍另类欧美| 中文字幕不卡在线| 欧美精品 日韩| 成人精品视频一区二区三区尤物| 一区二区三区毛片| 国产日韩高清在线| 91精品国产91久久综合桃花| 99精品视频在线免费观看| 一区二区三区在线观看动漫| 正在播放一区二区| 91色九色蝌蚪| aaa欧美日韩| 国产精品 日产精品 欧美精品| 丝袜亚洲另类欧美综合| 亚洲视频1区2区| 国产欧美日韩在线观看| 欧美日韩综合色| 色婷婷久久99综合精品jk白丝| 久久国产日韩欧美精品| 日韩av午夜在线观看| 一区二区成人在线视频| 国产精品免费观看视频| 久久精品一区二区三区不卡 | |精品福利一区二区三区| 午夜a成v人精品| 精品国精品自拍自在线| 成人avav影音| 色狠狠av一区二区三区| 成人av资源下载| 亚洲少妇屁股交4| 久久久久久久久久久99999| 欧美一区二区人人喊爽| 欧美日韩不卡在线| 2欧美一区二区三区在线观看视频| 欧美久久久久免费| 精品久久久久久久久久久久久久久久久| 欧美日韩视频专区在线播放| 884aa四虎影成人精品一区| 欧美一级片在线观看| 日韩一区二区在线观看视频| 91啪在线观看| 欧美一区二区三区视频免费 | 亚洲视频一区在线| 男女男精品视频网| 久久不见久久见免费视频7| 国产成人精品免费在线| 91在线高清观看| 日韩欧美亚洲国产另类| 亚洲欧美在线aaa| 久久精品久久综合| 99精品视频中文字幕| 日韩欧美亚洲一区二区| 自拍偷拍亚洲欧美日韩| 久久国产乱子精品免费女| 91色九色蝌蚪| 国产欧美日韩视频在线观看| 亚洲福利国产精品| 成人久久视频在线观看| 精品国精品自拍自在线| 天天免费综合色| 欧美视频你懂的| 一级日本不卡的影视| 成人黄色小视频在线观看| 精品福利av导航| 日本视频一区二区| 欧美日韩一区二区不卡| 亚洲一二三四在线| 一道本成人在线| 亚洲精品第1页| 日本乱码高清不卡字幕| 亚洲精品一二三区| 色天天综合色天天久久| 夜夜嗨av一区二区三区四季av| 不卡一区中文字幕| 一区二区三区在线观看国产| 91国内精品野花午夜精品| 亚洲国产精品久久人人爱| 欧美亚洲综合久久| 亚洲成人动漫一区| 欧美一区二区精品在线| 麻豆成人免费电影| 久久精品视频一区二区| 一本大道久久a久久精二百| 午夜国产不卡在线观看视频| 日韩一二三四区| 成人自拍视频在线| 亚洲自拍偷拍欧美| 欧美刺激午夜性久久久久久久| 狠狠色丁香久久婷婷综| 国产精品久久久久影院| 欧美日韩精品欧美日韩精品| 久久电影网站中文字幕| 亚洲欧美欧美一区二区三区| 欧美色倩网站大全免费| 国模无码大尺度一区二区三区| 国产精品久久久久久久久免费丝袜| 日本道精品一区二区三区| 麻豆精品一区二区三区| 依依成人综合视频| 国产免费久久精品| 精品久久久久久最新网址| 色妹子一区二区| 国产精品亚洲专一区二区三区| 亚洲三级视频在线观看| 色播五月激情综合网| 粉嫩av一区二区三区粉嫩| 日本强好片久久久久久aaa| 亚洲精品中文字幕在线观看| 久久久无码精品亚洲日韩按摩| 在线播放中文字幕一区| 欧美午夜一区二区| 欧美综合久久久| 色婷婷国产精品| 欧美日韩久久久| 欧美另类一区二区三区| 9191久久久久久久久久久| 欧美日韩国产精品成人| 欧美福利视频一区| 欧美一区二区三区的| 91精品国产高清一区二区三区| 欧美日韩一区二区三区不卡| 欧美蜜桃一区二区三区| 欧美一级黄色大片| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 国产精品剧情在线亚洲| 亚洲欧洲精品天堂一级| 亚洲欧美一区二区久久| 亚洲小少妇裸体bbw| 麻豆91在线观看| av亚洲精华国产精华| 欧美亚一区二区| 日韩欧美视频一区| 中国av一区二区三区| 一区二区三区在线视频免费观看| 美女网站一区二区| 成人午夜激情视频| 性感美女极品91精品| 一区二区理论电影在线观看| 亚洲乱码精品一二三四区日韩在线| 国产偷v国产偷v亚洲高清| 国产精品久久久久婷婷二区次| 午夜精品视频在线观看|