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

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

?? qstatusbar.cpp

?? qtopia-phone-2.2.0下公共的控件實(shí)現(xiàn)源代碼。
?? CPP
字號(hào):
/****************************************************************************** $Id: qt/src/widgets/qstatusbar.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QStatusBar class**** Created : 980119**** 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 "qstatusbar.h"#ifndef QT_NO_STATUSBAR#include "qlist.h"#include "qlayout.h"#include "qpainter.h"#include "qtimer.h"#include "qdrawutil.h"#include "qapplication.h"#include "qsizegrip.h"// REVISED: warwick/*!  \class QStatusBar qstatusbar.h  \brief The QStatusBar class provides a horizontal bar suitable for  presenting status information.  \ingroup application  \ingroup helpsystem  Each status indicator falls into one of three categories:  <ul>  <li> \e Temporary - occupies most of the status bar briefly.  Used    e.g. for explaining tool tip texts or menu entries.  <li> \e Normal - occupies part of the status bar and may be hidden    by temporary messages.  Used e.g. for displaying the page and line    number in a word processor.  <li> \e Permanent - is never hidden.  Used for important mode    indications.  Some applications put a Caps Lock indicator in the    status bar.  </ul>  QStatusBar lets you display all three types of indicator.  To display a \e temporary message, call message(), perhaps by  connecting a suitable signal to it.  To remove a temporary message,  call clear().  There are two variants of message(), one which displays the message  until the next clear() or mesage(), and one which also has a time limit:  \code     connect( loader, SIGNAL(progressMessage(const QString&)),              statusBar(), SLOT(message(const QString&)) );     statusBar()->message("Loading...");  // Initial message     loader.loadStuff();                  // Emits progress messages     statusBar()->message("Done.", 2000); // Final message for 2 seconds  \endcode  \e Normal and \e permanent messages are displayed by creating a small  widget then adding it to the status bar with addWidget().  Widgets  like QLabel, QProgressBar, or even QToolButton are useful for adding  to status bars.  removeWidget() is used to remove widgets.  \code     statusBar()->addWidget(new MyReadWriteIndication(statusBar()));  \endcode  By default, QStatusBar provides a QSizeGrip in the lower-right corner.  You can disable this with setSizeGripEnabled(FALSE);  <img src=qstatusbar-m.png> <img src=qstatusbar-w.png>  \sa QToolBar QMainWindow QLabel  <a href="guibooks.html#fowler">GUI Design Handbook: Status Bar.</a>*/class QStatusBarPrivate{public:    QStatusBarPrivate() {}    struct SBItem {	SBItem( QWidget* widget, int stretch, bool permanent )	    : s( stretch ), w( widget ), p( permanent ) {}	int s;	QWidget * w;	bool p;    };    QList<SBItem> items;    QString tempItem;    QBoxLayout * box;    QTimer * timer;#ifndef QT_NO_SIZEGRIP    QSizeGrip * resizer;#endif    };/*!  Constructs a status bar with just a size grip.  \sa setSizeGripEnabled()*/QStatusBar::QStatusBar( QWidget * parent, const char *name )    : QWidget( parent, name ){    d = new QStatusBarPrivate;    d->items.setAutoDelete( TRUE );    d->box = 0;    d->timer = 0;#ifndef QT_NO_SIZEGRIP    d->resizer = 0;    setSizeGripEnabled(TRUE); // causes reformat()#else    reformat();#endif}/*!  Destructs the status bar and frees any allocated resources.*/QStatusBar::~QStatusBar(){    delete d;    d = 0;}/*!  Adds \a widget to this status bar.  \a widget is permanently visible if \a permanent is TRUE, and is  obscured by temporary messages if \a permanent is FALSE.  The  default is FALSE.  \a stretch is used to compute a suitable size for \a widget as the  status bar grows and shrinks. The default of 0 uses a minimum of space.  If \a permanent is TRUE, \a widget is located at the far right of  the status bar.  If \a permanent is FALSE (the default) \a widget is  located just to the left of the first permanent widget.  This function may cause some flicker.  \sa removeWidget()*/void QStatusBar::addWidget( QWidget * widget, int stretch, bool permanent ){    if ( !widget ) {#if defined(CHECK_NULL)	qWarning( "QStatusBar::addWidget(): Cannot add null widget" );#endif	return;    }    QStatusBarPrivate::SBItem* item	= new QStatusBarPrivate::SBItem( widget, stretch, permanent );    d->items.last();    while( !permanent && d->items.current() && d->items.current()->p )	d->items.prev();    d->items.insert( d->items.at() >= 0 ? d->items.at()+1 : 0, item );    if ( !d->tempItem.isEmpty() && !permanent )	widget->hide();    reformat();}/*!  Removes \a widget from the status bar.  This function may cause some flicker.  Note that \a widget is not deleted.  \sa addWidget()*/void QStatusBar::removeWidget( QWidget* widget ){    if ( !widget )	return;    bool found = FALSE;    QStatusBarPrivate::SBItem* item = d->items.first();    while ( item && !found ) {	if ( item->w == widget ) {	    d->items.remove();	    found = TRUE;	}	item = d->items.next();    }    if ( found )	reformat();#if defined(DEBUG)    else	qDebug( "QStatusBar::removeWidget(): Widget not found." );#endif}/*!  \fn bool QStatusBar::isSizeGripEnabled() const  Returns whether the QSizeGrip in the bottom right of the status bar  is enabled.  \sa setSizeGripEnabled()*/bool QStatusBar::isSizeGripEnabled() const{#ifdef QT_NO_SIZEGRIP    return FALSE;#else        return !!d->resizer;#endif}/*!  Enables or disables the QSizeGrip in the bottom right of the status bar.  By default, the size grip is enabled.  \sa isSizeGripEnabled()*/void QStatusBar::setSizeGripEnabled(bool enabled){#ifndef QT_NO_SIZEGRIP    if ( !enabled != !d->resizer ) {	if ( enabled ) {	    d->resizer = new QSizeGrip( this, "QStatusBar::resizer" );	} else {	    delete d->resizer;	    d->resizer = 0;	}	reformat();	if ( d->resizer && isVisible() )	    d->resizer->show();    }#else    Q_UNUSED(enabled);#endif}/*!  Changes the status bar's appearance to account for item  changes. Special subclasses may need this, but normally  geometry management will take care of any necessary  rearrangements.*/void QStatusBar::reformat(){    if ( d->box )	delete d->box;    QBoxLayout *vbox;    if ( isSizeGripEnabled() ) {	d->box = new QHBoxLayout( this );	vbox = new QVBoxLayout( d->box );    } else {	vbox = d->box = new QVBoxLayout( this );    }    vbox->addSpacing( 3 );    QBoxLayout* l = new QHBoxLayout( vbox );    l->addSpacing( 3 );    int maxH = fontMetrics().height();    QStatusBarPrivate::SBItem* item = d->items.first();    while ( item && !item->p ) {	l->addWidget( item->w, item->s );	l->addSpacing( 4 );	int itemH = item->w->sizeHint().height();	maxH = QMAX( maxH, itemH );	item = d->items.next();    }    l->addStretch( 0 );    while ( item ) {	l->addWidget( item->w, item->s );	l->addSpacing( 4 );	int itemH = item->w->sizeHint().height();	maxH = QMAX( maxH, itemH );	item = d->items.next();    }#ifndef QT_NO_SIZEGRIP    if ( d->resizer ) {	maxH = QMAX( maxH, d->resizer->sizeHint().height() );	d->box->addSpacing( 2 );	d->box->addWidget( d->resizer, 0, AlignBottom );    }#endif    l->addStrut( maxH );    vbox->addSpacing( 2 );    d->box->activate();    repaint();}/*!  Hide the normal status indicators and display \a message, until  clear() or another message() is called.  \sa clear()*/void QStatusBar::message( const QString &message ){    if ( d->tempItem == message )	return;    d->tempItem = message;    if ( d->timer ) {	delete d->timer;	d->timer = 0;    }    hideOrShow();}/*!  Hide the normal status indications and display \a message for \a  ms milli-seconds, or until clear() or another message() is called,  whichever is first.*/void QStatusBar::message( const QString &message, int ms ){    d->tempItem = message;    if ( !d->timer ) {	d->timer = new QTimer( this );	connect( d->timer, SIGNAL(timeout()), this, SLOT(clear()) );    }    if ( ms > 0 )	d->timer->start( ms );    hideOrShow();}/*!  Removes any temporary message being shown.  \sa message()*/void QStatusBar::clear(){    if ( d->tempItem.isEmpty() )	return;    if ( d->timer ) {	delete d->timer;	d->timer = 0;    }    d->tempItem = QString::null;    hideOrShow();}/*!  Ensures that the right widgets are visible.  Used by message()  and clear().*/void QStatusBar::hideOrShow(){    bool haveMessage = !d->tempItem.isEmpty();    QStatusBarPrivate::SBItem* item = d->items.first();    while( item && !item->p ) {	if ( haveMessage )	    item->w->hide();	else	    item->w->show();	item = d->items.next();    }    repaint();}/*!  Shows the temporary message, if appropriate.*/void QStatusBar::paintEvent( QPaintEvent * ){    bool haveMessage = !d->tempItem.isEmpty();    QPainter p( this );    QStatusBarPrivate::SBItem* item = d->items.first();    while ( item ) {	if ( (!haveMessage || item->p) && item->w->isVisible() )	    qDrawShadeRect( &p, item->w->x()-1, item->w->y()-1,			    item->w->width()+2, item->w->height()+2,			    colorGroup(), TRUE, 1, 0, 0 );	item = d->items.next();    }    if ( haveMessage ) {	p.setPen( colorGroup().text() );	// ### clip and add ellipsis if necessary	p.drawText( 6, 0, width() - 12, height(), AlignVCenter + SingleLine,		    d->tempItem );    }}/*! \reimp*/void QStatusBar::resizeEvent( QResizeEvent * e ){    QStatusBarPrivate::SBItem* item;        for ( item = d->items.first(); item; item = d->items.next() )	item->w->setMinimumWidth( 30 );    int mw = d->box->totalMinimumSize().width() - 30;    for ( item = d->items.first(); item; item = d->items.next() )	item->w->setMaximumWidth( width() - mw );    QWidget::resizeEvent( e );}/*!  \reimp*/bool QStatusBar::event( QEvent *e ){    if ( e->type() == QEvent::LayoutHint )	update();    if ( e->type() == QEvent::ChildRemoved ) {	QStatusBarPrivate::SBItem* item = d->items.first();	while ( item ) {	    if ( item->w == ( (QChildEvent*)e )->child() )		d->items.removeRef( item );	    item = d->items.next();	}    }    return QWidget::event( e );}#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人免费在线观看| 91亚洲精品久久久蜜桃网站| 97精品视频在线观看自产线路二 | 日本一区二区不卡视频| 久久蜜桃一区二区| 全国精品久久少妇| 在线中文字幕一区二区| 国产精品视频线看| 国产精品每日更新| 国产黑丝在线一区二区三区| 欧美一区二区三区喷汁尤物| 国产精品不卡一区二区三区| 中文字幕一区免费在线观看| 美女视频黄a大片欧美| 欧美日韩小视频| 亚洲日本va午夜在线影院| 亚洲国产wwwccc36天堂| 日本久久一区二区三区| 国产精品色在线| 亚洲一卡二卡三卡四卡无卡久久| 99re这里只有精品首页| 国产精品久久国产精麻豆99网站| 国产一区二区福利| 久久婷婷成人综合色| 精品一区二区免费| 欧美一级xxx| 青娱乐精品在线视频| 在线综合亚洲欧美在线视频| 日本不卡高清视频| 欧美日韩激情在线| 免费高清成人在线| 日韩精品中文字幕在线一区| 九色综合狠狠综合久久| 久久久99精品免费观看不卡| 美国毛片一区二区| 精品三级av在线| 国产原创一区二区| 久久综合成人精品亚洲另类欧美 | 欧美日韩国产区一| 午夜私人影院久久久久| 国产91综合网| 中文字幕日韩av资源站| 91影院在线免费观看| 亚洲一二三四在线观看| 久久精品国产久精国产爱| 精品国偷自产国产一区| 国产伦精品一区二区三区免费 | 成人免费的视频| 国产欧美一区二区三区沐欲| 日韩欧美亚洲国产精品字幕久久久| 国产成人免费9x9x人网站视频| 天堂在线亚洲视频| 亚洲色图制服丝袜| 中文字幕国产精品一区二区| 精品国产一区二区三区久久久蜜月 | 国产成人av电影在线| 日本 国产 欧美色综合| 天天av天天翘天天综合网| 亚洲同性gay激情无套| 欧美国产日产图区| 久久久久久久久久久久电影| 欧美成人综合网站| 欧美一级片在线| 欧美喷潮久久久xxxxx| 一本色道久久加勒比精品 | 色综合天天天天做夜夜夜夜做| 国产91精品一区二区麻豆亚洲| 麻豆91在线播放| 老司机一区二区| 日本免费在线视频不卡一不卡二| 亚洲第一会所有码转帖| 一区二区不卡在线播放| 一区二区在线观看免费视频播放| 国产精品高潮呻吟| 亚洲视频资源在线| 亚洲日本va午夜在线电影| 亚洲色图一区二区| 亚洲精品成人在线| 亚洲一二三四在线| 日韩精品一卡二卡三卡四卡无卡| 日韩影视精彩在线| 美女脱光内衣内裤视频久久网站| 蜜桃av噜噜一区二区三区小说| 美女爽到高潮91| 国产中文一区二区三区| 高清不卡一二三区| www..com久久爱| 在线免费一区三区| 欧美精品日韩一本| 日韩免费视频一区| 日韩视频国产视频| 国产日韩欧美亚洲| 亚洲视频香蕉人妖| 图片区小说区区亚洲影院| 日本美女一区二区| 国产精品资源在线| 99国产精品99久久久久久| 欧美日韩一区二区三区在线看| 91精品国产福利| 久久亚洲春色中文字幕久久久| 国产精品丝袜黑色高跟| 一区二区在线观看av| 日韩专区一卡二卡| 国产成a人无v码亚洲福利| 色域天天综合网| 91麻豆精品国产91久久久久久久久| 精品日韩av一区二区| 国产精品国产三级国产普通话99| 亚洲女同女同女同女同女同69| 亚洲第一在线综合网站| 成人avav影音| 欧美三级电影网| 国产丝袜欧美中文另类| 亚洲精品成人在线| 国产一区二区三区蝌蚪| 在线观看av一区二区| 亚洲精品一区二区在线观看| 亚洲美女电影在线| 久久99精品国产麻豆婷婷| 99精品1区2区| 精品国产3级a| 亚洲午夜激情网页| 国产高清不卡一区二区| 欧美日韩中文国产| 欧美国产禁国产网站cc| 五月激情丁香一区二区三区| 成人av免费在线播放| 欧美精品第1页| 综合色中文字幕| 国产精品一区二区无线| 欧美精品一级二级| 国产精品家庭影院| 国产精品亚洲а∨天堂免在线| 欧美欧美午夜aⅴ在线观看| 中文字幕人成不卡一区| 国产在线国偷精品产拍免费yy | 久久91精品久久久久久秒播| 欧美性猛交xxxx黑人交| 欧美高清在线视频| 加勒比av一区二区| 欧美日韩国产精品成人| 亚洲免费在线观看视频| 国产99精品国产| 久久人人超碰精品| 美女尤物国产一区| 欧美私模裸体表演在线观看| 17c精品麻豆一区二区免费| 国产激情一区二区三区桃花岛亚洲| 91麻豆精品国产91久久久更新时间| 亚洲美女淫视频| 7777精品伊人久久久大香线蕉的 | 日韩欧美一级二级三级| 中文在线一区二区| www.欧美日韩| 亚洲精品国产第一综合99久久| 在线精品视频一区二区三四| 亚洲成人av福利| 精品国产一区二区精华| 国产suv一区二区三区88区| 中文字幕一区二区三区不卡 | 色综合久久久久综合体桃花网| 一区二区三区蜜桃| 欧美一级搡bbbb搡bbbb| 国产成人8x视频一区二区| 亚洲同性gay激情无套| 欧美图区在线视频| 看片的网站亚洲| 国产精品久久久爽爽爽麻豆色哟哟| 一本大道av伊人久久综合| 日日夜夜一区二区| 国产午夜精品一区二区| 91免费看片在线观看| 三级亚洲高清视频| 欧美激情一区二区在线| 在线观看亚洲一区| 久久国产麻豆精品| 综合分类小说区另类春色亚洲小说欧美| 色婷婷精品久久二区二区蜜臀av | 色先锋资源久久综合| 日本中文字幕一区| 中文字幕欧美三区| 欧美日高清视频| 成人黄色777网| 日韩国产欧美在线视频| 青青草一区二区三区| 久久人人97超碰com| 欧美羞羞免费网站| 国产成人一区二区精品非洲| 亚洲国产wwwccc36天堂| 中文字幕av一区 二区| 欧美精品视频www在线观看| 成人av免费在线观看| 麻豆精品视频在线观看免费| 亚洲精品国产无天堂网2021 | 91丝袜呻吟高潮美腿白嫩在线观看| 奇米影视一区二区三区小说| 亚洲欧美自拍偷拍| 欧美精品一区二区三区久久久| 欧美专区亚洲专区| 成人av资源下载|