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

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

?? qpushbutton.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/****************************************************************************** $Id: qt/src/widgets/qpushbutton.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QPushButton class**** Created : 940221**** 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 "qpushbutton.h"#ifndef QT_NO_PUSHBUTTON#include "qdialog.h"#include "qfontmetrics.h"#include "qpainter.h"#include "qdrawutil.h"#include "qpixmap.h"#include "qbitmap.h"#include "qpopupmenu.h"#include "qguardedptr.h"#include "qptrdict.h" // binary compatibility#include "qapplication.h"#include "qtoolbar.h"// NOT REVISED/*!  \class QPushButton qpushbutton.h  \brief The QPushButton widget provides a command button.  \ingroup basic  The push button, also referred to as command button, is perhaps the  most central widget in any graphical user interface: Push it to  command the computer to perform some action. Typical actions are Ok,  Apply, Cancel, Close or Help.  A command button is rectangular (ca. 80x22 pixel) and typically  displays a text label describing its action. An underscored  character in the label, marked with an ampersand in the text,  signals an accelerator key.  This code creates a push button labelled "Rock & Roll".  Due to the  first ampersand, the c displays underscored and the button gets the  automatic accelerator key, Alt-C:  \code    QPushButton *p = new QPushButton( "Ro&ck && Roll", this );  \endcode  The text can be changed anytime later with setText(). You can also  define a pixmap with setPixmap(). The text/pixmap is manipulated as  necessary to create "disabled" appearance according to the  respective GUI style when the button is disabled. A command button  can, in addition to the text or pixmap label, also display a little  icon. Use the extended constructor or setIconSet() to define this  icon.  A push button emits the signal clicked() when it is activated,  either with the mouse, the spacebar or a keyboard accelerator.  Connect to this signal to perform the button's action.  Other  signals of less importance are pressed() when the button is pressed  down and released() when it is released, respectively.  Command buttons in dialogs are by default auto-default buttons,  i.e. they become the default push button automatically when they  receive the keyboard input focus. A default button is a command  button that is activated when the users hits the Enter or Return key  in a dialog. Adjust this behaviour with setAutoDefault(). Note that  auto-default buttons reserve a little extra space necessary to draw  a default-button indicator. If you do not want this space around  your buttons, call setAutoDefault( FALSE ).  Being so central, the widget has grown to accomodate a great many  variations in the past decade, and by now the Microsoft style guide  shows about ten different states of Windows push buttons, and the  text implies that there are dozens more when all the combinations of  features are taken into consideration.  The most important modes or states are, sorted roughly by importance: <ul>  <li> Available or not ("grayed out", disabled).  <li> Standard push button, toggling push button or menu button.  <li> On or off (only for toggling push buttons).  <li> Default or normal.  The default button in a dialog can  generally be "clicked" using the Enter or Return key.  <li> Auto-repeat or not.  <li> Pressed down or not.  </ul>  As a general rule, use a push button when the application or dialog  window performs an action when the user clicks on it (like Apply,  Cancel, Close, Help, ...) \e and when the widget is supposed to have  a wide, rectangular shape with a text label.  Small, typically  square buttons that change the state of the window rather than  performing an action (like for example the buttons in the top/right  corner of the QFileDialog), are not command buttons, but tool  buttons. Qt provides a special class QToolButton for these.  Also, if you need toggle behaviour (see setToggleButton()) or a button  that auto-repeats the activation signal when being pushed down like  the arrows in a scrollbar (see setAutoRepeat()), a command button is  probably not what you want. In case of doubt, go with a tool button.  A variation of a command button is a menu button. It provides not  just one command, but several. Use the method setPopup() to  associate a popup menu with a push button.  Other classes of buttons are option buttons (see QRadioButton) and  check boxes (see QCheckBox).  <img src="qpushbt-m.png"> <img src="qpushbt-w.png">  In Qt, the QButton class provides most of the modes and other API,  and QPushButton provides GUI logic.  See QButton for more  information about the API.  \important text, setText, text, pixmap, setPixmap, accel, setAccel,  isToggleButton, setDown, isDown, isOn, state, autoRepeat,  isExclusiveToggle, group, setAutoRepeat, toggle, pressed, released,  clicked, toggled, state stateChanged  \sa QToolButton, QRadioButton QCheckBox  <a href="guibooks.html#fowler">GUI Design Handbook: Push Button</a>*/class QPushButtonPrivate{public:    QPushButtonPrivate()	:iconset( 0 )    {}    ~QPushButtonPrivate()    {	delete iconset;    }    QGuardedPtr<QPopupMenu> popup;    QIconSet* iconset;};static QPtrDict<QPushButtonPrivate> *d_ptr = 0;static void cleanup_d_ptr(){    delete d_ptr;    d_ptr = 0;}static QPushButtonPrivate* d( const QPushButton* foo ){    if ( !d_ptr ) {	d_ptr = new QPtrDict<QPushButtonPrivate>;	d_ptr->setAutoDelete( TRUE );	qAddPostRoutine( cleanup_d_ptr );    }    QPushButtonPrivate* ret = d_ptr->find( (void*)foo );    if ( ! ret ) {	ret = new QPushButtonPrivate;	d_ptr->replace( (void*) foo, ret );    }    return ret;}static bool has_d( const QPushButton* foo ){    return d_ptr && d_ptr->find( (void*)foo );}static void delete_d( const QPushButton* foo ){    if ( d_ptr )	d_ptr->remove( (void*) foo );}/*!  Constructs a push button with no text.  The \a parent and \a name arguments are sent to the QWidget constructor.*/QPushButton::QPushButton( QWidget *parent, const char *name )	: QButton( parent, name ){    init();}/*!  Constructs a push button with a text.  The \a parent and \a name arguments are sent to the QWidget constructor.*/QPushButton::QPushButton( const QString &text, QWidget *parent,			  const char *name )	: QButton( parent, name ){    init();    setText( text );}/*!  Constructs a push button with an \a icon and a \a text.  Note that you can also pass a QPixmap object as icon (thanks to C++'  implicit type conversion).  The \a parent and \a name arguments are sent to the QWidget constructor.*/QPushButton::QPushButton( const QIconSet& icon, const QString &text,			  QWidget *parent, const char *name )	: QButton( parent, name ){    init();    setText( text );    setIconSet( icon );}/*!  Destructs the push button */QPushButton::~QPushButton(){    delete_d( this );}void QPushButton::init(){    defButton = FALSE;    lastEnabled = FALSE;    hasMenuArrow = FALSE;    flt = FALSE;#ifndef QT_NO_DIALOG    autoDefButton = topLevelWidget()->inherits("QDialog");#else    autoDefButton = FALSE;#endif    setBackgroundMode( PaletteButton );    setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );}/*!  Makes the push button a toggle button if \a enable is TRUE, or a normal  push button if \a enable is FALSE.  Toggle buttons have an on/off state similar to \link QCheckBox check  boxes. \endlink A push button is initially not a toggle button.  \sa setOn(), toggle(), isToggleButton() toggled()*/void QPushButton::setToggleButton( bool enable ){    QButton::setToggleButton( enable );}/*!  Switches a toggle button on if \a enable is TRUE or off if \a enable is  FALSE.  \sa isOn(), toggle(), toggled(), isToggleButton()*/void QPushButton::setOn( bool enable ){    if ( !isToggleButton() )	return;    QButton::setOn( enable );}/*!  Toggles the state of a toggle button.  \sa isOn(), setOn(), toggled(), isToggleButton()*/void QPushButton::toggle(){    if ( !isToggleButton() )	return;    QButton::setOn( !isOn() );}/*! \fn bool QPushButton::autoDefault() const  Returns TRUE if the button is an auto-default button.  \sa setAutoDefault()*//*!  Sets the push buttons to an auto-default button if \a enable is TRUE,  or to a normal button if \a enable is FALSE.  An auto-default button becomes automatically the default push button  in a dialog when it receives the keyboard input focus.  In some GUI styles, a default button is drawn with an extra frame  around it, up to 3 pixels or more. Qt automatically keeps this space  free around auto-default buttons, i.e. auto-default buttons may have  a slightly larger size hint.  \sa autoDefault(), setDefault()*/void QPushButton::setAutoDefault( bool enable ){    if ( (bool)autoDefButton == enable )	return;    autoDefButton = enable;    update();    updateGeometry();}/*!  \fn bool QPushButton::isDefault() const  Returns TRUE if the button is currently default.  \sa setDefault()*//*!  Sets this button to be the current default button of a  \link QDialog dialog\endlink if \a enable is TRUE, or to be a normal button  if \a enable is FALSE.  The current default button gets clicked when the user presses the  "Enter" key, independently of which widget in the dialog currently  has the keyboard input focus.  Only one push button can at any time  be the default button.  This button is then displayed with an  additional frame ( depending on the GUI style ).  The default button behaviour is only provided in dialogs. Buttons  can always be clicked from the keyboard by pressing return or the  spacebar when the button has focus.  \sa isDefault(), setAutoDefault(), QDialog*/void QPushButton::setDefault( bool enable ){    if ( (bool)defButton == enable )	return;					// no change    defButton = enable;#ifndef QT_NO_DIALOG    if ( defButton && topLevelWidget()->inherits( "QDialog" ) ) 	((QDialog*)topLevelWidget())->setDefault( this );#endif    update();}/*!\reimp*/QSize QPushButton::sizeHint() const{    constPolish();    int w = 0;    int h = 0;    if ( pixmap() ) {	QPixmap *pm = (QPixmap *)pixmap();	w = pm->width() + style().buttonMargin();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区最好精华液| 免费欧美日韩国产三级电影| 欧美一级国产精品| 欧美精品在线观看播放| 欧美在线观看18| 在线观看一区日韩| 精品视频在线免费观看| 欧美日韩免费观看一区三区| 欧美片在线播放| 日韩亚洲欧美中文三级| 欧美成人video| 国产亚洲美州欧州综合国| 久久久精品天堂| 国产精品美女久久久久久| 一区二区三区日本| 日韩激情一二三区| 久久精品国产久精国产爱| 国产黑丝在线一区二区三区| 97精品国产露脸对白| 欧美影片第一页| 日韩欧美精品三级| 国产精品毛片大码女人| 亚洲影院久久精品| 蜜桃视频在线一区| 成人性生交大片免费| 精品污污网站免费看| 精品国产乱码久久久久久夜甘婷婷| 久久日韩粉嫩一区二区三区| 国产精品看片你懂得 | 蜜桃精品视频在线观看| 国产成人精品免费在线| 日本韩国视频一区二区| 91精品婷婷国产综合久久性色| 久久免费的精品国产v∧| 亚洲色图制服丝袜| 蜜臀久久99精品久久久久宅男| 盗摄精品av一区二区三区| 欧美影院一区二区| 国产精品三级久久久久三级| 亚洲va国产天堂va久久en| 国产一区二区在线观看视频| 96av麻豆蜜桃一区二区| 精品久久久影院| 亚洲高清不卡在线观看| 成人av电影在线播放| 日韩欧美国产一区二区在线播放| 国产欧美日韩精品a在线观看| 亚洲福中文字幕伊人影院| 国产一区二区三区在线观看免费| 欧美在线综合视频| 中文字幕高清不卡| 狠狠色综合日日| 欧美日韩国产一二三| 国产精品久久久久久久久免费丝袜| 日韩精品1区2区3区| 色婷婷综合久久久久中文一区二区 | 国产欧美一区视频| 日韩高清不卡一区| 欧美日韩一区高清| 亚洲精品视频观看| av资源站一区| 欧美—级在线免费片| 精品一区精品二区高清| 欧美久久久久中文字幕| 亚洲一卡二卡三卡四卡五卡| hitomi一区二区三区精品| 久久久久免费观看| 狠狠色狠狠色综合系列| 精品成人免费观看| 久久国内精品自在自线400部| 欧美日本一区二区三区| 亚洲电影一区二区三区| 91福利区一区二区三区| 一区二区三区**美女毛片| 成人18视频日本| 一色屋精品亚洲香蕉网站| 大白屁股一区二区视频| 中文字幕国产一区| 不卡一区中文字幕| 亚洲欧洲成人av每日更新| jiyouzz国产精品久久| 亚洲视频电影在线| 色狠狠一区二区三区香蕉| 亚洲黄色片在线观看| 欧美在线观看一区| 奇米影视7777精品一区二区| 日韩久久久久久| 懂色av中文字幕一区二区三区| 国产日韩欧美麻豆| 一本色道久久综合亚洲aⅴ蜜桃| 中文字幕亚洲一区二区av在线| 9色porny自拍视频一区二区| 亚洲精品视频在线观看网站| 色综合中文综合网| 亚洲视频一区二区免费在线观看 | 五月天丁香久久| 日韩欧美国产综合| 国产成人在线网站| 中文字幕亚洲精品在线观看| 欧美性感一类影片在线播放| 精彩视频一区二区三区| 日本一二三不卡| 欧美福利视频一区| 国产一区999| 亚洲黄网站在线观看| 日韩一卡二卡三卡四卡| 成人高清免费在线播放| 午夜亚洲福利老司机| 26uuu另类欧美亚洲曰本| 一本高清dvd不卡在线观看| 日本不卡视频在线| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 欧美色综合天天久久综合精品| 久久精品免费观看| 怡红院av一区二区三区| 精品女同一区二区| 欧美性感一区二区三区| 成人av午夜电影| 日韩中文字幕亚洲一区二区va在线| 久久亚洲精华国产精华液 | 91片黄在线观看| 精品一区二区三区久久久| 亚洲夂夂婷婷色拍ww47| 国产欧美1区2区3区| 日韩一级完整毛片| 欧美午夜精品免费| aa级大片欧美| 韩日精品视频一区| 蜜桃视频在线观看一区| 亚洲国产美女搞黄色| 国产精品久久久久婷婷| 2023国产精品| 日韩欧美国产wwwww| 欧美日韩精品专区| 在线观看国产日韩| 色香色香欲天天天影视综合网| 国产精品一二三在| 精品一区二区日韩| 另类欧美日韩国产在线| 亚洲v日本v欧美v久久精品| 一区二区三区四区在线免费观看 | 99国产欧美另类久久久精品| 国产乱码精品1区2区3区| 精品一区在线看| 久久精品免费看| 久草在线在线精品观看| 日本少妇一区二区| 蜜臂av日日欢夜夜爽一区| 午夜伦欧美伦电影理论片| 亚洲午夜免费福利视频| 一区二区三区不卡视频在线观看| 亚洲精品国产品国语在线app| 亚洲人成网站精品片在线观看 | 亚洲成人动漫一区| 亚洲资源在线观看| 午夜精品久久久久久久99水蜜桃 | 亚洲嫩草精品久久| 亚洲精品中文字幕乱码三区| 国产精品国产精品国产专区不片| 日本一区二区三区dvd视频在线| 国产亚洲欧美日韩俺去了| 欧美经典三级视频一区二区三区| 中文子幕无线码一区tr | 一本大道av伊人久久综合| 色综合久久中文综合久久97 | 一区二区三区成人在线视频| 亚洲综合久久久久| 奇米综合一区二区三区精品视频| 免费视频一区二区| 国产91色综合久久免费分享| 成人精品视频一区二区三区| 在线观看网站黄不卡| 日韩天堂在线观看| 日本一区二区免费在线| 一区二区成人在线| 另类专区欧美蜜桃臀第一页| 国产黄色精品视频| 欧美日韩黄色一区二区| 久久久久国产成人精品亚洲午夜| 国产清纯在线一区二区www| 玉足女爽爽91| 精品在线视频一区| 91麻豆国产精品久久| 欧美一区二区视频在线观看| 久久一区二区三区国产精品| 亚洲欧美日韩国产另类专区| 免费一级欧美片在线观看| 成人av免费在线播放| 欧美精品xxxxbbbb| 国产精品欧美一区喷水| 午夜成人在线视频| voyeur盗摄精品| 精品国产免费一区二区三区香蕉| 亚洲日本成人在线观看| 久久99久久99精品免视看婷婷| 不卡在线观看av| 精品国产亚洲在线| 亚洲成人777| 91视视频在线观看入口直接观看www | 欧美一区二区三区视频|