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

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

?? qmainwindow.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
{    int n = dock->count();    if ( n == 0 )	return 0;    Qt::Orientation o = dock->first()->t->orientation();    QMainWindowPrivate::ToolBar *t = dock->first(), *t2 = 0;    QList<QMainWindowPrivate::ToolBar> row;    row.setAutoDelete( FALSE );    int stretchs = 0;    int e = 0;    int pos = rect_pos( r, o, TRUE );    int lineExtend = 0;    for (;;) {	QSize sh = t ? size_hint( t->t ) : QSize();	int nx = e;	if ( t && t->extraOffset != -1 && t->extraOffset > e )	    nx = t->extraOffset;	if ( nx + size_extend( sh, o ) > rect_extend( r, o ) )	    nx = QMAX( e, rect_extend( r, o ) - size_extend( sh, o ) );	if ( !t || t->nl || nx + size_extend( sh, o ) > rect_extend( r, o ) ) {	    QValueList<QRect> rects;	    int s = stretchs > 0 ? ( rect_extend( r, o ) - e + rect_pos( r, o ) ) / stretchs : 0;	    int p = rect_pos( r, o );	    QMainWindowPrivate::ToolBar *tmp = 0;	    for ( t2 = row.first(); t2; t2= row.next() ) {		QRect g;		int oldPos = p;		int space = 0;		if ( t2->extraOffset > p ) {		    space = t2->extraOffset - p;		    p = t2->extraOffset;		}		if ( o == Qt::Horizontal ) {		    int ext = size_hint( t2->t ).width();		    if ( p + ext > r.width() && p == t2->extraOffset )			p = QMAX( p - space, r.width() - ext );		    if ( p > oldPos && tmp && ( tmp->t->isHorizontalStretchable() || fill ) ) {			QRect r = rects.last();			int d = p - ( r.x() + r.width() );			rects.last().setWidth( r.width() + d );		    }		    if ( t2->t->isHorizontalStretchable() || fill )			ext += QMAX( 0, ( t2->t->isHorizontalStretchable() || fill ? s : 0 ) );		    if ( p + ext > r.width() && ( t2->t->isHorizontalStretchable() || fill ) )			ext = r.width() - p;		    g = QRect( p, pos, ext , lineExtend );		} else {		    int ext = size_hint( t2->t ).height();		    if ( p + ext > r.y() + r.height() && p == t2->extraOffset )			p = QMAX( p - space, ( r.y() + r.height() ) - ext );		    if ( p > oldPos && tmp && ( tmp->t->isVerticalStretchable() || fill ) ) {			QRect r = rects.last();			int d = p - ( r.y() + r.height() );			rects.last().setHeight( r.height() + d );		    }		    if ( t2->t->isVerticalStretchable() || fill )			ext += QMAX( 0, ( t2->t->isVerticalStretchable() || fill ? s : 0 ) );		    if ( p + ext > r.y() + r.height() && ( t2->t->isVerticalStretchable() || fill ) )			ext = ( r.y() + r.height() ) - p;		    g = QRect( pos, p, lineExtend, ext );		}		rects.append( g );		p = rect_pos( g, o ) + rect_extend( g, o );		tmp = t2;	    }	    if ( !testonly ) {		QValueList<QRect>::Iterator it = rects.begin();		for ( t2 = row.first(); t2; t2= row.next(), ++it ) {		    QRect tr = *it;		    if ( o == Qt::Horizontal ) {			if ( tr.width() > r.width() )			    tr.setWidth( r.width() );		    } else {			if ( tr.height() > r.height() )			    tr.setHeight( r.height() );		    }		    t2->t->setGeometry( tr );		}	    }	    stretchs = 0;	    e = 0;	    pos += lineExtend;	    lineExtend = 0;	    row.clear();	    nx = 0;	    if ( t && t->extraOffset != -1 && t->extraOffset > e )		nx = t->extraOffset;	}	if ( !t )	    break;	e = nx + size_extend( sh, o );	lineExtend = QMAX( lineExtend, size_extend( sh, o, TRUE ) );	row.append( t );	if ( ( o == Qt::Horizontal && t->t->isHorizontalStretchable() ||	       o == Qt::Vertical && t->t->isVerticalStretchable() ) || fill )	    ++stretchs;	t = dock->next();    }    return pos - rect_pos( r, o, TRUE ) - spacing();}int QToolLayout::heightForWidth( int w ) const{    if ( cached_width != w ) {	//Not all C++ compilers support "mutable" yet:	QToolLayout * mthis = (QToolLayout*)this;	mthis->cached_width = w;	int h = mthis->layoutItems( QRect(0,0,w,0), TRUE );	mthis->cached_hfw = h;	return h;    }    return cached_hfw;}int QToolLayout::widthForHeight( int h ) const{    if ( cached_height != h ) {	//Not all C++ compilers support "mutable" yet:	QToolLayout * mthis = (QToolLayout*)this;	mthis->cached_height = h;	int w = mthis->layoutItems( QRect( 0, 0, 0, h ), TRUE );	mthis->cached_wfh = w;	return w;    }    return cached_wfh;}void QToolLayout::addItem( QLayoutItem * /*item*/ ){    //evil    //    list.append( item );}class QToolLayoutIterator :public QGLayoutIterator{public:    QToolLayoutIterator( QList<QLayoutItem> *l ) :idx(0), list(l)  {}    uint count() const { return list ? list->count() : 0; }    QLayoutItem *current() { return list && idx < (int)count() ? list->at(idx) : 0;  }    QLayoutItem *next() { idx++; return current(); }    QLayoutItem *takeCurrent() { return list ? list->take( idx ) : 0; }private:    int idx;    QList<QLayoutItem> *list;};QLayoutIterator QToolLayout::iterator(){    //This is evil. Pretend you didn't see this.    return QLayoutIterator( new QToolLayoutIterator( 0/*&list*/ ) );}void QToolLayout::setGeometry( const QRect &r ){    QLayout::setGeometry( r );    layoutItems( r );}#endif//************************************************************************************************// --------------------------------- QMainWindowLayout -----------------------//************************************************************************************************class QMainWindowLayout : public QLayout{    Q_OBJECTpublic:    QMainWindowLayout( QLayout* parent = 0 );    ~QMainWindowLayout() {}    void addItem( QLayoutItem *item);    void setLeftDock( QToolLayout *l );    void setRightDock( QToolLayout *r );    void setCentralWidget( QWidget *w );    bool hasHeightForWidth() const { return FALSE; }    QSize sizeHint() const;    QSize minimumSize() const;    QLayoutIterator iterator();    QSizePolicy::ExpandData expanding() const { return QSizePolicy::BothDirections; }    void invalidate() {}protected:    void setGeometry( const QRect &r ) {	QLayout::setGeometry( r );	layoutItems( r );    }private:    int layoutItems( const QRect&, bool testonly = FALSE );    int cached_height;    int cached_wfh;#ifndef QT_NO_TOOLBAR    QToolLayout *left, *right;#endif    QWidget *central;};QSize QMainWindowLayout::sizeHint() const{    int w = 0, h = 0;#ifndef QT_NO_TOOLBAR    if ( left ) {	w = QMAX( w, left->sizeHint().width() );	h = QMAX( h, left->sizeHint().height() );    }    if ( right ) {	w = QMAX( w, right->sizeHint().width() );	h = QMAX( h, right->sizeHint().height() );    }#endif    if ( central ) {	w = QMAX( w, central->sizeHint().width() );	h = QMAX( h, central->sizeHint().height() );    }    return QSize( w, h );}QSize QMainWindowLayout::minimumSize() const{    int w = 0, h = 0;#ifndef QT_NO_TOOLBAR    if ( left ) {	w += left->minimumSize().width();	h = QMAX( h, left->minimumSize().height() );    }    if ( right ) {	w += right->minimumSize().width();	h = QMAX( h, right->minimumSize().height() );    }#endif    if ( central ) {	QSize min = central->minimumSize().isNull() ?		    central->minimumSizeHint() : central->minimumSize();	w += min.width();	h = QMAX( h, min.height() );    }    return QSize( w, h );}QMainWindowLayout::QMainWindowLayout( QLayout* parent )    : QLayout( parent ),#ifndef QT_NO_TOOLBAR	left( 0 ), right( 0 ),#endif	central( 0 ){    cached_height = -1; cached_wfh = -1;}#ifndef QT_NO_TOOLBARvoid QMainWindowLayout::setLeftDock( QToolLayout *l ){    left = l;}void QMainWindowLayout::setRightDock( QToolLayout *r ){    right = r;}#endifvoid QMainWindowLayout::setCentralWidget( QWidget *w ){    central = w;}int QMainWindowLayout::layoutItems( const QRect &r, bool testonly ){    if (#ifndef QT_NO_TOOLBAR	!left &&	!right &&#endif	!central )	return 0;    int wl = 0, wr = 0;#ifndef QT_NO_TOOLBAR    if ( left )	wl = left->widthForHeight( r.height() );    if ( right )	wr = right->widthForHeight( r.height() );#endif    int w = r.width() - wr - wl;    if ( w < 0 )	w = 0;    if ( !testonly ) {	QRect g( geometry() );#ifndef QT_NO_TOOLBAR	if ( left )	    left->setGeometry( QRect( g.x(), g.y(), wl, r.height() ) );	if ( right )	    right->setGeometry( QRect( g.x() + g.width() - wr, g.y(), wr, r.height() ) );#endif	if ( central )	    central->setGeometry( g.x() + wl, g.y(), w, r.height() );    }    w = wl + wr;    if ( central )	w += central->minimumSize().width();    return w;}void QMainWindowLayout::addItem( QLayoutItem * /*item*/ ){}class QMainWindowLayoutIterator : public QGLayoutIterator{public:    QMainWindowLayoutIterator( QList<QLayoutItem> *l ) :idx(0), list(l)  {}    uint count() const { return list ? list->count() : 0; }    QLayoutItem *current() { return list && idx < (int)count() ? list->at(idx) : 0;  }    QLayoutItem *next() { idx++; return current(); }    QLayoutItem *takeCurrent() { return list ? list->take( idx ) : 0; }private:    int idx;    QList<QLayoutItem> *list;};QLayoutIterator QMainWindowLayout::iterator(){    //This is evil. Pretend you didn't see this.    return QLayoutIterator( new QMainWindowLayoutIterator( 0/*&list*/ ) );}/************************************************************************************************* --------------------------------- Minimized Dock -----------------------************************************************************************************************/#ifndef QT_NO_TOOLBAR#ifndef QT_NO_TOOLTIPclass QHideToolTip : public QToolTip{public:    QHideToolTip( QWidget *parent ) : QToolTip( parent ) {}    void maybeTip( const QPoint &pos );};#endifclass QHideDock : public QWidget{public:    QHideDock( QMainWindow *parent, QMainWindowPrivate *p ) : QWidget( parent, "hide-dock" ) {	hide();	setFixedHeight( style().toolBarHandleExtend() );	d = p;	pressedHandle = -1;	pressed = FALSE;	setMouseTracking( TRUE );	win = parent;#ifndef QT_NO_TOOLTIP	tip = new QHideToolTip( this );#endif    }    ~QHideDock()    {#ifndef QT_NO_TOOLTIP	delete tip;#endif    }protected:    void paintEvent( QPaintEvent *e ) {	if ( !d->hidden || d->hidden->isEmpty() )	    return;	QPainter p( this );	p.setClipRegion( e->rect() );	p.fillRect( e->rect(), colorGroup().brush( QColorGroup::Background ) );	QMainWindowPrivate::ToolBar *tb;	int x = 0;	int i = 0;	for ( tb = d->hidden->first(); tb; tb = d->hidden->next(), ++i ) {	    if ( !tb->t->isVisible() )		continue;	    style().drawToolBarHandle( &p, QRect( x, 0, 30, 10 ), Qt::Vertical,				       i == pressedHandle, colorGroup(), TRUE );	    x += 30;	}    }    void mousePressEvent( QMouseEvent *e ) {	pressed = TRUE;	if ( !d->hidden || d->hidden->isEmpty() )	    return;	mouseMoveEvent( e );	if ( e->button() == RightButton && win->isDockMenuEnabled() ) {	    if ( pressedHandle != -1 ) {		QMainWindowPrivate::ToolBar *tb = d->hidden->at( pressedHandle );		QPopupMenu menu( this );		int left = menu.insertItem( QMainWindow::tr( "&Left" ) );		menu.setItemEnabled( left, win->isDockEnabled( QMainWindow::Left )				     && win->isDockEnabled( tb->t, QMainWindow::Left ) );		int right = menu.insertItem( QMainWindow::tr( "&Right" ) );		menu.setItemEnabled( right, win->isDockEnabled( QMainWindow::Right )				     && win->isDockEnabled( tb->t, QMainWindow::Right ) );		int top = menu.insertItem( QMainWindow::tr( "&Top" ) );		menu.setItemEnabled( top, win->isDockEnabled( QMainWindow::Top )				     && win->isDockEnabled( tb->t, QMainWindow::Top ) );		int bottom = menu.insertItem( QMainWindow::tr( "&Bottom" ) );		menu.setItemEnabled( bottom, win->isDockEnabled( QMainWindow::Bottom )				     && win->isDockEnabled( tb->t, QMainWindow::Bottom ) );		menu.insertSeparator();		int hide = menu.insertItem( QMainWindow::tr( "R&estore" ) );		QMainWindow::ToolBarDock dock = tb->oldDock;		menu.setItemEnabled( hide, win->isDockEnabled( dock )				     && win->isDockEnabled( tb->t, dock ) );		int res = menu.exec( e->globalPos() );		pressed = FALSE;		pressedHandle = -1;		repaint( TRUE );		if ( res == left )		    win->moveToolBar( tb->t, QMainWindow::Left );		else if ( res == right )		    win->moveToolBar( tb->t, QMainWindow::Right );		else if ( res == top )		    win->moveToolBar( tb->t, QMainWindow::Top );		else if ( res == bottom )		    win->moveToolBar( tb->t, QMainWindow::Bottom );		else if ( res == hide )		    win->moveToolBar( tb->t, tb->oldDock, tb->nl, tb->oldIndex, tb->extraOffset );		else		    return;		tb->t->show();	    } else {		win->rightMouseButtonMenu( e->globalPos() );	    }	}    }    void mouseMoveEvent( QMouseEvent *e ) {	if ( !d->hidden || d->hidden->isEmpty() )	    return;	if ( !pressed )	    return;	QMainWindowPrivate::ToolBar *tb;	int x = 0;	int i = 0;	if ( e->y() >= 0 && e->y() <= height() ) {	    for ( tb = d->hidden->first(); tb; tb = d->hidden->next(), ++i ) {		if ( !tb->t->isVisible() )		    continue;		if ( e->x() >= x && e->x() <= x + 30 ) {		    int old = pressedHandle;		    pressedHandle = i;		    if ( pressedHandle != old )			repaint( TRUE );		    return;		}		x += 30;	    }	}	int old = pressedHandle;	pressedHandle = -1;	if ( old != -1 )	    repaint( TRUE );    }    void mouseReleaseEvent( QMouseEvent *e ) {	pressed = FALSE;	if ( pressedHandle == -1 )	    return;       	if ( !d->hidden || d->hidden->isEmpty() )	    return;	if ( e->button() == LeftButton ) {	    if ( e->y() >= 0 && e->y() <= height() ) {		QMainWindowPrivate::ToolBar *tb = d->hidden->at( pressedHandle );		tb->t->show();		win->moveToolBar( tb->t, tb->oldDock, tb->nl, tb->oldIndex, tb->extraOffset );	    }	}	pressedHandle = -1;	repaint( TRUE );    }private:    QMainWindowPrivate *d;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线视频不卡| 在线综合视频播放| 精品视频一区二区三区免费| 欧美日韩国产一级片| 欧美tickling网站挠脚心| 欧美激情在线免费观看| 自拍偷在线精品自拍偷无码专区| 亚洲一区二区三区四区五区中文| 日本色综合中文字幕| 国产福利一区二区三区视频在线| 不卡一卡二卡三乱码免费网站| 在线看国产一区| 欧美大片一区二区| 亚洲欧洲日韩在线| 日欧美一区二区| 成人午夜av影视| 欧美色手机在线观看| 久久久精品中文字幕麻豆发布| 亚洲精品国产精华液| 久草精品在线观看| 在线观看视频一区二区| 日韩女同互慰一区二区| 亚洲日本一区二区三区| 久久精品国产一区二区| av午夜一区麻豆| 欧美一级搡bbbb搡bbbb| 美女视频免费一区| 成人精品免费网站| 欧美精品在线观看一区二区| 国产精品―色哟哟| 免费av网站大全久久| 一本久道久久综合中文字幕| 精品国产露脸精彩对白| 亚洲国产日韩综合久久精品| 不卡在线视频中文字幕| 欧美人成免费网站| 国产精品国模大尺度视频| 免费观看在线综合| 欧美在线不卡视频| 国产精品美女久久久久高潮| 蜜桃av一区二区| 欧美日韩一级片在线观看| 中文字幕一区视频| 国产资源精品在线观看| 91精品国产欧美一区二区18| 亚洲免费av高清| av电影在线观看完整版一区二区| 精品国产乱码久久久久久老虎| 亚洲123区在线观看| 成人在线视频首页| 久久先锋影音av| 日韩成人一区二区| 欧美色精品在线视频| 亚洲日本va午夜在线电影| 丁香婷婷综合激情五月色| 日韩免费在线观看| 日本伊人精品一区二区三区观看方式 | 一区二区三区在线看| 高清久久久久久| 久久综合给合久久狠狠狠97色69| 日韩精品高清不卡| 欧美丝袜自拍制服另类| 欧美国产一区在线| 国产a视频精品免费观看| 精品国产麻豆免费人成网站| 亚洲一区二区影院| 色哟哟一区二区三区| 中文字幕在线不卡一区| 成人一级片网址| 国产精品素人视频| 成人国产精品免费观看动漫| 国产日韩精品一区二区三区在线| 国产精品亚洲成人| 亚洲精品一线二线三线无人区| 免费观看91视频大全| 欧美一级艳片视频免费观看| 麻豆91精品视频| 26uuu色噜噜精品一区| 精品一区二区三区久久久| 欧美α欧美αv大片| 黄色日韩网站视频| 精品久久99ma| 国产河南妇女毛片精品久久久| 久久久99精品久久| 国产成人一级电影| 国产精品护士白丝一区av| 色婷婷综合久久久久中文 | 91最新地址在线播放| 国产精品国模大尺度视频| 色欲综合视频天天天| 亚洲精品欧美专区| 欧美日韩精品综合在线| 青青草97国产精品免费观看 | 一区二区三区在线观看视频| 欧美在线一二三| 天堂蜜桃一区二区三区 | 国产激情视频一区二区在线观看| 国产日韩影视精品| 99麻豆久久久国产精品免费优播| 亚洲伦在线观看| 69久久99精品久久久久婷婷| 免费观看在线综合色| 国产女主播视频一区二区| 91麻豆国产自产在线观看| 五月天激情综合| 精品国产一区二区三区久久久蜜月| 国产最新精品精品你懂的| 国产精品久久久久久久岛一牛影视 | 在线播放91灌醉迷j高跟美女| 久久国产夜色精品鲁鲁99| 久久先锋影音av| 在线观看不卡一区| 奇米精品一区二区三区在线观看| 久久久久亚洲综合| 欧洲一区二区三区免费视频| 欧美a级一区二区| 国产精品免费av| 欧美高清dvd| 成人永久免费视频| 水蜜桃久久夜色精品一区的特点 | 国产一区二区三区精品视频| 亚洲丝袜精品丝袜在线| 欧美日韩国产精选| 丁香婷婷综合激情五月色| 日韩和欧美一区二区三区| 精品动漫一区二区三区在线观看| eeuss影院一区二区三区| 午夜精品成人在线视频| 中文字幕高清不卡| 制服丝袜成人动漫| 91亚洲国产成人精品一区二区三| 免费日韩伦理电影| 亚洲另类在线制服丝袜| 2023国产精品视频| 欧美日精品一区视频| 国产69精品久久99不卡| 日本在线不卡一区| 亚洲免费观看高清| 久久久亚洲精品石原莉奈| 欧美久久一二区| 91免费版在线看| 国产乱子伦视频一区二区三区| 香蕉成人啪国产精品视频综合网| 国产精品色在线| 日韩欧美一级二级三级久久久| 在线观看91视频| 成人国产电影网| 激情国产一区二区 | 欧美欧美欧美欧美| fc2成人免费人成在线观看播放 | 亚洲欧洲av色图| 91精品国产色综合久久| 91在线视频观看| 国产精品1区2区| 久久精品国产第一区二区三区| 亚洲另类春色国产| 中文字幕精品在线不卡| 久久久精品影视| 精品欧美乱码久久久久久1区2区| 欧美日韩国产高清一区二区| 91免费在线看| 国产成人av自拍| 国产九色sp调教91| 麻豆精品新av中文字幕| 日韩国产精品久久| 午夜av一区二区三区| 亚洲一区二区三区四区在线| 国产欧美日韩综合| 久久精品视频在线看| 日韩久久精品一区| 91精品国产高清一区二区三区蜜臀 | 国产精品免费丝袜| 日本一区二区在线不卡| 26uuu国产日韩综合| 欧美一级高清大全免费观看| 欧美乱妇20p| 7777精品伊人久久久大香线蕉 | 精品国产乱码久久久久久蜜臀 | 久久99精品国产麻豆不卡| 亚洲成人免费在线| 亚洲色欲色欲www在线观看| 中文字幕av一区 二区| 国产欧美日韩精品a在线观看| 久久久三级国产网站| 久久亚洲二区三区| 久久只精品国产| 国产亚洲精品资源在线26u| 久久精品人人做人人爽97 | 成人免费视频播放| 国产成人精品免费| 福利电影一区二区| 972aa.com艺术欧美| 91成人在线免费观看| 欧美日韩国产高清一区二区三区 | 男人的天堂久久精品| 免费一级欧美片在线观看| 狠狠色伊人亚洲综合成人| 国产福利91精品| 99精品国产一区二区三区不卡| 色又黄又爽网站www久久|