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

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

?? qheader.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
    if ( section < 0 )	return;    int index = d->s2i[section];    if ( (index > 0 && c < d->positions[index] + GRIPMARGIN) ||	 (c > d->positions[index] + d->sizes[section] - GRIPMARGIN) ) {	if ( c < d->positions[index]  + GRIPMARGIN )	    handleIdx = index-1;	else	    handleIdx = index;	oldHIdxSize = d->sizes[ d->i2s[handleIdx] ];	state = d->resize[d->i2s[handleIdx]  ] ? Sliding : Blocked;    } else if ( index >= 0 ) {	handleIdx = index;	moveToIdx = -1;	state = d->clicks[ d->i2s[handleIdx]  ] ? Pressed : Blocked;	clickPos = c;	repaint( sRect( handleIdx ) );	emit pressed( section );    }}/*!  \reimp*/void QHeader::mouseReleaseEvent( QMouseEvent *e ){    if ( e->button() != LeftButton )	return;    State oldState = state;    state = Idle;    switch ( oldState ) {    case Pressed: {	int section = d->i2s[handleIdx];	repaint(sRect( handleIdx ), FALSE);	emit released( section );	if ( sRect( handleIdx ).contains( e->pos() ) ) {	    emit sectionClicked( handleIdx );	    emit clicked( section );	}	} break;    case Sliding: {	int c = orient == Horizontal ? e->pos().x() : e->pos().y();	c += offset();	handleColumnResize( handleIdx, c, TRUE );	} break;    case Moving: {#ifndef QT_NO_CURSOR	unsetCursor();#endif	int section = d->i2s[handleIdx];	if ( handleIdx != moveToIdx && moveToIdx != -1 ) {	    moveSection( section, moveToIdx );	    repaint(); // a bit overkill, but removes the handle as well	    emit moved( handleIdx, moveToIdx );	    emit indexChange( section, handleIdx, moveToIdx );	    emit released( section );	} else {	    repaint(sRect( handleIdx ), FALSE );	    if ( sRect( handleIdx).contains( e->pos() ) ) {		emit released( section );		emit sectionClicked( handleIdx );		emit clicked( section );	    }	}	break;    }    case Blocked:	//nothing	break;    default:	// empty, probably.  Idle, at any rate.	break;    }}/*!  \reimp*/void QHeader::mouseMoveEvent( QMouseEvent *e ){    int section;    bool hit;    int c = orient == Horizontal ? e->pos().x() : e->pos().y();    c += offset();    switch( state ) {    case Idle:	hit = FALSE;	if ( (section = sectionAt( c )) >= 0 ) {	    int index = d->s2i[section];	    if ( (index > 0 && c < d->positions[index] + GRIPMARGIN) ||		 (c > d->positions[index] + d->sizes[section] - GRIPMARGIN) ) {		if ( index > 0 && c < d->positions[index]  + GRIPMARGIN )		    section = d->i2s[--index];		if ( d->resize.testBit(section) ) {		    hit = TRUE;#ifndef QT_NO_CURSOR		    if ( orient == Horizontal )			setCursor( splitHCursor );		    else			setCursor( splitVCursor );#endif		}	    }	}#ifndef QT_NO_CURSOR	if ( !hit )	    unsetCursor();#endif	break;    case Blocked:	break;    case Pressed:	if ( QABS( c - clickPos ) > 4 && d->move ) {	    state = Moving;	    moveToIdx = -1;#ifndef QT_NO_CURSOR	    if ( orient == Horizontal )		setCursor( sizeHorCursor );	    else		setCursor( sizeVerCursor );#endif	}	break;    case Sliding:	handleColumnResize( handleIdx, c, FALSE );	break;    case Moving: {	int newPos = findLine( c );	if ( newPos != moveToIdx ) {	    if ( moveToIdx == handleIdx || moveToIdx == handleIdx + 1 )		repaint( sRect(handleIdx) );	    else		unMarkLine( moveToIdx );	    moveToIdx = newPos;	    if ( moveToIdx == handleIdx || moveToIdx == handleIdx + 1 )		paintRect( pPos( handleIdx ), pSize( handleIdx ) );	    else		markLine( moveToIdx );	}	break;    }    default:	qWarning( "QHeader::mouseMoveEvent: (%s) unknown state", name() );	break;    }}/*!  Handles resizing of sections. This means it redraws the relevant parts  of the header.*/void QHeader::handleColumnResize( int index, int c, bool final ){    int section = d->i2s[index];    int lim = d->positions[index] +  2*GRIPMARGIN;    if ( c == lim ) return;    if ( c < lim ) c = lim;    int oldSize = d->sizes[section];    int newSize = c - d->positions[index];    d->sizes[section] = newSize;    d->calculatePositions();    int pos = d->positions[index]-offset();    if ( orient == Horizontal )	repaint( pos, 0, width() - pos, height() );    else	repaint( 0, pos, width(), height() - pos );    if ( tracking() && oldSize != newSize )	emit sizeChange( section, oldSize, newSize );    else if ( !tracking() && final && oldHIdxSize != newSize )	emit sizeChange( section, oldHIdxSize, newSize );}/*!  Returns the rectangle covered by index \a index.*/QRect QHeader::sRect( int index ){    int section = mapToSection( index );    if ( section < 0 )	return rect(); // ### eeeeevil    if ( orient == Horizontal )	return QRect(  d->positions[index]-offset(), 0, d->sizes[section], height() );    else	return QRect( 0, d->positions[index]-offset(), width(), d->sizes[section] );}/*!  Sets the icon on the section \a section to \a iconset and the text to \a s.  If the section does not exist, nothing happens.  If \a size is non-negative, the section width is set to \a size.  Any icon set that has been defined for this section remains  unchanged.*/void QHeader::setLabel( int section, const QIconSet& iconset, const QString &s, int size ){    if ( section < 0 || section >= count() )	return;    d->iconsets.insert( section, new QIconSet( iconset ) );    setLabel( section, s, size );}/*!  Sets the text on section \a section to \a s. If the section does not exist,  nothing happens.  If \a size is non-negative, the section width is set to \a size.  Any icon set that has been defined for this section remains  unchanged.*/void QHeader::setLabel( int section, const QString &s, int size ){    if ( section < 0 || section >= count() )	return;    d->labels.insert( section, new QString( s ) );    if ( size >= 0 )	d->sizes[section] = size;    if ( isUpdatesEnabled() ) {	d->calculatePositions();	update();    }}/*!  Returns the text set on section \a section.*/QString QHeader::label( int section ) const{    if ( section < 0 || section >= count() )	return QString::null;    if ( d->labels[ section ] )	return *( d->labels[ section ] );    else	return QString::null;}/*!  Returns the icon set set on section \a section.*/QIconSet *QHeader::iconSet( int section ) const{    if ( section < 0 || section >= count() )	return 0;    return d->iconsets[ section ];}/*!  Adds a new section, with icon set \a iconset and label text \a  s. Returns the index.  If \a size is non-negative, the section width  is set to \a size, otherwise a size currently sufficient for the  label is used.*/int QHeader::addLabel( const QIconSet& iconset, const QString &s, int size ){    int n = count() + 1;    d->iconsets.resize( n + 1 );    d->iconsets.insert( n - 1, new QIconSet( iconset ) );    return addLabel( s, size );}/*!  Removes the section \a section.*/void QHeader::removeLabel( int section ){    if ( section < 0 || section > count() - 1 )	return;    int index = d->s2i[section];    int n = --d->count;    int i;    for ( i = section; i < n; ++i ) {	d->sizes[i] = d->sizes[i+1];	d->heights[i] = d->heights[i+1];	d->labels.insert( i, d->labels.take( i + 1 ) );	d->iconsets.insert( i, d->iconsets.take( i + 1 ) );    }    d->sizes.resize( n );    d->positions.resize( n );    d->heights.resize( n );    d->labels.resize( n );    d->iconsets.resize( n );    for ( i = section; i < n; ++i )	d->s2i[i] = d->s2i[i+1];    d->s2i.resize( n  );    if ( isUpdatesEnabled() ) {	for ( i = 0; i < n; ++i )	    if ( d->s2i[i] > index )		--d->s2i[i];    }    for ( i = index; i < n; ++i )	d->i2s[i] = d->i2s[i+1];    d->i2s.resize( n );    if ( isUpdatesEnabled() ) {	for ( i = 0; i < n ; ++i )	    if ( d->i2s[i] > section )		--d->i2s[i];    }    if ( isUpdatesEnabled() ) {	d->calculatePositions();	update();    }}/*!  Appends or removes (from the end) sections so that the total  number equals /a n. New sections get a default label.  Faster than calling addLabel()/removeLabel() in a loop. */void QHeader::setNumLabels( int n ){    if ( n > d->count ) {	// add labels	int lastpos = 0;	if ( d->count )	    lastpos = d->positions[d->count-1] + d->sizes[d->i2s[d->count-1]];	d->labels.resize( n );	if ( int( d->iconsets.size() ) < n  )	    d->iconsets.resize( n );	d->sizes.resize( n );	d->positions.resize( n );	d->heights.resize( n );	d->i2s.resize( n );	d->s2i.resize( n );	d->clicks.resize( n );	d->resize.resize( n );	QFontMetrics fm(font());	int height = fm.lineSpacing() + 6;	int width = 20;	int size;	if ( orient == Horizontal )	    size = width;	else	    size = height;	for ( int section = d->count; section < n; section++ ) {	    d->labels.insert( section, new QString( QString::number(section) ) );	    /*	      int iw = 0;	      int ih = 0;	      if ( d->iconsets[section] != 0 ) {	      iw = d->iconsets[section]->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 2;	      ih = d->iconsets[section]->pixmap( QIconSet::Small, QIconSet::Normal ).height();	      }	    */	    int index = section;	    d->sizes[section] = size;	    d->positions[index] = lastpos;	    // we abuse the heights as widths for vertical layout	    d->heights[section] = orient == Horizontal ? height : width;	    d->s2i[section] = index;	    d->i2s[index] = section;	    d->clicks.setBit( section, d->clicks_default );	    d->resize.setBit( section, d->resize_default );	    lastpos += size;	}	d->count = n;    } else if ( n < d->count ) {	qWarning( "not really implemented yet" );	while ( n < d->count )	    removeLabel( d->count - 1 );    }}/*!  Adds a new section, with label text \a s. Returns the index.  If \a size is non-negative, the section width is set to \a size,  otherwise a size currently sufficient for the label text is used.*/int QHeader::addLabel( const QString &s, int size ){    int lastpos = 0;    if ( d->count )	lastpos = d->positions[d->count-1] + d->sizes[d->i2s[d->count-1]];    int n = ++d->count;    d->labels.resize( n );    if ( int( d->iconsets.size() ) < n  )	d->iconsets.resize( n );    d->sizes.resize( n );    d->positions.resize( n );    d->heights.resize( n );    int section = n - 1;    d->labels.insert( section, new QString( s ) );  // n-1 is last real idx    int iw = 0;    int ih = 0;    if ( d->iconsets[section] != 0 ) {	iw = d->iconsets[section]->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 2;	ih = d->iconsets[section]->pixmap( QIconSet::Small, QIconSet::Normal ).height();    }    QFontMetrics fm = fontMetrics();    int height = QMAX( fm.lineSpacing() + 6, ih );    int width = fm.boundingRect( s ).width()+ QH_MARGIN * 3 + iw;    if ( size < 0 ) {	if ( orient == Horizontal )	    size = width;	else	    size = height;    }    int index = section;    d->sizes[section] = size;    d->positions[index] = lastpos;    // we abuse the heights as widths for vertical layout    d->heights[section] = orient == Horizontal ? height : width;    d->i2s.resize( n );    d->s2i.resize( n );    d->s2i[section] = index;    d->i2s[index] = section;    d->clicks.resize( n );    d->resize.resize( n );    d->clicks.setBit( section, d->clicks_default );    d->resize.setBit( section, d->resize_default );    if ( isUpdatesEnabled() )	update();    return index;}/*!\reimp*/QSize QHeader::sizeHint() const{    constPolish();    QFontMetrics fm = fontMetrics();    if ( orient == Horizontal ) {	int height = fm.lineSpacing() + 6;	int width = 0;	for ( int i=0 ; i<count() ; i++ ) {	    height = QMAX( height , d->heights[i] );	    width += d->sizes[i];	}	return QSize( width, height );    }    else {	int width = fm.width( ' ' );	int height = 0;	for ( int i=0 ; i<count() ; i++ ) {	    width = QMAX( width , d->heights[i] );	    height += d->sizes[i];	}	return QSize( width, height );    }}/*!\reimp*/QSizePolicy QHeader::sizePolicy() const{    //### removeme 3.0    return QWidget::sizePolicy();}/*!  Scrolls the header such that \a x becomes the leftmost (or uppermost  for vertical headers) visible pixel.*/void QHeader::setOffset( int x ){    int oldOff = offs;    offs = x;    if ( orient == Horizontal )	scroll( oldOff-offs, 0 );    else	scroll( 0, oldOff-offs);}/*!  Returns the position of actual division line \a i in widget  coordinates. May return a position outside the widget.  Note that the last division line is numbered count(). (There are one more lines than  sections).

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线电影一区二区三区| 亚洲人成精品久久久久| 国产欧美一区二区三区在线老狼| 国产精品免费视频一区| 亚洲国产美女搞黄色| 国产成人av一区二区三区在线| 欧美综合在线视频| 亚洲视频资源在线| 国产一区二区美女| 日韩欧美在线网站| 亚洲国产一区二区三区| 成人毛片在线观看| 欧美精品一区在线观看| 亚洲成人资源在线| 色94色欧美sute亚洲线路一久| 国产午夜精品理论片a级大结局 | 成人欧美一区二区三区| 久久精品国产秦先生| 欧美日韩中文一区| 亚洲男人天堂一区| av一二三不卡影片| 久久人人超碰精品| 国产一区二区三区在线观看免费视频 | 日韩专区欧美专区| 色综合色狠狠天天综合色| 国产亚洲短视频| 国产乱码精品一区二区三区av| 3atv一区二区三区| 日韩影院精彩在线| 欧美理论电影在线| 亚洲大片免费看| 欧美日韩国产综合草草| 亚洲一区二区三区三| 色噜噜狠狠一区二区三区果冻| 亚洲婷婷综合久久一本伊一区| 粉嫩蜜臀av国产精品网站| 国产婷婷一区二区| 国产成人av电影在线播放| 久久影视一区二区| 激情综合网最新| 久久久久成人黄色影片| 懂色av中文字幕一区二区三区| 国产亚洲人成网站| 成人高清视频免费观看| 中文乱码免费一区二区| 成人av手机在线观看| 亚洲女爱视频在线| 欧美人狂配大交3d怪物一区| 狠狠色伊人亚洲综合成人| 亚洲一区二区三区激情| 久久精品亚洲国产奇米99| 久久99热狠狠色一区二区| 精品成人在线观看| fc2成人免费人成在线观看播放| 亚洲色图清纯唯美| 欧美日韩一卡二卡三卡| 激情图片小说一区| 亚洲视频中文字幕| 678五月天丁香亚洲综合网| 精品影视av免费| 国产精品欧美经典| 欧美区在线观看| 国产成人一级电影| 亚洲人成小说网站色在线| 久久精品国产秦先生| 中文字幕巨乱亚洲| 91麻豆国产精品久久| 欧美国产日韩亚洲一区| 色婷婷久久久综合中文字幕| 一区二区三区中文字幕精品精品 | av高清不卡在线| 首页综合国产亚洲丝袜| 日韩一区二区三区高清免费看看| 久久99久久99精品免视看婷婷| 2014亚洲片线观看视频免费| 成人国产精品免费观看视频| 亚洲视频一区在线| 欧美一级生活片| 国产成人免费网站| 亚洲综合一区在线| 9191久久久久久久久久久| 97国产一区二区| 天堂成人国产精品一区| 国产女人18毛片水真多成人如厕| 99久久国产免费看| 另类小说图片综合网| 中文字幕久久午夜不卡| 91精品综合久久久久久| 国产成人亚洲综合a∨婷婷图片 | 一区二区三区中文字幕精品精品| 777xxx欧美| 成人精品在线视频观看| 亚洲午夜久久久久中文字幕久| 精品成人一区二区三区四区| 色婷婷综合久久| 美女高潮久久久| 天天色天天操综合| 国产精品久久毛片| 日韩欧美三级在线| 97se亚洲国产综合自在线观| 蜜桃在线一区二区三区| 亚洲美女屁股眼交| 日本一区二区在线不卡| 日韩欧美激情在线| av在线免费不卡| 国产精品99久久不卡二区| 五月综合激情婷婷六月色窝| 国产精品久久久久久久久快鸭| 欧美中文字幕一二三区视频| 粉嫩av亚洲一区二区图片| 九九**精品视频免费播放| 午夜精品久久久久久久久久久| 久久只精品国产| 制服.丝袜.亚洲.中文.综合| 欧美日韩国产区一| 在线看国产一区二区| 波波电影院一区二区三区| 国产精品一区一区| 国内精品伊人久久久久av影院| 一区二区三区中文在线| 国产女主播视频一区二区| 日韩一区二区精品在线观看| 欧美日韩中文国产| 欧美色视频在线观看| 欧美中文字幕一区二区三区| 色噜噜狠狠色综合中国| 99久久精品国产一区| 国产精品一二三区在线| 丰满白嫩尤物一区二区| 懂色av中文字幕一区二区三区 | 久久99在线观看| 婷婷开心久久网| 久久国产夜色精品鲁鲁99| 日韩成人免费电影| 日韩黄色小视频| 日本人妖一区二区| 日韩精品高清不卡| 免费不卡在线视频| 奇米色一区二区| 国产精品一区二区久久不卡| 国产乱码一区二区三区| 国产成人在线色| 91麻豆免费看片| 欧美日韩一区二区三区高清 | 亚洲第一精品在线| 视频一区二区不卡| 美女视频第一区二区三区免费观看网站| 亚洲欧美激情在线| 亚洲成人av中文| 奇米精品一区二区三区在线观看一 | 色琪琪一区二区三区亚洲区| 色一区在线观看| 91精品国产乱码久久蜜臀| 欧美电影免费观看高清完整版在线| 日韩欧美的一区| 欧美大尺度电影在线| 欧美成人一区二区三区| 国产午夜三级一区二区三| 亚洲欧美韩国综合色| 日韩—二三区免费观看av| 久久国内精品自在自线400部| 国产成人午夜高潮毛片| 在线看国产一区| 欧美一级二级三级蜜桃| 最好看的中文字幕久久| 污片在线观看一区二区| 国产电影一区二区三区| 色天使色偷偷av一区二区| 日韩一级黄色片| 国产精品乱码人人做人人爱 | 6080日韩午夜伦伦午夜伦| 日本一二三不卡| 亚洲va中文字幕| 国产成人自拍网| 欧美久久一二三四区| 久久久精品免费免费| 亚洲大片在线观看| 精油按摩中文字幕久久| 91精品国产91综合久久蜜臀| 亚洲国产岛国毛片在线| 日韩成人一级大片| 91理论电影在线观看| 久久久美女艺术照精彩视频福利播放| 亚洲手机成人高清视频| 七七婷婷婷婷精品国产| 欧美日韩色综合| 中文字幕一区二区三区av| 久久精品国产在热久久| 欧美在线视频你懂得| 国产日韩欧美综合在线| 日韩中文字幕一区二区三区| 91国产成人在线| 亚洲国产激情av| 激情五月婷婷综合| 欧美一区日本一区韩国一区| 亚洲女子a中天字幕| 成人一区二区三区视频在线观看| 欧美三级韩国三级日本一级| 亚洲观看高清完整版在线观看| 懂色av中文字幕一区二区三区|