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

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

?? qwidgetstack.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
字號:
/****************************************************************************** $Id: qt/src/widgets/qwidgetstack.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QWidgetStack class**** Created : 980128**** 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 "qwidgetstack.h"#ifndef QT_NO_WIDGETSTACK#include "qobjectlist.h"#include "qobjectdict.h"#include "qbutton.h"#include "qbuttongroup.h"#include "qapplication.h"class QWidgetStackPrivate {public:    class Invisible: public QWidget    {    public:	Invisible( QWidgetStack * parent ): QWidget( parent )	{	    setBackgroundMode( NoBackground );	}	const char * className() const	{	    return "QWidgetStackPrivate::Invisible";	}    };};// NOT REVISED/*! \class QWidgetStack qwidgetstack.h  \brief The QWidgetStack class provides a stack of widgets, where the  user can see only the top widget.  \ingroup organizers  The application programmer can move any widget to the top of the  stack at any time using the slot raiseWidget(), and add or remove  widgets using addWidget() and removeWidget().  visibleWidget() is the \e get equivalent of raiseWidget(); it  returns a pointer to the widget that is currently on the top of the  stack.  QWidgetStack also provides the ability to manipulate widgets through  application-specfied integer IDs, and to translate from widget  pointers to IDs using id() and from IDs to widget pointers using  widget().  These numeric IDs have and unique (per QWidgetStack, not  globally) and cannot be -1, but apart from that QWidgetStack does  not attach any meaning to them.  The default widget stack is frame-less and propagates its font and  palette to all its children, but you can use the usual QFrame  functions (like setFrameStyle()) to add a frame, and use  setFontPropagation() and setPalettePropagation() to change the  propagation style.  Finally, QWidgetStack provides a signal, aboutToShow(), which is  emitted just before a managed widget is shown.  \sa QTabDialog QTabBar QFrame*//*!  Constructs an empty widget stack. */QWidgetStack::QWidgetStack( QWidget * parent, const char *name )    : QFrame( parent, name ){    d = 0;    dict = new QIntDict<QWidget>;    focusWidgets = 0;    topWidget = 0;    invisible = new QWidgetStackPrivate::Invisible( this );    setFontPropagation( AllChildren );    setPalettePropagation( AllChildren );}/*! Destructs the object and frees any allocated resources. */QWidgetStack::~QWidgetStack(){    delete focusWidgets;    focusWidgets = 0;    delete d;    d = 0;    delete dict;    dict = 0;}/*!  Adds \a w to this stack of widgets, with id \a id.  If \a w is not a child of \c this, QWidgetStack moves it using  reparent().  Note that the added children are initially hidden. After you have added the widgets  you want to the stack, you may want to call raiseWidget() on one of them.*/void QWidgetStack::addWidget( QWidget * w, int id ){    if ( !w || w == invisible )	return;    dict->insert( id+1, w );    // preserve existing focus    QWidget * f = w->focusWidget();    while( f && f != w )	f = f->parentWidget();    if ( f ) {	if ( !focusWidgets )	    focusWidgets = new QPtrDict<QWidget>( 17 );	focusWidgets->replace( w, w->focusWidget() );    }    w->hide();    if ( w->parent() != this )	w->reparent( this, 0, contentsRect().topLeft(), FALSE );    w->setGeometry( contentsRect() );}/*!  Removes \a w from this stack of widgets.  Does not delete \a  w. If \a w is the currently visible widget, no other widget is  substituted. \sa visibleWidget() raiseWidget() */void QWidgetStack::removeWidget( QWidget * w ){    if ( !w )	return;    int i = id( w );    if ( i != -1 )	dict->take( i+1 );    if ( w == topWidget )	topWidget = 0;    if ( dict->isEmpty() )	invisible->hide(); // let background shine through again}/*!  Raises \a id to the top of the widget stack. \sa visibleWidget() */void QWidgetStack::raiseWidget( int id ){    if ( id == -1 )	return;    QWidget * w = dict->find( id+1 );    if ( w )	raiseWidget( w );}/*!  Raises \a w to the top of the widget stack. */void QWidgetStack::raiseWidget( QWidget * w ){    if ( !w || !isMyChild( w ) )	return;    topWidget = w;    if ( !isVisible() )	return;    if ( !invisible->isVisible() ) {	invisible->setGeometry( contentsRect() );	invisible->lower();	invisible->show();	QApplication::sendPostedEvents( invisible, QEvent::ShowWindowRequest );    }    // try to move focus onto the incoming widget if focus    // was somewhere on the outgoing widget.    QWidget * f = w->focusWidget();    while ( f && f->parent() != this )	f = f->parentWidget();    if ( f && f->parent() == this ) {	if ( !focusWidgets )	    focusWidgets = new QPtrDict<QWidget>( 17 );	focusWidgets->replace( f, f->focusWidget() );	f->focusWidget()->clearFocus();	if ( w->focusPolicy() != QWidget::NoFocus ) {	    f = w;	} else {	    // look for the best focus widget we can find	    // best == what we had (which may be deleted)	    f = focusWidgets->find( w );	    if ( f )		focusWidgets->take( w );	    // second best == selected button from button group	    QWidget * fb = 0;	    // third best == whatever candidate we see first	    QWidget * fc = 0;	    bool done = FALSE;	    const QObjectList * c = w->queryList("QWidget");	    if ( c ) {		QObjectListIt it( *c );		QObject * wc;		while( !done && (wc=it.current()) != 0 ) {		    ++it;		    if ( wc->isWidgetType() ) {			if ( f == wc ) {			    done = TRUE;			} else if ( (((QWidget *)wc)->focusPolicy()&QWidget::TabFocus)				    == QWidget::TabFocus && !((QWidget *)wc)->isTopLevel()) {			    QButton * b = (QButton *)wc;#ifndef QT_NO_BUTTONGROUP			    if ( wc->inherits( "QButton" ) &&				 b->group() && b->isOn() &&				 b->group()->isExclusive() &&				 ( fc == 0 ||				   !fc->inherits( "QButton" ) ||				   ((QButton*)fc)->group() == b->group() ) )				fb = b;			    else#endif				if ( !fc )				    fc = (QWidget*)wc;			}		    }		}		// f exists iff done		if ( !done ) {		    if ( fb )			f = fb;		    else if ( fc )			f = fc;		    else			f = 0;		}		delete c;	    }	}    }    const QObjectList * c = children();    QObjectListIt it( *c );    QObject * o;    while( (o=it.current()) != 0 ) {	++it;	if ( o->isWidgetType() && o != w && o != invisible )	    ((QWidget *)o)->hide();    }    if ( f )	f->setFocus();    if ( isVisible() ) {	emit aboutToShow( w );	if ( receivers( SIGNAL(aboutToShow(int)) ) ) {	    int i = id( w );	    if ( i >= 0 )		emit aboutToShow( i );	}    }    w->setGeometry( invisible->geometry() );    w->show();    QApplication::sendPostedEvents( w, QEvent::ShowWindowRequest );}/*!  Returns TRUE if \a w is a child of this widget, else FALSE. */bool QWidgetStack::isMyChild( QWidget * w ){    const QObjectList * c = children();    if ( !c || !w || w == invisible )	return FALSE;    QObjectListIt it( *c );    QObject * o;    while( (o=it.current()) != 0 ) {	++it;	if ( o->isWidgetType() && o == w )	    return TRUE;    }    return FALSE;}/*! \reimp */void QWidgetStack::frameChanged(){    QFrame::frameChanged();    setChildGeometries();}/*! \reimp */void QWidgetStack::setFrameRect( const QRect & r ){    QFrame::setFrameRect( r );    setChildGeometries();}/*!  Fix up the children's geometries. */void QWidgetStack::setChildGeometries(){    invisible->setGeometry( contentsRect() );    if ( topWidget )	topWidget->setGeometry( invisible->geometry() );}/*! \reimp */void QWidgetStack::show(){    //  Reimplemented in order to set the children's geometries    //  appropriately.    if ( !isVisible() && children() ) {	setChildGeometries();	const QObjectList * c = children();	QObjectListIt it( *c );	QObject * o;	while( (o=it.current()) != 0 ) {	    ++it;	    if ( o->isWidgetType() && !((QWidget*)o)->isTopLevel() )		if ( o == topWidget )		    ((QWidget *)o)->show();		else if ( o == invisible && topWidget != 0 )		    ((QWidget *)o)->show();		else		    ((QWidget *)o)->hide();	}    }    QFrame::show();}/*!  Returns a pointer to the widget with ID \a id.  If this widget  stack does not manage a widget with ID \a id, this function returns  0.  \sa id() addWidget()*/QWidget * QWidgetStack::widget( int id ) const{    return id != -1 ? dict->find( id+1 ) : 0;}/*!  Returns the ID of the \a widget.  If \a widget is 0 or is not  being managed by this widget stack, this function returns -1.  \sa widget() addWidget()*/int QWidgetStack::id( QWidget * widget ) const{    if ( !widget || !dict )	return -1;    QIntDictIterator<QWidget> it( *dict );    while ( it.current() && it.current() != widget )	++it;    return it.current() == widget ? it.currentKey()-1 : -1;}/*! Returns a pointer to the currently visible widget (the one on the  top of the stack), or 0 if nothing is currently being shown.  \sa aboutToShow() id() raiseWidget()*/QWidget * QWidgetStack::visibleWidget() const{    return topWidget;}/*! \fn void QWidgetStack::aboutToShow( int )  This signal is emitted just before a managed widget is shown, if  that managed widget has a non-zero ID.  The argument is the numeric  ID of the widget.*//*! \fn void QWidgetStack::aboutToShow( QWidget * )  This signal is emitted just before a managed widget is shown.  The  argument is a pointer to the widget.*//*! \reimp */void QWidgetStack::resizeEvent( QResizeEvent * e ){    QFrame::resizeEvent( e );    setChildGeometries();}/*! \reimp */QSize QWidgetStack::sizeHint() const{    constPolish();    QSize size(0,0);    if ( children() ) {	const QObjectList * c = children();	QObjectListIt it( *c );	QObject * o;	while( (o=it.current()) != 0 ) {	    ++it;	    if ( o->isWidgetType() && o != invisible ) {		QWidget *w = (QWidget*)o;		size = size.expandedTo( w->sizeHint() )		       .expandedTo(w->minimumSize());	    }	}    }    if ( size.isNull() )	return QSize(100,50); //### is this a sensible default???    return QSize( size.width() + 2*frameWidth(), size.height() + 2*frameWidth() );}/*! \reimp */QSize QWidgetStack::minimumSizeHint() const{    constPolish();    QSize size(0,0);    if ( children() ) {	const QObjectList * c = children();	QObjectListIt it( *c );	QObject * o;	while( (o=it.current()) != 0 ) {	    ++it;	    if ( o->isWidgetType() &&  o != invisible ) {		    QWidget *w = (QWidget*)o;		    size = size.expandedTo( w->minimumSizeHint())					    .expandedTo(w->minimumSize());	    }	}    }    return QSize( size.width() + 2*frameWidth(), size.height() + 2*frameWidth() );}/*! \reimp  */void QWidgetStack::childEvent( QChildEvent * e){    if ( e->child()->isWidgetType() && e->removed() )	removeWidget( (QWidget*) e->child() );}#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天堂一区二区在线免费观看| 国产精品每日更新| 成人av网址在线观看| 水蜜桃久久夜色精品一区的特点| 18欧美乱大交hd1984| 精品国产自在久精品国产| 欧美午夜精品一区二区三区| 美女网站视频久久| 亚洲图片欧美视频| 亚洲视频在线观看一区| 久久综合九色综合97_久久久| 97久久超碰精品国产| 精品一区二区三区蜜桃| 亚洲高清不卡在线| 亚洲国产精品v| 国产亚洲欧美一级| 91精品国产乱码| 色哟哟欧美精品| 91黄色免费版| 欧美视频在线一区二区三区| 色狠狠色狠狠综合| 99久久99久久精品国产片果冻 | 欧美影视一区二区三区| 色综合久久66| 精品视频123区在线观看| 欧美三区免费完整视频在线观看| 欧美综合在线视频| 91原创在线视频| 91国模大尺度私拍在线视频| 色综合色综合色综合色综合色综合 | 欧美视频一区在线| 欧美中文字幕亚洲一区二区va在线| 一本高清dvd不卡在线观看| 在线免费不卡视频| 欧美美女网站色| 久久综合成人精品亚洲另类欧美 | 亚洲第一狼人社区| 久久精品久久精品| 成人免费看黄yyy456| 91香蕉视频污| 777午夜精品免费视频| 久久这里只精品最新地址| 国产欧美精品一区二区三区四区 | 欧美精品成人一区二区三区四区| 欧美三级中文字| 成人av在线网站| 欧美日韩精品一区二区天天拍小说| 91精品免费在线| 国产精品欧美极品| 丝袜亚洲另类丝袜在线| 国产乱码精品一品二品| 色88888久久久久久影院按摩| 欧美精品一卡二卡| 中文字幕免费在线观看视频一区| 亚洲图片一区二区| 粉嫩一区二区三区在线看| 成人免费毛片a| 777欧美精品| 亚洲女与黑人做爰| 久久99这里只有精品| 一本久久a久久精品亚洲| 日韩精品一区二区三区在线观看| 亚洲青青青在线视频| 亚洲国产精品自拍| 亚洲免费观看高清完整版在线观看| 日本亚洲天堂网| 色综合久久中文字幕| 国产亚洲一本大道中文在线| 丝袜脚交一区二区| 91在线观看视频| 国产日韩欧美不卡在线| 美女视频黄 久久| 一本大道久久a久久综合婷婷 | 一区二区在线电影| 国产精品综合av一区二区国产馆| 欧美日本在线一区| 亚洲欧美日韩系列| 岛国一区二区在线观看| 精品国产一区久久| 日本欧美一区二区三区乱码| 欧美亚日韩国产aⅴ精品中极品| 91精品国产色综合久久不卡电影| 亚洲一区在线视频| 色悠悠久久综合| 中文字幕在线免费不卡| 国产成人在线观看免费网站| 在线播放欧美女士性生活| 亚洲国产欧美日韩另类综合| 91美女蜜桃在线| 亚洲欧美另类久久久精品2019| 国产xxx精品视频大全| 亚洲精品在线观| 韩国一区二区视频| 久久久久国产精品人| 国产精品综合网| 国产网站一区二区| av激情综合网| 亚洲色图欧美偷拍| 在线亚洲高清视频| 爽好久久久欧美精品| 欧美一区二区三区日韩视频| 日韩电影网1区2区| 久久中文娱乐网| 国产高清亚洲一区| 亚洲欧洲无码一区二区三区| 91免费视频网址| 亚洲国产高清aⅴ视频| 懂色av中文字幕一区二区三区| www国产成人免费观看视频 深夜成人网| 久久99久久精品| 国产嫩草影院久久久久| 一本一本久久a久久精品综合麻豆| 国产精品久久久久久久午夜片| 色婷婷亚洲婷婷| 日韩专区一卡二卡| 国产日韩欧美激情| 欧美综合视频在线观看| 免费三级欧美电影| 久久久av毛片精品| 色综合天天综合给合国产| 亚洲不卡一区二区三区| 日韩欧美aaaaaa| 99r国产精品| 亚洲欧洲日本在线| 在线精品视频免费观看| 日本网站在线观看一区二区三区| 26uuu另类欧美| 99在线精品免费| 五月天亚洲精品| 亚洲精品一区在线观看| 国产精品一区二区果冻传媒| 18涩涩午夜精品.www| 欧美最新大片在线看| 国产精品一区二区三区乱码| 一区二区三区不卡视频在线观看 | 亚洲五码中文字幕| 亚洲精品在线免费播放| 欧美色综合网站| 久久er99精品| 亚洲一级在线观看| 国产精品久久久久久一区二区三区 | 久久精品国产久精国产| 亚洲欧美一区二区三区极速播放 | 国产经典欧美精品| 人妖欧美一区二区| 自拍偷拍亚洲欧美日韩| 久久午夜电影网| 欧美人牲a欧美精品| 成年人国产精品| 久久99精品久久久久婷婷| 国产精品久久国产精麻豆99网站| 欧美成人女星排名| 欧美老年两性高潮| 色综合一个色综合亚洲| 日日夜夜精品视频天天综合网| 久久精品欧美日韩| 欧美伦理影视网| 欧美午夜精品久久久久久超碰| 精品在线播放午夜| 青青草91视频| 爽好多水快深点欧美视频| 亚洲国产毛片aaaaa无费看 | 一本一本大道香蕉久在线精品 | 国产精品欧美综合在线| 欧美乱熟臀69xxxxxx| 欧美日韩精品综合在线| 91精彩视频在线观看| 色综合视频一区二区三区高清| 成人免费看黄yyy456| 成人免费视频免费观看| 成人毛片在线观看| 成人手机电影网| 成人听书哪个软件好| 本田岬高潮一区二区三区| 成人av免费观看| 一本久久精品一区二区| 国产凹凸在线观看一区二区| 国产成人丝袜美腿| 亚洲电影一区二区三区| 欧美疯狂性受xxxxx喷水图片| 3d成人动漫网站| 26uuu精品一区二区| 亚洲精品日韩专区silk| 麻豆精品一区二区| 99久久伊人久久99| 在线播放欧美女士性生活| 国产网红主播福利一区二区| 亚洲精品中文在线| 精品一区二区国语对白| 在线看国产一区二区| 久久婷婷成人综合色| 亚洲午夜av在线| 成人免费电影视频| 91精品国产综合久久蜜臀| 国产精品久久久久9999吃药| 日韩精品一二区| 色综合久久综合中文综合网| 精品1区2区在线观看| 日日夜夜一区二区| 欧美年轻男男videosbes|