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

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

?? qmultilineedit.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
/*! \fn int QMultiLineEdit::numLines() const  Returns the number of lines in the editor. The count includes any  empty lines at top and bottom, so for an empty editor this method  will return 1.*//*! \fn bool QMultiLineEdit::atEnd() const  Returns TRUE if the cursor is placed at the end of the text.*//*! \fn bool QMultiLineEdit::atBeginning() const  Returns TRUE if the cursor is placed at the beginning of the text.*//*!  \fn int QMultiLineEdit::lineLength( int line ) const  Returns the number of characters at line number \a line.*//*! \fn QString *QMultiLineEdit::getString( int line ) const  Returns a pointer to the text at line \a line.*//*! \fn void QMultiLineEdit::textChanged()  This signal is emitted when the text is changed by an event or by a  slot. Note that the signal is not emitted when you call a non-slot  function such as insertLine().  \sa returnPressed()*//*! \fn void QMultiLineEdit::returnPressed()  This signal is emitted when the user presses the return or enter  key. It is not emitted if isReadOnly() is TRUE.  \sa textChanged()*//*!  \fn void QMultiLineEdit::undoAvailable (bool yes)  This signal is emitted when the availability of undo changes.  If \a yes is TRUE, then undo() will work until  undoAvailable( FALSE ) is next emitted.*//*!  \fn void QMultiLineEdit::redoAvailable (bool yes)  This signal is emitted when the availability of redo changes.  If \a yes is TRUE, then redo() will work until  redoAvailable( FALSE ) is next emitted.*//*!  \fn void QMultiLineEdit::copyAvailable (bool yes)  This signal is emitted when the availability of cut/copy changes.  If \a yes is TRUE, then cut() and copy() will work until  copyAvailable( FALSE ) is next emitted.*//*! \fn bool QMultiLineEdit::isReadOnly() const  Returns FALSE if this multi line edit accepts text input.  Scrolling and cursor movements are accepted in any case.  \sa setReadOnly() QWidget::isEnabled()*//*! \fn bool QMultiLineEdit::isOverwriteMode() const  Returns TRUE if this multi line edit is in overwrite mode, i.e.  if characters typed replace characters in the editor.  \sa setOverwriteMode()*//*! \fn void QMultiLineEdit::setOverwriteMode( bool on )  Sets overwrite mode if \a on is TRUE. Overwrite mode means  that characters typed replace characters in the editor.  \sa isOverwriteMode()*//*!  If \a on is FALSE, this multi line edit accepts text input.  Scrolling and cursor movements are accepted in any case.  \sa isReadOnly() QWidget::setEnabled()*/void QMultiLineEdit::setReadOnly( bool on ){    if ( readOnly != on ) {	readOnly = on;#ifndef QT_NO_QWS_IM	if (on && composeMode()) {	    forceIMEnd();	}#endif#ifndef QT_NO_CURSOR	setCursor( on ? arrowCursor : ibeamCursor );#endif    }}/*!  Returns the width in pixels of the longest text line in this editor.*/int QMultiLineEdit::maxLineWidth() const{    return d->maxLineWidth;}/*!  Destroys the QMultiLineEdit*/QMultiLineEdit::~QMultiLineEdit(){    delete contents;    delete d;}static QPixmap *buffer = 0;static void cleanupMLBuffer(){    delete buffer;    buffer = 0;}static QPixmap *getCacheBuffer( QSize sz ){    if ( !buffer ) {	qAddPostRoutine( cleanupMLBuffer );	buffer = new QPixmap;    }    if ( buffer->width() < sz.width() || buffer->height() < sz.height() )	buffer->resize( sz );    return buffer;}/*!  Implements the basic drawing logic.*/void QMultiLineEdit::paintCell( QPainter *painter, int row, int col ){    const QColorGroup & g = colorGroup();    QFontMetrics fm( painter->font() );    QString s = stringShown(row);    if ( s.isNull() ) {	qWarning( "QMultiLineEdit::paintCell: (%s) no text at line %d",		  name( "unnamed" ), row );	return;    }    QRect updateR = cellUpdateRect();    QPixmap *buffer = getCacheBuffer( updateR.size() );    ASSERT(buffer);    QPainter pbuf(buffer);    if ( testWState(WState_GlobalBrushOrigin) ) {	int cx, cy;	rowYPos(row, &cy);	colXPos(col, &cx);	pbuf.setBrushOrigin(painter->brushOrigin() - updateR.topLeft() - QPoint(cx, cy));    }#ifdef QT_KEYPAD_MODE    if ( qt_modalEditingEnabled && !isModalEditing() )	pbuf.fillRect( 0, 0, buffer->width(), buffer->height(), g.brush(QColorGroup::Background) );    else#endif    pbuf.fillRect( 0, 0, buffer->width(), buffer->height(), g.brush(QColorGroup::Base) );    QPainter p( buffer );    p.setFont( painter->font() );    p.translate( -updateR.left(), -updateR.top() );    p.setTabStops( tabStopDist(fm) );    int yPos = 0;    int markX1, markX2;				// in x-coordinate pixels    markX1 = markX2 = 0;			// avoid gcc warning    if ( markIsOn ) {	int markBeginX, markBeginY;	int markEndX, markEndY;	getMarkedRegion( &markBeginY, &markBeginX, &markEndY, &markEndX );	if ( row >= markBeginY && row <= markEndY ) {	    if ( row == markBeginY ) {		markX1 = markBeginX;		if ( row == markEndY ) 		// both marks on same row		    markX2 = markEndX;		else		    markX2 = s.length();	// mark till end of line	    } else {		if ( row == markEndY ) {		    markX1 = 0;		    markX2 = markEndX;		} else {		    markX1 = 0;			// whole line is marked		    markX2 = s.length();	// whole line is marked		}	    }	}    }#ifndef QT_NO_QWS_IM    else if ( composeMode() ) {	if ( row >= d->preeditStartY && row <= d->preeditEndY ) {	    int sLength = s.length();	    int preX1 = (row == d->preeditStartY) ? d->preeditStartX : 0;	    int preX2 = (row == d->preeditEndY) ? d->preeditEndX : sLength;	    int prexpos1   =  mapToView( preX1, row );	    int prexpos2   =  mapToView( preX2, row );	    if ( !qt_im_compose_background ) {		p.setPen( g.text() );		p.drawLine( prexpos1, cellHeight()-2, prexpos2, cellHeight()-2 );	    } else {		if ( markX1 == 0 )		    prexpos1 -= 2;		if ( markX2 == sLength )		    prexpos2 += 3;		p.fillRect( prexpos1, 0, prexpos2 - prexpos1, cellHeight(row),			     *qt_im_compose_background );	    }	     	}	//### abusing mark anchor	if ( ( markAnchorY < markDragY || 	     markAnchorY == markDragY && markAnchorX < markDragX)	     && row >= markAnchorY && row <= markDragY) {	    markX1 = row == markAnchorY ? markAnchorX : 0;	    markX2 = row == markDragY ? markDragX : s.length();	}    }#endif //QT_NO_QWS_IM    p.setPen( g.text() );    QMultiLineEditRow* r = contents->at( row );    int wcell = cellWidth() - 2*d->lr_marg;// - d->marg_extra;    int wrow = r->w;    int x = d->lr_marg - p.fontMetrics().leftBearing(s[0]);    if ( d->align == Qt::AlignCenter || d->align == Qt::AlignHCenter )	x += (wcell - wrow) / 2;    else if ( d->align == Qt::AlignRight )	x += wcell - wrow;    p.drawText( x,  yPos, cellWidth()-d->lr_marg-x, cellHeight(),		d->align == AlignLeft?ExpandTabs:0, s );    if ( !r->newline && BREAK_WITHIN_WORDS )	p.drawPixmap( x + wrow - d->lr_marg - d->marg_extra, yPos, d->arrow );#if 0    if ( r->newline )	p.drawLine( d->lr_marg,  yPos+cellHeight()-2, cellWidth() - d->lr_marg, yPos+cellHeight()-2);#endif    if ( markX1 != markX2 ) {	int sLength = s.length();	int xpos1   =  mapToView( markX1, row );	int xpos2   =  mapToView( markX2, row );	int fillxpos1 = xpos1;	int fillxpos2 = xpos2;	if ( markX1 == 0 )	    fillxpos1 -= 2;	if ( markX2 == sLength )	    fillxpos2 += 3;	p.setClipping( TRUE );	p.setClipRect( fillxpos1 - updateR.left(), 0,		       fillxpos2 - fillxpos1, cellHeight(row) );	p.fillRect( fillxpos1, 0, fillxpos2 - fillxpos1, cellHeight(row),		    g.brush( QColorGroup::Highlight ) );	p.setPen( g.highlightedText() );	p.drawText( x,  yPos, cellWidth()-d->lr_marg-x, cellHeight(),		    d->align == AlignLeft?ExpandTabs:0, s );	p.setClipping( FALSE );    }    if ( row == cursorY && cursorOn && !readOnly #ifdef QT_KEYPAD_MODE			    && (!qt_modalEditingEnabled || isModalEditing() ) #endif			    )     {	int cursorPos = QMIN( (int)s.length(), cursorX );	int cXPos   = QMAX( mapToView( cursorPos, row ), 0 );	int cYPos   = 0;	if ( hasFocus() || d->dnd_forcecursor ) {	    p.setPen( g.text() );	    /* styled?	       p.drawLine( cXPos - 2, cYPos,	       cXPos + 2, cYPos );	    */#ifndef QT_NO_QWS_IM	    if ( !( composeMode() && markX1 != markX2) )#endif	    p.drawLine( cXPos, cYPos,			cXPos, cYPos + fm.height() - 2);	    /* styled?	       p.drawLine( cXPos - 2, cYPos + fm.height() - 2,	       cXPos + 2, cYPos + fm.height() - 2);	    */#ifndef QT_NO_TRANSFORMATIONS	    // TODO: set it other times, eg. when scrollbar moves view	    QWMatrix wm = painter->worldMatrix();	    if ( !inBlinkTimer )		setMicroFocusHint( int(wm.dx()+cXPos),				   int (wm.dy()+cYPos),				   1, fm.height() );#else	    int xxpos,yypos;	    if ( !inBlinkTimer && colXPos( 0, &xxpos ) && rowYPos( row, &yypos ) )		setMicroFocusHint( cXPos+xxpos,				   cYPos+yypos,				   1, fm.height() );#endif	}    }    p.end();    painter->drawPixmap( updateR.left(), updateR.top(), *buffer,			 0, 0, updateR.width(), updateR.height() );}/*!  Returns the width in pixels of the string \a s.  NOTE: only appropriate for whole lines.*/int QMultiLineEdit::textWidth( const QString &s ){    int w = 0;    if ( !s.isNull() ) {	w = textWidthWithTabs( QFontMetrics( font() ), s, 0, s.length(),			       d->align );    }    return w + 2 * d->lr_marg + d->marg_extra;}/*!  Returns the width in pixels of the text at line \a line.*/int QMultiLineEdit::textWidth( int line ){    if ( d->echomode == Password) {	QString s = stringShown(line);	return textWidth( s );    }    QMultiLineEditRow* r = contents->at(line);    return r?r->w:0;}/*!  Starts the cursor blinking.*/void QMultiLineEdit::focusInEvent( QFocusEvent * ){    stopAutoScroll();    if ( !d->blinkTimer->isActive() )	d->blinkTimer->start( QApplication::cursorFlashTime() / 2, FALSE );    cursorOn = TRUE;    updateCell( cursorY, 0, FALSE );}/*!\reimp*/void QMultiLineEdit::leaveEvent( QEvent * ){}/*!\reimp*/void QMultiLineEdit::focusOutEvent( QFocusEvent * ){#ifdef QT_KEYPAD_MODE    if ( qt_modalEditingEnabled && isModalEditing() )	setModalEditing( FALSE );#endif    stopAutoScroll();    d->blinkTimer->stop();    if ( cursorOn ) {	cursorOn = FALSE;	updateCell( cursorY, 0, FALSE );    }}/*!  \reimp  Present for binary compatibility only!*/void QMultiLineEdit::timerEvent( QTimerEvent * ){    // ############ Remove in 3.0!!!!!!!!}#ifndef QT_NO_DRAGANDDROPvoid QMultiLineEdit::doDrag(){    if ( d->dnd_timer ) {	d->dnd_timer->stop();    }    QDragObject *drag_text = new QTextDrag(markedText(), this);    if ( readOnly ) {	drag_text->dragCopy();    } else {	if ( drag_text->drag() && QDragObject::target() != this ) {	    del();	    if ( textDirty && !d->isHandlingEvent )		emit textChanged();	}    }    d->dnd_primed = FALSE;}#endif/*!  If there is marked text, sets \a line1, \a col1, \a line2 and \a col2  to the start and end of the marked region and returns TRUE. Returns  FALSE if there is no marked text. */bool QMultiLineEdit::getMarkedRegion( int *line1, int *col1,				      int *line2, int *col2 ) const{    if ( !markIsOn || !line1 || !line2 || !col1 || !col2 )	return FALSE;    if ( markAnchorY < markDragY ||	 markAnchorY == markDragY && markAnchorX < markDragX) {	*line1 = markAnchorY;	*col1 = markAnchorX;	*line2 = markDragY;	*col2 = markDragX;	if ( *line2 > numLines() - 1 ) {	    *line2 = numLines() - 1;	    *col2 = lineLength( *line2 );	}    } else {	*line1 = markDragY;	*col1 = markDragX;	*line2 = markAnchorY;	*col2 = markAnchorX;	if ( *line2 > numLines() - 1 ) {	    *line2 = numLines() - 1;	    *col2 = lineLength( *line2 );	}    }    return markIsOn;}/*!  Returns TRUE if there is marked text.*/bool QMultiLineEdit::hasMarkedText() const{    return markIsOn;}/*!  Returns a copy of the marked text.*/QString QMultiLineEdit::markedText() const{    int markBeginX, markBeginY;    int markEndX, markEndY;    if ( !getMarkedRegion( &markBeginY, &markBeginX, &markEndY, &markEndX ) )	return QString();    if ( markBeginY == markEndY ) { //just one line	QString *s  = getString( markBeginY );	return s->mid( markBeginX, markEndX - markBeginX );    } else { //multiline	QString *firstS, *lastS;	firstS = getString( markBeginY );	lastS  = getString( markEndY );	int i;	QString tmp;	if ( firstS )	    tmp += firstS->mid(markBeginX);	if ( contents->at( markBeginY )->newline )	    tmp += '\n';	for( i = markBeginY + 1; i < markEndY ; i++ ) {	    tmp += *getString(i);	    if ( contents->at( i )->newline )		tmp += '\n';	}	if ( lastS ) {	    tmp += lastS->left(markEndX);	} else {	    tmp.truncate(tmp.length()-1);	}	return tmp;    }}/*!  Returns the text at line number \a line (possibly the empty string),  or a \link QString::operator!() null string\endlink if \a line is invalid.*/QString QMultiLineEdit::textLine( int line ) const{    QString *s = getString(line);    if ( s ) {	if ( s->isNull() )	    return QString::fromLatin1("");	else	    return *s;    } else

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91丝袜在线播放九色| 91精品久久久久久久久99蜜臂| 日本一区二区久久| 欧美一区二区免费观在线| 欧美片网站yy| 欧美日韩高清在线播放| 欧美日本在线观看| 69堂精品视频| 91精品视频网| 91农村精品一区二区在线| 成人av网站在线| 成人午夜激情在线| 日韩av不卡在线观看| 免费亚洲电影在线| 久久国产尿小便嘘嘘| 韩国av一区二区三区四区| 国产精品一二三四五| 亚洲bt欧美bt精品| 午夜成人免费视频| 麻豆一区二区99久久久久| 一区二区三区高清| 国产精品国产自产拍在线| 亚洲视频一二区| 亚洲国产精品一区二区www在线| 久久久99精品免费观看不卡| 日本一区二区免费在线 | 国产经典欧美精品| 成人精品gif动图一区| 日本丶国产丶欧美色综合| 欧美日韩精品系列| 91丨九色丨蝌蚪丨老版| 欧美性猛交xxxxxx富婆| 欧美一区二区三区视频在线观看| av电影一区二区| 欧美揉bbbbb揉bbbbb| 欧美va亚洲va在线观看蝴蝶网| 欧美日韩在线三级| 精品毛片乱码1区2区3区| 欧美久久一二区| 色狠狠综合天天综合综合| 欧美日本一区二区| 久久久99精品免费观看不卡| 亚洲日本一区二区| 麻豆精品久久久| av电影在线不卡| 91麻豆精品国产综合久久久久久| 欧美日韩激情在线| 久久人人97超碰com| 亚洲六月丁香色婷婷综合久久| 国产精品国产a| 五月天网站亚洲| 成人午夜又粗又硬又大| 久久精品男人天堂av| 亚洲精选免费视频| 伦理电影国产精品| 一本色道综合亚洲| 久久蜜臀中文字幕| 亚洲国产综合人成综合网站| 国产精品亚洲第一区在线暖暖韩国 | 欧美一级高清片| 中文字幕制服丝袜成人av| 理论片日本一区| 色婷婷综合久久久久中文一区二区| 91丨九色丨蝌蚪富婆spa| 日韩一区二区在线看| 久久综合色之久久综合| 亚洲成av人影院| www.欧美日韩国产在线| 2021中文字幕一区亚洲| 亚洲777理论| 成人18视频日本| 日韩欧美的一区二区| 亚洲国产精品自拍| 99精品视频免费在线观看| 2021国产精品久久精品| 天天免费综合色| 在线观看日韩高清av| 国产精品理伦片| 九色综合狠狠综合久久| 欧美日韩在线三级| 亚洲精品一卡二卡| 成人福利视频在线| 久久久久九九视频| 九色综合国产一区二区三区| 欧美精选在线播放| 亚洲在线中文字幕| 91丨九色丨国产丨porny| 欧美日韩精品专区| 一区二区三区不卡在线观看 | a亚洲天堂av| 国产午夜精品福利| 激情文学综合插| 日韩午夜精品电影| 免费人成在线不卡| 91精品国产综合久久久蜜臀粉嫩 | 国产偷v国产偷v亚洲高清| 久久精品国产精品亚洲综合| 欧美无砖专区一中文字| 日韩欧美一二三区| 成人动漫精品一区二区| 国产香蕉久久精品综合网| 国产在线视频一区二区| 精品福利一二区| 国产曰批免费观看久久久| 久久综合给合久久狠狠狠97色69| 亚洲精品免费视频| 91丨国产丨九色丨pron| 亚洲免费在线观看| 韩日欧美一区二区三区| 欧美成人艳星乳罩| 国产自产2019最新不卡| 国产人妖乱国产精品人妖| 亚洲成在人线免费| 欧美日韩高清一区二区三区| 国产精品欧美一级免费| 青青草国产成人av片免费| 日韩精品在线一区二区| 亚洲一二三级电影| 欧美日韩国产小视频在线观看| 国产精品女主播av| av在线免费不卡| 一区二区三区蜜桃网| 欧美日韩免费电影| 美国十次综合导航| 久久久久久一级片| 91亚洲精品久久久蜜桃网站| 亚洲成人久久影院| 精品国产免费视频| 成人高清视频免费观看| 亚洲自拍偷拍九九九| 91精品久久久久久蜜臀| 国产精品中文字幕日韩精品 | 亚洲一区二区在线免费看| 欧美日韩视频在线观看一区二区三区| 中文字幕在线观看一区二区| 国内精品视频666| 国产精品嫩草99a| 国产福利一区在线观看| 亚洲欧洲无码一区二区三区| 欧美少妇性性性| 久久av老司机精品网站导航| 国产精品成人免费在线| 欧美日韩国产系列| 国产麻豆日韩欧美久久| 一区二区欧美国产| 91免费版pro下载短视频| 日韩av一区二区三区| 国产欧美一区二区精品秋霞影院| 国产曰批免费观看久久久| 亚洲男人都懂的| 日韩丝袜情趣美女图片| 99这里只有精品| 蜜桃视频在线观看一区| 亚洲人123区| 精品久久久久一区二区国产| 日本道精品一区二区三区| 麻豆91精品视频| 日韩午夜av一区| 99久久久久免费精品国产| 免费看日韩精品| 亚洲欧美一区二区三区孕妇| 日韩欧美国产一区二区在线播放 | 国内外成人在线| xfplay精品久久| 国产91丝袜在线播放九色| 亚洲成人精品在线观看| 国产精品色眯眯| 日韩三级免费观看| 91美女在线看| 国产精品亚洲综合一区在线观看| 久久久久久免费| 一本一本久久a久久精品综合麻豆| 亚洲少妇最新在线视频| 日韩限制级电影在线观看| 一本大道久久a久久精品综合| 亚洲一区二区在线视频| 91.xcao| 91免费视频网| 国产91对白在线观看九色| 日本亚洲三级在线| 精品第一国产综合精品aⅴ| 欧美日韩免费电影| 91麻豆精东视频| 大尺度一区二区| 国产在线播精品第三| 日本视频在线一区| 午夜久久福利影院| 亚洲男人的天堂av| 中文字幕在线不卡视频| 国产女主播一区| 欧美日本韩国一区二区三区视频| 久久99热狠狠色一区二区| 日韩电影在线免费| 亚洲动漫第一页| 一区二区三区国产豹纹内裤在线| 日韩欧美成人激情| 56国语精品自产拍在线观看| 国产成人a级片| 国模大尺度一区二区三区| 美脚の诱脚舐め脚责91|