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

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

?? qtabbar.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/*!  Repaints the tab row.  All the painting is done by paint();  paintEvent() only decides which tabs need painting and in what  order.  \sa paint()*/void QTabBar::paintEvent( QPaintEvent * e ){    QPainter p( this );    if ( backgroundMode() == X11ParentRelative ) {	erase();    } else {	if ( !testWState(WState_GlobalBrushOrigin) ) 	    p.setBrushOrigin( rect().bottomLeft() );	p.fillRect( 0, 0, width(), height(),		    QBrush( colorGroup().brush( QColorGroup::Background ) ));    }    QTab * t;    t = l->first();    do {	QTab * n = l->next();	if ( t && t->r.intersects( e->rect() ) )	    paint( &p, t, n == 0 );	t = n;    } while ( t != 0 );    if ( d->scrolls && lstatic->first()->r.left() < 0 ) {	QPointArray a;	int h = height();	if ( d->s == RoundedAbove ) {	    p.fillRect( 0, 3, 4, h-5,			QBrush( colorGroup().brush( QColorGroup::Background ) ));	    a.setPoints( 5,  0,2,  3,h/4, 0,h/2, 3,3*h/4, 0,h );	} else if ( d->s == RoundedBelow ) {	    p.fillRect( 0, 2, 4, h-5,			QBrush( colorGroup().brush( QColorGroup::Background ) ));	    a.setPoints( 5,  0,0,  3,h/4, 0,h/2, 3,3*h/4, 0,h-3 );	}	if ( !a.isEmpty() ) {	    p.setPen( colorGroup().light() );	    p.drawPolyline( a );	    a.translate( 1, 0 );	    p.setPen( colorGroup().midlight() );	    p.drawPolyline( a );	}    }}/*!  This virtual functions is called by the mouse event handlers to  determine which tab is pressed.  The default implementation returns  a pointer to the tab whose bounding rectangle contains \a p, if  exactly one tab's bounding rectangle contains \a p.  It returns 0  else.  \sa mousePressEvent() mouseReleaseEvent()*/QTab * QTabBar::selectTab( const QPoint & p ) const{    QTab * selected = 0;    bool moreThanOne = FALSE;    QListIterator<QTab> i( *l );    while( i.current() ) {	QTab * t = i.current();	++i;	if ( t && t->r.contains( p ) ) {	    if ( selected )		moreThanOne = TRUE;	    else		selected = t;	}    }    return moreThanOne ? 0 : selected;}/*!\reimp*/void QTabBar::mousePressEvent( QMouseEvent * e ){    if ( e->button() != LeftButton )	return;    QTab * t = selectTab( e->pos() );    if ( t != 0 && t == selectTab( e->pos() ) && t->enabled ) {	setCurrentTab( t );    }}/*!\reimp*/void QTabBar::mouseReleaseEvent( QMouseEvent * ){}/*!  \reimp*/void QTabBar::show(){    //  ensures that one tab is selected.    QTab * t = l->last();    QWidget::show();#ifdef QT_KEYPAD_MODE    // grab focus to make tab navigation easier    if( qt_modalEditingEnabled ) {	setFocus();    }#endif    if ( t )	emit selected( t->id );}/*!  If a page is currently visible, returns its ID.  If no page is  currently visible, returns either -1 or the ID of one of the pages.  Even if the return value is not -1, you cannot assume either that  the user can see the relevant page, or that the tab \link  isTabEnabled() is enabled.\endlink  When you need to display something, the return value from this  function represents the best page to display.  That's all.  \sa selected()*/int QTabBar::currentTab() const{    const QTab * t = l->getLast();    return t ? t->id : -1;}/*! Raises the tab with ID \a id and emits the selected() signal.  \sa currentTab() selected() tab()*/void QTabBar::setCurrentTab( int id ){    setCurrentTab( tab( id ) );}/*! Raises \a tab and emits the selected() signal unless the tab was  already current.  \sa currentTab() selected()*/void QTabBar::setCurrentTab( QTab * tab ){    if ( tab && l ) {	if ( l->last() == tab )	    return;	QRect r = l->last()->r;	if ( l->findRef( tab ) >= 0 )	    l->append( l->take() );	d->focus = tab->id;	updateMask();	if ( tab->r.intersects( r ) ) {	    repaint( r.unite( tab->r ) );	} else {	    repaint( r );	    repaint( tab->r );	}	makeVisible( tab );	emit selected( tab->id );    }}/*!  If this tab control has keyboard focus, returns the ID of the  tab Space will select.  Otherwise, returns -1.*/int QTabBar::keyboardFocusTab() const{    return hasFocus() ? d->focus : -1;}/*!\reimp*/void QTabBar::keyPressEvent( QKeyEvent * e ){    //   The right and left arrow keys move a selector, the spacebar    //   makes the tab with the selector active.  All other keys are    //   ignored.    int old = d->focus;    if ( e->key() == Key_Left ) {	// left - skip past any disabled ones	QTab *t = 0;	if ( d->focus > 0 ) {	    t = lstatic->last();	    while ( t && t->id != d->focus )		t = lstatic->prev();	    do {		t = lstatic->prev();	    } while ( t && !t->enabled);	    if (t)		d->focus = t->id;	}#ifdef QT_KEYPAD_MODE	if( qt_modalEditingEnabled ) {	    if (!t) {		t = lstatic->last();		while ( t && !t->enabled)		    t = lstatic->prev();		if (t)		    d->focus = t->id;	    }	}#endif	if ( d->focus < 0 )	    d->focus = old;    } else if ( e->key() == Key_Right #ifdef QT_KEYPAD_MODE		|| (qt_modalEditingEnabled && e->key() == Key_Select)#endif	      ) {	QTab * t = lstatic->first();	while ( t && t->id != d->focus )	    t = lstatic->next();	do {	    t = lstatic->next();	} while ( t && !t->enabled);	if (t)	    d->focus = t->id;#ifdef QT_KEYPAD_MODE	else if( qt_modalEditingEnabled ) {	    t = lstatic->first();	    while ( t && !t->enabled)		t = lstatic->next();	    if (t)		d->focus = t->id;	}#endif	if ( d->focus >= d->id )	    d->focus = old;    } else {	// other keys - ignore	e->ignore();	return;    }    // if the focus moved, repaint and signal    if ( old != d->focus ) {	setCurrentTab( d->focus );    }}/*!  Returns a pointer to the tab with ID \a id, or 0 if there is no  such tab.  \sa count()*/QTab * QTabBar::tab( int id ){    QTab * t;    for( t = l->first(); t; t = l->next() )	if ( t && t->id == id )	    return t;    return 0;}/*! Returns the number of tabs in the tab bar.  \sa tab()*/int QTabBar::count() const{    return l->count();}/*!  The list of QTab objects added.*/QList<QTab> * QTabBar::tabList(){    return l;}/*!  Returns the shape of this tab bar. \sa setShape() */QTabBar::Shape QTabBar::shape() const{    return d ? d->s : RoundedAbove;}/*!  Sets the shape of this tab bar to \a s and refreshes the bar.*/void QTabBar::setShape( Shape s ){    if ( !d || d->s == s )	return;    //######### must recalculate heights    d->s = s;    updateMask();    update();}/*!  Layout all existing tabs (i.e. setting their \c r attribute) according  to their label and their iconset. */void QTabBar::layoutTabs(){    if ( lstatic->isEmpty() )	return;    int hframe, vframe, overlap;    style().tabbarMetrics( this, hframe, vframe, overlap );    QFontMetrics fm = fontMetrics();    int x = 0;    QRect r;    QTab *t;    for ( t = lstatic->first(); t; t = lstatic->next() ) {	int lw = fm.width( t->label );	int iw = 0;	int ih = 0;	if ( t->iconset != 0 ) {	    iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width();	    ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height();	    if (!t->label.isNull())		iw +=2;	}	int h = QMAX( fm.height(), ih );	h = QMAX( h, QApplication::globalStrut().height() );	h += vframe;	t->r.setRect( x, 0, QMAX( lw + hframe + iw,		    QApplication::globalStrut().width() ), h );	x += t->r.width() - overlap;	r = r.unite( t->r );    }    for ( t = lstatic->first(); t; t = lstatic->next() )	t->r.setHeight( r.height() );}/*!  \reimp*/void QTabBar::styleChange( QStyle& old ){	layoutTabs();	QWidget::styleChange( old );}/*!  \reimp*/void QTabBar::focusInEvent( QFocusEvent * ){    QTab *t = l->first();    for ( ; t; t = l->next() ) {	if ( t->id == d->focus ) {	    QPainter p;	    p.begin( this );	    QRect r = t->r;	    p.setFont( font() );	    int iw = 0;	    int ih = 0;	    if ( t->iconset != 0 ) {		iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width();		ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height();		if (!t->label.isEmpty())		    iw +=2; 	    }	    int w = iw + p.fontMetrics().width( t->label ) + 4 + style().pixelMetric(QStyle::TabHMargin);	    int h = QMAX(p.fontMetrics().height() + 4, ih );	    paintLabel( &p, QRect( r.left() + ( r.width() -w ) /2,				   r.top() + ( r.height()-h ) / 2,				   w, h ), t, TRUE );	    p.end();	}    }}/*!  \reimp*/void QTabBar::focusOutEvent( QFocusEvent * ){    QTab *t = l->first();    for ( ; t; t = l->next() ) {	if ( t->id == d->focus ) {	    QPainter p;	    p.begin( this );	    if ( !testWState(WState_GlobalBrushOrigin) ) 		p.setBrushOrigin( rect().bottomLeft() );	    QRect r = t->r;	    p.setFont( font() );	    int iw = 0;	    int ih = 0;	    if ( t->iconset != 0 ) {		iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width();		ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height();		if (!t->label.isEmpty())		    iw +=2; 	    }	    int w = iw + p.fontMetrics().width( t->label ) + 4 + style().pixelMetric(QStyle::TabHMargin);	    int h = QMAX(p.fontMetrics().height() + 4, ih );	    p.fillRect( QRect( r.left() + ( r.width() -w ) / 2 - 1,				   r.top() + ( r.height()-h ) / 2 - 1,			       w + 2, h + 2 ), colorGroup().brush(QColorGroup::Background ) );	    style().drawTab( &p, this, t, TRUE );	    paintLabel( &p, QRect( r.left() + ( r.width() -w ) /2,				   r.top() + ( r.height()-h ) / 2,				   w, h ), t, FALSE );	    p.end();	}    }}/*!  \reimp*/void QTabBar::resizeEvent( QResizeEvent * ){#ifndef QT_NO_TOOLBUTTON    const int arrowWidth = 16;    d->rightB->setGeometry( width() - arrowWidth, 0, arrowWidth, height() );    d->leftB->setGeometry( width() - 2*arrowWidth, 0, arrowWidth, height() );#endif    layoutTabs();    updateArrowButtons();    makeVisible( tab( currentTab() ));}void QTabBar::scrollTabs(){#ifndef QT_NO_TOOLBUTTON    QTab* left = 0;    QTab* right = 0;    for ( QTab* t = lstatic->first(); t; t = lstatic->next() ) {	if ( t->r.left() < 0 && t->r.right() > 0 )	    left = t;	if ( t->r.left() < d->leftB->x()+2 )	    right = t;    }    if ( sender() == d->leftB )	makeVisible( left );    else  if ( sender() == d->rightB )	makeVisible( right );#endif}void QTabBar::makeVisible( QTab* tab  ){#ifndef QT_NO_TOOLBUTTON    bool tooFarLeft = ( tab && tab->r.left() < 0 );    bool tooFarRight = ( tab && tab->r.right() >= d->leftB->x() );    if ( !d->scrolls || ( !tooFarLeft && ! tooFarRight ) )	return;    layoutTabs();    int offset = 0;    if ( tooFarLeft )	offset = tab == lstatic->first() ? 0 : tab->r.left() - 8;    else if ( tooFarRight ) {	offset = tab->r.right() - d->leftB->x() + 1;    }    for ( QTab* t = lstatic->first(); t; t = lstatic->next() )	t->r.moveBy( -offset, 0 );    d->leftB->setEnabled( offset != 0 );    d->rightB->setEnabled( lstatic->last()->r.right() >= d->leftB->x() );    update();#endif}void QTabBar::updateArrowButtons(){#ifndef QT_NO_TOOLBUTTON    bool b = lstatic->last() &&	( lstatic->last()->r.right() > width() );    d->scrolls = b;    if ( d->scrolls ) {	d->leftB->setEnabled( FALSE );	d->rightB->setEnabled( TRUE );	d->leftB->show();	d->rightB->show();    } else {	d->leftB->hide();	d->rightB->hide();    }#endif}#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲乱码国产乱码精品精的特点 | 另类人妖一区二区av| 国产精品系列在线| 欧美三级乱人伦电影| 99v久久综合狠狠综合久久| 国产精品自拍网站| 麻豆久久久久久久| 久久精品国产一区二区| 蜜臀av一区二区在线免费观看| 伊人色综合久久天天| 中文字幕av不卡| 中文字幕精品综合| 久久人人97超碰com| 久久综合网色—综合色88| 精品久久人人做人人爰| 日韩欧美一二三| 欧美一区二区成人| 日韩视频中午一区| 日韩欧美资源站| 91精品国产综合久久福利| 欧美一区二区三区成人| 亚洲精品一区二区三区在线观看| 精品久久久三级丝袜| 亚洲精品在线免费播放| 久久精品夜色噜噜亚洲a∨| 日本一区二区三区国色天香| 精品国内二区三区| 久久毛片高清国产| 亚洲一区二区三区四区在线 | 国产综合色精品一区二区三区| 国产一区二区三区精品视频| 懂色一区二区三区免费观看| 国产真实精品久久二三区| 岛国精品在线播放| 91在线视频播放地址| 色综合咪咪久久| 91精品国产欧美日韩| 日韩精品中午字幕| 国产精品天干天干在观线| 亚洲女爱视频在线| 偷窥国产亚洲免费视频| 日本亚洲一区二区| 丰满白嫩尤物一区二区| 一本大道久久a久久综合婷婷| 欧美在线观看一区二区| 欧美一区二区在线观看| 国产亚洲精品精华液| 中文字幕欧美一区| 亚洲欧美日韩国产综合| 男女男精品网站| 大胆亚洲人体视频| 在线看国产一区二区| 日韩一级大片在线观看| 国产精品女主播在线观看| 欧美va天堂va视频va在线| 欧美丰满一区二区免费视频 | 国产午夜精品在线观看| 亚洲图片自拍偷拍| 成人h版在线观看| 欧美一级在线观看| 一区二区三区免费在线观看| 国产精品一区二区三区网站| 欧美三区在线视频| 综合久久久久综合| 国产一区二区不卡| 91麻豆精品国产91| 亚洲综合在线观看视频| 粉嫩一区二区三区在线看| 日韩一区二区高清| 亚洲与欧洲av电影| 成人在线一区二区三区| 欧美一区二区久久久| 亚洲视频一区二区在线| 国产精品123区| 欧美tickling网站挠脚心| 亚洲午夜视频在线观看| 99九九99九九九视频精品| 久久久国产精品不卡| 蜜臂av日日欢夜夜爽一区| 欧美日韩免费视频| 一二三区精品视频| 色综合色综合色综合色综合色综合| 久久久久久久电影| 青青青爽久久午夜综合久久午夜| 在线日韩一区二区| 亚洲视频在线观看三级| 高清国产一区二区| 国产午夜精品理论片a级大结局| 久久国产精品99久久久久久老狼 | 色国产综合视频| 亚洲欧洲国产日韩| 成人国产精品免费观看| 国产香蕉久久精品综合网| 激情文学综合插| 精品国精品自拍自在线| 老司机精品视频一区二区三区| 4438成人网| 日韩高清不卡一区二区三区| 91麻豆精品国产91| 日韩精品乱码免费| 9191成人精品久久| 图片区小说区区亚洲影院| 欧美日韩视频第一区| 日韩精品福利网| 日韩视频在线一区二区| 美女脱光内衣内裤视频久久网站| 欧美精品乱码久久久久久| 午夜国产精品一区| 日韩一区二区三区视频在线观看| 人人精品人人爱| 精品国产一区二区亚洲人成毛片 | 国产一区二区三区| 国产婷婷一区二区| 99久久精品国产网站| 亚洲女性喷水在线观看一区| 91国产视频在线观看| 午夜免费久久看| 日韩美女视频在线| 国产成人激情av| 色综合久久精品| 国产成人三级在线观看| 亚洲国产精品久久久久婷婷884| 国产精品污网站| 欧美一区二区二区| 欧美日韩国产天堂| 日本电影亚洲天堂一区| 成人午夜伦理影院| 精油按摩中文字幕久久| 日本视频在线一区| 亚洲一二三区不卡| 伊人一区二区三区| 亚洲影院在线观看| 国产精品一区二区三区四区| 国产河南妇女毛片精品久久久 | 亚洲欧洲综合另类| 欧美日韩在线不卡| 黄色精品一二区| 国产精品传媒入口麻豆| 欧美三级在线看| 激情偷乱视频一区二区三区| 中文字幕中文字幕一区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 日韩电影在线免费看| 国产亚洲一区二区在线观看| 色欧美88888久久久久久影院| 视频一区欧美日韩| 国产欧美日韩三级| 欧美日韩国产电影| 成人福利视频在线| 五月天激情小说综合| 日本一区二区三区免费乱视频| 欧美亚洲日本国产| 国产毛片精品国产一区二区三区| 亚洲精品第1页| 精品精品欲导航| 色婷婷精品久久二区二区蜜臂av| 麻豆国产精品一区二区三区| 亚洲色图制服丝袜| 久久日韩粉嫩一区二区三区| 欧美性受极品xxxx喷水| 国产河南妇女毛片精品久久久| 婷婷中文字幕综合| 亚洲欧美日本韩国| 国产三级精品三级在线专区| 欧美精品九九99久久| 成人免费视频视频| 久久精品国产秦先生| 一区二区三区免费网站| 国产网站一区二区| 日韩美女天天操| 欧美日韩亚洲国产综合| 成人成人成人在线视频| 蜜桃视频一区二区三区| 亚洲一区二区三区视频在线播放| 国产精品一区二区果冻传媒| 91搞黄在线观看| 亚洲欧美一区二区三区极速播放 | 日韩av中文字幕一区二区三区| 麻豆国产精品一区二区三区| 成+人+亚洲+综合天堂| 欧美xingq一区二区| 亚洲一区二区3| 成人黄页在线观看| 一区二区视频在线| 欧美三级电影网站| 国产一区美女在线| 免费美女久久99| 亚洲国产精品一区二区尤物区| 国产精品视频一二三| wwwwww.欧美系列| 日韩精品一区二区三区蜜臀| 666欧美在线视频| 欧美日本一区二区在线观看| 91久久精品一区二区三区| av电影在线观看一区| www.日韩在线| 不卡一卡二卡三乱码免费网站| 国产成人精品综合在线观看| 国产精品亚洲专一区二区三区| 久久成人精品无人区|