diff options
Diffstat (limited to 'tqtinterface/qt4/src/widgets/tqlineedit.cpp')
-rw-r--r-- | tqtinterface/qt4/src/widgets/tqlineedit.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/tqtinterface/qt4/src/widgets/tqlineedit.cpp b/tqtinterface/qt4/src/widgets/tqlineedit.cpp index 10c1be8..cca37a7 100644 --- a/tqtinterface/qt4/src/widgets/tqlineedit.cpp +++ b/tqtinterface/qt4/src/widgets/tqlineedit.cpp @@ -130,12 +130,12 @@ struct TQLineEditPrivate : public TQt TQChar blank; MaskInputData *maskData; inline int nextMaskBlank( int pos ) { - int c = tqfindInMask( pos, TRUE, FALSE ); + int c = findInMask( pos, TRUE, FALSE ); separator |= ( c != pos ); return ( c != -1 ? c : maxLength ); } inline int prevMaskBlank( int pos ) { - int c = tqfindInMask( pos, FALSE, FALSE ); + int c = findInMask( pos, FALSE, FALSE ); separator |= ( c != pos ); return ( c != -1 ? c : 0 ); } @@ -250,7 +250,7 @@ struct TQLineEditPrivate : public TQt TQString maskString( uint pos, const TQString &str, bool clear = FALSE ) const; TQString clearString( uint pos, uint len ) const; TQString stripString( const TQString &str ) const; - int tqfindInMask( int pos, bool forward, bool tqfindSeparator, TQChar searchChar = TQChar() ) const; + int findInMask( int pos, bool forward, bool findSeparator, TQChar searchChar = TQChar() ) const; // input methods int imstart, imend, imselstart, imselend; @@ -1842,7 +1842,7 @@ void TQLineEdit::imComposeEvent( TQIMEvent *e ) e->ignore(); return; } - d->text.tqreplace( d->imstart, d->imend - d->imstart, e->text() ); + d->text.replace( d->imstart, d->imend - d->imstart, e->text() ); d->imend = d->imstart + e->text().length(); d->imselstart = d->imstart + e->cursorPos(); d->imselend = d->imselstart + e->selectionLength(); @@ -1948,11 +1948,11 @@ void TQLineEdit::drawContents( TQPainter *p ) // locate cursor position int cix = 0; - TQTextItem ci = d->textLayout.tqfindItem( d->cursor ); + TQTextItem ci = d->textLayout.findItem( d->cursor ); if ( ci.isValid() ) { if ( d->cursor != (int)d->text.length() && d->cursor == ci.from() + ci.length() && ci.isRightToLeft() != d->isRightToLeft() ) - ci = d->textLayout.tqfindItem( d->cursor + 1 ); + ci = d->textLayout.findItem( d->cursor + 1 ); cix = ci.x() + ci.cursorToX( d->cursor - ci.from() ); } @@ -2376,7 +2376,7 @@ void TQLineEditPrivate::init( const TQString& txt ) void TQLineEditPrivate::updateTextLayout() { - // tqreplace all non-printable characters with spaces (to avoid + // replace all non-printable characters with spaces (to avoid // drawing boxes when using fonts that don't have glyphs for such // characters) const TQString &displayText = q->displayText(); @@ -2419,11 +2419,11 @@ TQRect TQLineEditPrivate::cursorRect() const { TQRect cr = q->contentsRect(); int cix = cr.x() - hscroll + innerMargin; - TQTextItem ci = textLayout.tqfindItem( cursor ); + TQTextItem ci = textLayout.findItem( cursor ); if ( ci.isValid() ) { if ( cursor != (int)text.length() && cursor == ci.from() + ci.length() && ci.isRightToLeft() != isRightToLeft() ) - ci = textLayout.tqfindItem( cursor + 1 ); + ci = textLayout.findItem( cursor + 1 ); cix += ci.x() + ci.cursorToX( cursor - ci.from() ); } int ch = q->fontMetrics().height(); @@ -2560,7 +2560,7 @@ void TQLineEditPrivate::setCursorVisible( bool visible ) if ( cursorTimer ) cursorVisible = visible; TQRect r = cursorRect(); - if ( maskData || !q->contentsRect().tqcontains( r ) ) + if ( maskData || !q->contentsRect().contains( r ) ) q->update(); else q->update( r ); @@ -2586,7 +2586,7 @@ void TQLineEditPrivate::insert( const TQString& s ) addCommand ( Command( DeleteSelection, cursor+i, text.at(cursor+i) ) ); addCommand( Command( Insert, cursor+i, ms.at(i) ) ); } - text.tqreplace( cursor, ms.length(), ms ); + text.replace( cursor, ms.length(), ms ); cursor += ms.length(); cursor = nextMaskBlank( cursor ); } else { @@ -2603,7 +2603,7 @@ void TQLineEditPrivate::del( bool wasBackspace ) if ( cursor < (int) text.length() ) { addCommand ( Command( (CommandType)((maskData?2:0)+(wasBackspace?Remove:Delete)), cursor, text.at(cursor) ) ); if ( maskData ) { - text.tqreplace( cursor, 1, clearString( cursor, 1 ) ); + text.replace( cursor, 1, clearString( cursor, 1 ) ); addCommand( Command( Insert, cursor, text.at( cursor ) ) ); } else { text.remove( cursor, 1 ); @@ -2629,7 +2629,7 @@ void TQLineEditPrivate::removeSelectedText() addCommand ( Command( RemoveSelection, i, text.at(i) ) ); } if ( maskData ) { - text.tqreplace( selstart, selend - selstart, clearString( selstart, selend - selstart ) ); + text.replace( selstart, selend - selstart, clearString( selstart, selend - selstart ) ); for ( int i = 0; i < selend - selstart; ++i ) addCommand( Command( Insert, selstart + i, text.at( selstart + i ) ) ); } else { @@ -2832,15 +2832,15 @@ TQString TQLineEditPrivate::maskString( uint pos, const TQString &str, bool clea ++i; } else { // search for separator first - int n = tqfindInMask( i, TRUE, TRUE, str[(int)strIndex] ); + int n = findInMask( i, TRUE, TRUE, str[(int)strIndex] ); if ( n != -1 ) { if ( str.length() != 1 || i == 0 || (i > 0 && (!maskData[i-1].separator || maskData[i-1].maskChar != str[(int)strIndex])) ) { s += fill.mid( i, n-i+1 ); - i = n + 1; // update i to tqfind + 1 + i = n + 1; // update i to find + 1 } } else { // search for valid blank if not - n = tqfindInMask( i, TRUE, FALSE, str[(int)strIndex] ); + n = findInMask( i, TRUE, FALSE, str[(int)strIndex] ); if ( n != -1 ) { s += fill.mid( i, n-i ); switch ( maskData[ n ].caseMode ) { @@ -2853,7 +2853,7 @@ TQString TQLineEditPrivate::maskString( uint pos, const TQString &str, bool clea default: s += str[(int)strIndex]; } - i = n + 1; // updates i to tqfind + 1 + i = n + 1; // updates i to find + 1 } } } @@ -2910,7 +2910,7 @@ TQString TQLineEditPrivate::stripString( const TQString &str ) const } /* searches forward/backward in maskData for either a separator or a blank */ -int TQLineEditPrivate::tqfindInMask( int pos, bool forward, bool tqfindSeparator, TQChar searchChar ) const +int TQLineEditPrivate::findInMask( int pos, bool forward, bool findSeparator, TQChar searchChar ) const { if ( pos >= maxLength || pos < 0 ) return -1; @@ -2920,7 +2920,7 @@ int TQLineEditPrivate::tqfindInMask( int pos, bool forward, bool tqfindSeparator int i = pos; while ( i != end ) { - if ( tqfindSeparator ) { + if ( findSeparator ) { if ( maskData[ i ].separator && maskData[ i ].maskChar == searchChar ) return i; } else { |