diff options
Diffstat (limited to 'khexedit/lib')
45 files changed, 264 insertions, 260 deletions
diff --git a/khexedit/lib/codecs/kbinarybytecodec.cpp b/khexedit/lib/codecs/kbinarybytecodec.cpp index a49a460..fc9fe8d 100644 --- a/khexedit/lib/codecs/kbinarybytecodec.cpp +++ b/khexedit/lib/codecs/kbinarybytecodec.cpp @@ -24,7 +24,7 @@ using namespace KHE; void KBinaryByteCodec::encode( TQString &Digits, unsigned int Pos, const unsigned char Char ) const { for( unsigned char M=1<<7; M>0; M>>=1 ) - Digits.at(Pos++) = (Char & M) ? '1' : '0'; + Digits.tqat(Pos++) = (Char & M) ? '1' : '0'; } void KBinaryByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const @@ -36,7 +36,7 @@ void KBinaryByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned break; // now set the for( ; M>0; M>>=1 ) - Digits.at(Pos++) = (Char & M) ? '1' : '0'; + Digits.tqat(Pos++) = (Char & M) ? '1' : '0'; } diff --git a/khexedit/lib/codecs/kbytecodec.cpp b/khexedit/lib/codecs/kbytecodec.cpp index f4847ba..900055e 100644 --- a/khexedit/lib/codecs/kbytecodec.cpp +++ b/khexedit/lib/codecs/kbytecodec.cpp @@ -40,7 +40,7 @@ KByteCodec *KByteCodec::createCodec( KCoding C ) unsigned int KByteCodec::decode( unsigned char *Char, const TQString &Digits, uint Pos ) const { - //kdDebug() << TQString("KByteCodec::decode(%1,%2)").arg(Digits).arg(Pos) << endl; + //kdDebug() << TQString("KByteCodec::decode(%1,%2)").tqarg(Digits).tqarg(Pos) << endl; const uint P = Pos; // remove leading 0s @@ -50,7 +50,7 @@ unsigned int KByteCodec::decode( unsigned char *Char, const TQString &Digits, ui unsigned int d = encodingWidth(); do { - if( !appendDigit(&C,Digits.at(Pos)) ) + if( !appendDigit(&C,Digits.tqat(Pos)) ) break; ++Pos; diff --git a/khexedit/lib/codecs/kcharcodec.cpp b/khexedit/lib/codecs/kcharcodec.cpp index 1aab79b..dea28c1 100644 --- a/khexedit/lib/codecs/kcharcodec.cpp +++ b/khexedit/lib/codecs/kcharcodec.cpp @@ -42,7 +42,7 @@ KCharCodec *KCharCodec::createCodec( const TQString &Name ) { KCharCodec *Codec = 0; - if( KTextCharCodec::codecNames().findIndex(Name) != -1 ) + if( KTextCharCodec::codecNames().tqfindIndex(Name) != -1 ) Codec = KTextCharCodec::createCodec( Name ); else if( KEBCDIC1047CharCodec::codecName() == Name ) Codec = KEBCDIC1047CharCodec::create(); diff --git a/khexedit/lib/codecs/kdecimalbytecodec.cpp b/khexedit/lib/codecs/kdecimalbytecodec.cpp index c556875..065eb81 100644 --- a/khexedit/lib/codecs/kdecimalbytecodec.cpp +++ b/khexedit/lib/codecs/kdecimalbytecodec.cpp @@ -24,12 +24,12 @@ using namespace KHE; void KDecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const { unsigned char C = Char / 100; - Digits.at(Pos++) = '0'+C; + Digits.tqat(Pos++) = '0'+C; Char -= C * 100; C = Char / 10; - Digits.at(Pos++) = '0'+C; + Digits.tqat(Pos++) = '0'+C; Char -= C * 10; - Digits.at(Pos) = '0'+Char; + Digits.tqat(Pos) = '0'+Char; } @@ -38,15 +38,15 @@ void KDecimalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigne unsigned char C; if( (C = Char / 100) ) { - Digits.at(Pos++) = '0'+C; + Digits.tqat(Pos++) = '0'+C; Char -= C * 100; } if( (C = Char / 10) ) { - Digits.at(Pos++) = '0'+C; + Digits.tqat(Pos++) = '0'+C; Char -= C * 10; } - Digits.at(Pos) = '0'+Char; + Digits.tqat(Pos) = '0'+Char; } diff --git a/khexedit/lib/codecs/kebcdic1047charcodec.cpp b/khexedit/lib/codecs/kebcdic1047charcodec.cpp index d1002c3..2e91035 100644 --- a/khexedit/lib/codecs/kebcdic1047charcodec.cpp +++ b/khexedit/lib/codecs/kebcdic1047charcodec.cpp @@ -21,7 +21,7 @@ using namespace KHE; -static Q_UINT16 UnicodeChars[256] = +static TQ_UINT16 UnicodeChars[256] = { 0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F, 0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, @@ -98,7 +98,7 @@ static const char KEBCDIC1047CharCodecName[] = "EBCDIC 1047"; bool KEBCDIC1047CharCodec::encode( char *D, const TQChar &C ) const { - int I = C.unicode(); + int I = C.tqunicode(); // not in range? if( 0x00FF < I ) return false; @@ -119,6 +119,6 @@ const TQString& KEBCDIC1047CharCodec::name() const const TQString& KEBCDIC1047CharCodec::codecName() { - static const TQString Name( TQString::fromLatin1(KEBCDIC1047CharCodecName) ); + static const TQString Name( TQString::tqfromLatin1(KEBCDIC1047CharCodecName) ); return Name; } diff --git a/khexedit/lib/codecs/khexadecimalbytecodec.cpp b/khexedit/lib/codecs/khexadecimalbytecodec.cpp index 596fd24..46abdad 100644 --- a/khexedit/lib/codecs/khexadecimalbytecodec.cpp +++ b/khexedit/lib/codecs/khexadecimalbytecodec.cpp @@ -41,16 +41,16 @@ bool KHexadecimalByteCodec::smallDigits() const { return Digit != BigDigit; } void KHexadecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const { - Digits.at(Pos++) = Digit[Char>>4]; - Digits.at(Pos) = Digit[Char&0x0F]; + Digits.tqat(Pos++) = Digit[Char>>4]; + Digits.tqat(Pos) = Digit[Char&0x0F]; } void KHexadecimalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const { unsigned char C; if( (C = (Char>>4)) ) - Digits.at(Pos++) = Digit[C]; - Digits.at(Pos) = Digit[Char&0x0F]; + Digits.tqat(Pos++) = Digit[C]; + Digits.tqat(Pos) = Digit[Char&0x0F]; } diff --git a/khexedit/lib/codecs/koctalbytecodec.cpp b/khexedit/lib/codecs/koctalbytecodec.cpp index 44c7952..7aa156d 100644 --- a/khexedit/lib/codecs/koctalbytecodec.cpp +++ b/khexedit/lib/codecs/koctalbytecodec.cpp @@ -23,9 +23,9 @@ using namespace KHE; void KOctalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const { - Digits.at(Pos++) = '0'+(Char>>6); - Digits.at(Pos++) = '0'+((Char>>3)&0x07); - Digits.at(Pos) = '0'+((Char) &0x07); + Digits.tqat(Pos++) = '0'+(Char>>6); + Digits.tqat(Pos++) = '0'+((Char>>3)&0x07); + Digits.tqat(Pos) = '0'+((Char) &0x07); } @@ -33,10 +33,10 @@ void KOctalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned { unsigned char C; if( (C = (Char>>6)&0x07) ) - Digits.at(Pos++) = '0'+C; + Digits.tqat(Pos++) = '0'+C; if( (C = (Char>>3)&0x07) ) - Digits.at(Pos++) = '0'+C; - Digits.at(Pos) = '0'+((Char)&0x07); + Digits.tqat(Pos++) = '0'+C; + Digits.tqat(Pos) = '0'+((Char)&0x07); } diff --git a/khexedit/lib/codecs/ktextcharcodec.cpp b/khexedit/lib/codecs/ktextcharcodec.cpp index a9014dd..f5bcc65 100644 --- a/khexedit/lib/codecs/ktextcharcodec.cpp +++ b/khexedit/lib/codecs/ktextcharcodec.cpp @@ -27,7 +27,7 @@ using namespace KHE; -static const char QTextCodecWhiteSpace = 63; +static const char TQTextCodecWhiteSpace = 63; static struct KEncodingNames { KEncoding Encoding; @@ -106,7 +106,7 @@ static bool is8Bit( TQTextCodec *Codec ) Length = 1; CS = Codec->fromUnicode( S, Length ); //kdDebug() << Codec->name() << " "<<c[0]<<"->"<<CS[0]<<":"<<Length << endl; - if( Length != 1 || (CS[0] != (char)c[0] && CS[0] != QTextCodecWhiteSpace) ) + if( Length != 1 || (CS[0] != (char)c[0] && CS[0] != TQTextCodecWhiteSpace) ) { Result = false; break; @@ -127,7 +127,7 @@ const TQStringList &KTextCharCodec::codecNames() bool Found = true; TQTextCodec* Codec = KGlobal::charsets()->codecForName( *it, Found ); if( Found && is8Bit(Codec) ) - CodecNames.append( TQString::fromLatin1(Codec->name()) ); + CodecNames.append( TQString::tqfromLatin1(Codec->name()) ); } } @@ -150,7 +150,7 @@ TQString KTextCharCodec::nameOfEncoding( KEncoding C ) if( N != 0 ) { - TQString CodeName = TQString::fromLatin1( N ); + TQString CodeName = TQString::tqfromLatin1( N ); } return Codec; } @@ -186,10 +186,10 @@ const TQStringList &KTextCharCodec::codecNames() for( unsigned int i=0; i<NoOfEncodings; ++i ) { bool Found = true; - TQString Name = TQString::fromLatin1( EncodingNames[i].Name ); + TQString Name = TQString::tqfromLatin1( EncodingNames[i].Name ); TQTextCodec* Codec = KGlobal::charsets()->codecForName( Name, Found ); if( Found ) - CodecNames.append( TQString::fromLatin1(Codec->name()) ); + CodecNames.append( TQString::tqfromLatin1(Codec->name()) ); } } @@ -231,6 +231,6 @@ KHEChar KTextCharCodec::decode( char Byte ) const const TQString& KTextCharCodec::name() const { if( Name.isNull() ) - Name = TQString::fromLatin1( Codec->name() ); + Name = TQString::tqfromLatin1( Codec->name() ); return Name; } diff --git a/khexedit/lib/codecs/ktextcharcodec.h b/khexedit/lib/codecs/ktextcharcodec.h index 8d834ea..05a40ab 100644 --- a/khexedit/lib/codecs/ktextcharcodec.h +++ b/khexedit/lib/codecs/ktextcharcodec.h @@ -51,9 +51,9 @@ class KTextCharCodec : public KCharCodec protected: TQTextCodec *Codec; - /** decodes the chars to unicode */ + /** decodes the chars to tqunicode */ TQTextDecoder *Decoder; - /** encodes the chars from unicode */ + /** encodes the chars from tqunicode */ TQTextEncoder *Encoder; /** */ mutable TQString Name; diff --git a/khexedit/lib/controller/kchareditor.cpp b/khexedit/lib/controller/kchareditor.cpp index 7225ec7..9f58245 100644 --- a/khexedit/lib/controller/kchareditor.cpp +++ b/khexedit/lib/controller/kchareditor.cpp @@ -39,9 +39,9 @@ bool KCharEditor::handleKeyPress( TQKeyEvent *KeyEvent ) bool KeyUsed = false; // some input that should be inserted? if( KeyEvent->text().length() > 0 - && !(KeyEvent->state()&( Qt::ControlButton | Qt::AltButton | Qt::MetaButton )) ) + && !(KeyEvent->state()&( TQt::ControlButton | TQt::AltButton | TQt::MetaButton )) ) { - TQChar C = KeyEvent->text()[0]; + TQChar C = TQString(KeyEvent->text())[0]; if( C.isPrint() ) { TQByteArray D( 1 ); diff --git a/khexedit/lib/controller/keditor.cpp b/khexedit/lib/controller/keditor.cpp index 5678b09..02b9129 100644 --- a/khexedit/lib/controller/keditor.cpp +++ b/khexedit/lib/controller/keditor.cpp @@ -38,9 +38,9 @@ KEditor::KEditor( KBufferCursor *BC, KHexEdit* HE, KController *P ) bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent ) { bool clearUndoRedoInfo = true; - bool ShiftPressed = KeyEvent->state() & Qt::ShiftButton; - bool ControlPressed = KeyEvent->state() & Qt::ControlButton; - bool AltPressed = KeyEvent->state() & Qt::AltButton; + bool ShiftPressed = KeyEvent->state() & TQt::ShiftButton; + bool ControlPressed = KeyEvent->state() & TQt::ControlButton; + bool AltPressed = KeyEvent->state() & TQt::AltButton; bool KeyUsed = true; // we only care for cursor keys and the like, won't hardcode any other keys @@ -49,7 +49,7 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent ) // in each command anyway switch( KeyEvent->key() ) { - case Qt::Key_Delete: + case TQt::Key_Delete: if( ShiftPressed ) HexEdit->cut(); else if( HexEdit->BufferRanges->hasSelection() ) @@ -61,7 +61,7 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent ) } break; - case Qt::Key_Insert: + case TQt::Key_Insert: if( ShiftPressed ) HexEdit->paste(); else if( ControlPressed ) @@ -70,7 +70,7 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent ) HexEdit->setOverwriteMode( !HexEdit->OverWrite ); break; - case Qt::Key_Backspace: + case TQt::Key_Backspace: if( AltPressed ) { if( ControlPressed ) @@ -95,13 +95,13 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent ) doEditAction( ControlPressed ? WordBackspace : CharBackspace ); clearUndoRedoInfo = false; break; - case Qt::Key_F16: // "Copy" key on Sun keyboards + case TQt::Key_F16: // "Copy" key on Sun keyboards HexEdit->copy(); break; - case Qt::Key_F18: // "Paste" key on Sun keyboards + case TQt::Key_F18: // "Paste" key on Sun keyboards HexEdit->paste(); break; - case Qt::Key_F20: // "Cut" key on Sun keyboards + case TQt::Key_F20: // "Cut" key on Sun keyboards HexEdit->cut(); break; @@ -187,7 +187,7 @@ void KEditor::doEditAction( KEditAction Action ) } } - HexEdit->repaintChanged(); + HexEdit->tqrepaintChanged(); HexEdit->ensureCursorVisible(); HexEdit->unpauseCursor(); diff --git a/khexedit/lib/controller/knavigator.cpp b/khexedit/lib/controller/knavigator.cpp index d865d12..3258ce9 100644 --- a/khexedit/lib/controller/knavigator.cpp +++ b/khexedit/lib/controller/knavigator.cpp @@ -39,8 +39,8 @@ bool KNavigator::handleKeyPress( TQKeyEvent *KeyEvent ) bool KeyUsed = true; //bool clearUndoRedoInfo = true; - bool ShiftPressed = KeyEvent->state() & Qt::ShiftButton; - bool ControlPressed = KeyEvent->state() & Qt::ControlButton; + bool ShiftPressed = KeyEvent->state() & TQt::ShiftButton; + bool ControlPressed = KeyEvent->state() & TQt::ControlButton; //bool AltPressed = KeyEvent->state() & AltButton; // we only care for cursor keys and the like, won't hardcode any other keys @@ -49,28 +49,28 @@ bool KNavigator::handleKeyPress( TQKeyEvent *KeyEvent ) // in each command anyway switch( KeyEvent->key() ) { - case Qt::Key_Left: + case TQt::Key_Left: moveCursor( ControlPressed ? MoveWordBackward : MoveBackward, ShiftPressed ); break; - case Qt::Key_Right: + case TQt::Key_Right: moveCursor( ControlPressed ? MoveWordForward : MoveForward, ShiftPressed ); break; - case Qt::Key_Up: + case TQt::Key_Up: moveCursor( ControlPressed ? MovePgUp : MoveUp, ShiftPressed ); break; - case Qt::Key_Down: + case TQt::Key_Down: moveCursor( ControlPressed ? MovePgDown : MoveDown, ShiftPressed ); break; - case Qt::Key_Home: + case TQt::Key_Home: moveCursor( ControlPressed ? MoveHome : MoveLineStart, ShiftPressed ); break; - case Qt::Key_End: + case TQt::Key_End: moveCursor( ControlPressed ? MoveEnd : MoveLineEnd, ShiftPressed ); break; - case Qt::Key_Prior: + case TQt::Key_Prior: moveCursor( MovePgUp, ShiftPressed ); break; - case Qt::Key_Next: + case TQt::Key_Next: moveCursor( MovePgDown, ShiftPressed ); break; @@ -127,7 +127,7 @@ void KNavigator::moveCursor( KMoveAction Action, bool Select ) if( Select ) BufferRanges->setSelectionEnd( BufferCursor->realIndex() ); - HexEdit->repaintChanged(); + HexEdit->tqrepaintChanged(); HexEdit->ensureCursorVisible(); HexEdit->unpauseCursor(); diff --git a/khexedit/lib/controller/ktabcontroller.cpp b/khexedit/lib/controller/ktabcontroller.cpp index 0531b2c..401be04 100644 --- a/khexedit/lib/controller/ktabcontroller.cpp +++ b/khexedit/lib/controller/ktabcontroller.cpp @@ -37,9 +37,9 @@ bool KTabController::handleKeyPress( TQKeyEvent *KeyEvent ) { bool KeyUsed = false; - bool ShiftPressed = KeyEvent->state() & Qt::ShiftButton; + bool ShiftPressed = KeyEvent->state() & TQt::ShiftButton; - if( KeyEvent->key() == Qt::Key_Tab ) + if( KeyEvent->key() == TQt::Key_Tab ) { // are we in the char column? if( HexEdit->cursorColumn() == KHexEdit::CharColumnId ) diff --git a/khexedit/lib/controller/kvalueeditor.cpp b/khexedit/lib/controller/kvalueeditor.cpp index 3bf4c9b..4f32789 100644 --- a/khexedit/lib/controller/kvalueeditor.cpp +++ b/khexedit/lib/controller/kvalueeditor.cpp @@ -46,29 +46,29 @@ bool KValueEditor::handleKeyPress( TQKeyEvent *KeyEvent ) // switch( KeyEvent->key() ) { - case Qt::Key_Plus: + case TQt::Key_Plus: doValueEditAction( IncValue ); break; - case Qt::Key_Minus: + case TQt::Key_Minus: doValueEditAction( DecValue ); break; - case Qt::Key_Space: + case TQt::Key_Space: if( !InEditMode ) { KeyUsed = false; break; } - case Qt::Key_Enter: - case Qt::Key_Return: + case TQt::Key_Enter: + case TQt::Key_Return: doValueEditAction( InEditMode?LeaveValue:EnterValue ); break; - case Qt::Key_Escape: + case TQt::Key_Escape: if( InEditMode ) doValueEditAction( CancelValue ); else KeyUsed = false; break; - case Qt::Key_Backspace: + case TQt::Key_Backspace: if( InEditMode ) doValueEditAction( ValueBackspace ); else @@ -77,9 +77,9 @@ bool KValueEditor::handleKeyPress( TQKeyEvent *KeyEvent ) default: // is plain char? if( KeyEvent->text().length() > 0 - && ( !(KeyEvent->state()&( Qt::ControlButton | Qt::AltButton | Qt::MetaButton )) ) ) + && ( !(KeyEvent->state()&( TQt::ControlButton | TQt::AltButton | TQt::MetaButton )) ) ) { - TQChar C = KeyEvent->text()[0]; + TQChar C = TQString(KeyEvent->text())[0]; // no usable char? if( !C.isLetterOrNumber() ) { @@ -115,7 +115,7 @@ bool KValueEditor::handleKeyPress( TQKeyEvent *KeyEvent ) BufferCursor->gotoRealIndex(); KSection ChangedRange( Index,HexEdit->DataBuffer->size()-1 ); HexEdit->BufferRanges->addChangedRange( ChangedRange ); - HexEdit->repaintChanged(); + HexEdit->tqrepaintChanged(); HexEdit->ensureCursorVisible(); HexEdit->unpauseCursor(); HexEdit->updateCursor(); @@ -207,7 +207,7 @@ void KValueEditor::doValueEditAction( KValueEditAction Action, int Input ) EditValue = NewValue; ByteCodec->encode( ByteBuffer, 0, EditValue ); - HexEdit->DataBuffer->replace( Index, 1, (char*)&EditValue, 1 ); + HexEdit->DataBuffer->tqreplace( Index, 1, (char*)&EditValue, 1 ); } HexEdit->updateCursor(); diff --git a/khexedit/lib/helper.h b/khexedit/lib/helper.h index 5f2b009..5fa746f 100644 --- a/khexedit/lib/helper.h +++ b/khexedit/lib/helper.h @@ -25,7 +25,7 @@ // temporary solution until syntax highlighting is implemented static inline TQColor colorForChar( const KHE::KHEChar Byte ) { - return Byte.isUndefined() ? Qt::yellow : Byte.isPunct() ? Qt::red : Byte.isPrint() ? Qt::black : Qt::blue; + return Byte.isUndefined() ? TQt::yellow : Byte.isPunct() ? TQt::red : Byte.isPrint() ? TQt::black : TQt::blue; } #endif diff --git a/khexedit/lib/kbigbuffer.cpp b/khexedit/lib/kbigbuffer.cpp index 99925da..08be888 100644 --- a/khexedit/lib/kbigbuffer.cpp +++ b/khexedit/lib/kbigbuffer.cpp @@ -83,7 +83,7 @@ int KBigBuffer::remove( KSection /*Section*/ ) return 0; } -unsigned int KBigBuffer::replace( KSection /*Section*/, const char*, unsigned int /*Length*/ ) +unsigned int KBigBuffer::tqreplace( KSection /*Section*/, const char*, unsigned int /*Length*/ ) { return 0; } @@ -95,8 +95,8 @@ int KBigBuffer::fill( char /*FillChar*/, int /*Length*/, unsigned int /*Pos*/ ) int KBigBuffer::move( int /*DestPos*/, KSection /*SourceSection*/ ) { return 0; } -//int KBigBuffer::find( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } -int KBigBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } +//int KBigBuffer::tqfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } +int KBigBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } int KBigBuffer::rfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } diff --git a/khexedit/lib/kbigbuffer.h b/khexedit/lib/kbigbuffer.h index 63e6ec4..b4461ab 100644 --- a/khexedit/lib/kbigbuffer.h +++ b/khexedit/lib/kbigbuffer.h @@ -52,18 +52,18 @@ class KHEXEDIT_EXPORT KBigBuffer : public KDataBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection S ); - virtual unsigned int replace( KSection S, const char*, unsigned int InputLength ); + virtual unsigned int tqreplace( KSection S, const char*, unsigned int InputLength ); virtual int move( int DestPos, KSection SourceSection ); virtual int fill( char FillChar, int Length = -1, unsigned int Pos = 0 ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M = true ); - //virtual int find( const char*, int Length, int Pos = 0 ) const; - virtual int find( const char*KeyData, int Length, KSection Section ) const; + //virtual int tqfind( const char*, int Length, int Pos = 0 ) const; + virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; -/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ public: void setReadOnly( bool RO = true ); diff --git a/khexedit/lib/kbordercolumn.cpp b/khexedit/lib/kbordercolumn.cpp index d23bfea..170f972 100644 --- a/khexedit/lib/kbordercolumn.cpp +++ b/khexedit/lib/kbordercolumn.cpp @@ -49,8 +49,8 @@ void KBorderColumn::paintLine( TQPainter *P ) if( Middle ) { - int GridColor = View->style().styleHint( TQStyle::SH_Table_GridLineColor, View ); - P->setPen( GridColor != -1 ? (QRgb)GridColor : View->colorGroup().mid() ); + int GridColor = View->tqstyle().tqstyleHint( TQStyle::SH_Table_GridLineColor, View ); + P->setPen( GridColor != -1 ? (TQRgb)GridColor : View->tqcolorGroup().mid() ); P->drawLine( LineX, 0, LineX, LineHeight-1 ) ; } } @@ -75,8 +75,8 @@ void KBorderColumn::paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys ) KPixelX LX = x() + LineX; if( Middle && Xs.includes(LX) ) { - int GridColor = View->style().styleHint( TQStyle::SH_Table_GridLineColor, View ); - P->setPen( GridColor != -1 ? (QRgb)GridColor : View->colorGroup().mid() ); + int GridColor = View->tqstyle().tqstyleHint( TQStyle::SH_Table_GridLineColor, View ); + P->setPen( GridColor != -1 ? (TQRgb)GridColor : View->tqcolorGroup().mid() ); P->drawLine( LX, Ys.start(), LX, Ys.end() ) ; } } diff --git a/khexedit/lib/kbuffercoltextexport.cpp b/khexedit/lib/kbuffercoltextexport.cpp index 142504c..9ee6f77 100644 --- a/khexedit/lib/kbuffercoltextexport.cpp +++ b/khexedit/lib/kbuffercoltextexport.cpp @@ -38,7 +38,7 @@ KBufferColTextExport::KBufferColTextExport( const KBufferColumn* BufferColumn, c : Data( D ), CoordRange( CR ) { - NoOfBytesPerLine = BufferColumn->layout()->noOfBytesPerLine(); + NoOfBytesPerLine = BufferColumn->tqlayout()->noOfBytesPerLine(); Pos = new int[NoOfBytesPerLine]; // TODO: remove this hack and make it more general diff --git a/khexedit/lib/kbuffercolumn.cpp b/khexedit/lib/kbuffercolumn.cpp index d4f58d9..1d26bf0 100644 --- a/khexedit/lib/kbuffercolumn.cpp +++ b/khexedit/lib/kbuffercolumn.cpp @@ -185,7 +185,7 @@ void KBufferColumn::recalcByteWidth() void KBufferColumn::recalcVerticalGridX() { - VerticalGridX = ByteWidth-1 + GroupSpacingWidth/2; + VerticalGridX = ByteWidth-1 + GroupSpacingWidth/2; } @@ -395,7 +395,7 @@ void KBufferColumn::paintLine( TQPainter *P, int Line ) // TODO: could be remove void KBufferColumn::paintPositions( TQPainter *P, int Line, KSection Pos ) { - const TQColorGroup &CG = View->colorGroup(); + const TQColorGroup &CG = View->tqcolorGroup(); // clear background unsigned int BlankFlag = (Pos.start()!=0?StartsBefore:0) | (Pos.end()!=LastPos?EndsLater:0); @@ -427,13 +427,13 @@ void KBufferColumn::paintPositions( TQPainter *P, int Line, KSection Pos ) // falls Marking nicht mehr gebuffert und noch zu erwarten if( HasMarking && Marking.endsBefore(IndizesPart.start()) ) { - // erhebe n�chste Markierung im Bereich + // erhebe n�chste Markierung im Bereich HasMarking = isMarked( IndizesPart, &Marking, &MarkingFlag ); } // falls Selection nicht mehr gebuffert und noch zu erwarten if( HasSelection && Selection.endsBefore(IndizesPart.start()) ) { - // erhebe n�chste Selection im Bereich + // erhebe n�chste Selection im Bereich HasSelection = isSelected( IndizesPart, &Selection, &SelectionFlag ); } @@ -501,7 +501,7 @@ void KBufferColumn::paintPlain( TQPainter *P, KSection Positions, int Index ) void KBufferColumn::paintSelection( TQPainter *P, KSection Positions, int Index, int Flag ) { - const TQColorGroup &CG = View->colorGroup(); + const TQColorGroup &CG = View->tqcolorGroup(); paintRange( P, CG.highlight(), Positions, Flag ); @@ -524,7 +524,7 @@ void KBufferColumn::paintSelection( TQPainter *P, KSection Positions, int Index, void KBufferColumn::paintMarking( TQPainter *P, KSection Positions, int Index, int Flag ) { - const TQColorGroup &CG = View->colorGroup(); + const TQColorGroup &CG = View->tqcolorGroup(); paintRange( P, CG.text(), Positions, Flag ); @@ -549,7 +549,7 @@ void KBufferColumn::paintMarking( TQPainter *P, KSection Positions, int Index, i void KBufferColumn::paintGrid( TQPainter *P, KSection Range ) { int st = 0; // counter for spacing triggering - P->setPen( Qt::black ); + P->setPen( TQt::black ); // paint all the bytes affected for( int p=Range.start(); p<=Range.end(); ++p,++st ) { @@ -560,7 +560,7 @@ void KBufferColumn::paintGrid( TQPainter *P, KSection Range ) // spacing behind byte and vertical grid enabled? if( st == SpacingTrigger && p != LastPos ) - P->drawLine( VerticalGridX, 0, VerticalGridX, LineHeight-1 ) ; + P->drawLine(VerticalGridX, 0,VerticalGridX, LineHeight-1 ) ; P->translate( -x, 0 ); } @@ -572,7 +572,7 @@ void KBufferColumn::paintRange( TQPainter *P, const TQColor &Color, KSection Pos KPixelX RangeX = Flag & StartsBefore ? relRightXOfPos( Positions.start()-1 ) + 1 : relXOfPos( Positions.start() ); KPixelX RangeW = (Flag & EndsLater ? relXOfPos( Positions.end()+1 ): relRightXOfPos( Positions.end() ) + 1) - RangeX; - P->fillRect( RangeX,0,RangeW,LineHeight, TQBrush(Color,Qt::SolidPattern) ); + P->fillRect( RangeX,0,RangeW,LineHeight, TQBrush(Color,TQt::SolidPattern) ); } @@ -581,9 +581,9 @@ void KBufferColumn::paintByte( TQPainter *P, int Index ) char Byte = ( Index > -1 ) ? Buffer->datum( Index ) : EmptyByte; KHEChar B = Codec->decode( Byte ); - const TQColorGroup &CG = View->colorGroup(); + const TQColorGroup &CG = View->tqcolorGroup(); TQColor Color = CG.text(); - TQBrush Brush( CG.base(), Qt::SolidPattern ); + TQBrush Brush( CG.base(), TQt::SolidPattern ); if( Index > -1 ) { @@ -631,14 +631,14 @@ void KBufferColumn::paintCursor( TQPainter *P, int Index ) { char Byte = ( Index > -1 ) ? Buffer->datum( Index ) : EmptyByte; KHEChar B = Codec->decode( Byte ); - P->fillRect( 0, 0, ByteWidth, LineHeight, TQBrush(colorForChar(B),Qt::SolidPattern) ); + P->fillRect( 0, 0, ByteWidth, LineHeight, TQBrush(colorForChar(B),TQt::SolidPattern) ); } void KBufferColumn::drawByte( TQPainter *P, char /*Byte*/, KHEChar B, const TQColor &Color ) const { P->setPen( Color ); - P->drawText( 0, DigitBaseLine, B ); + P->drawText( 0, DigitBaseLine, TQString(B) ); } diff --git a/khexedit/lib/kbuffercolumn.h b/khexedit/lib/kbuffercolumn.h index 10e930d..47f21d1 100644 --- a/khexedit/lib/kbuffercolumn.h +++ b/khexedit/lib/kbuffercolumn.h @@ -39,7 +39,7 @@ class KCharCodec; const int NoByteFound = -1; /** base class of all buffer column displayers - * holds all information about the vertical layout of a buffer column + * holds all information about the vertical tqlayout of a buffer column * knows how to paint the data and the editing things (focus, cursor, selection) * but does not offer * @@ -154,7 +154,7 @@ class KBufferColumn : public KColumn int firstPos() const; int lastPos() const; KSection visiblePositions() const; - const KBufferLayout *layout() const; + const KBufferLayout *tqlayout() const; KCharCodec* codec() const; protected: @@ -184,7 +184,7 @@ class KBufferColumn : public KColumn protected: /** pointer to the buffer */ KDataBuffer *Buffer; - /** pointer to the layout */ + /** pointer to the tqlayout */ const KBufferLayout *Layout; /** pointer to the ranges */ KBufferRanges *Ranges; @@ -242,7 +242,7 @@ inline int KBufferColumn::firstPos() const { return PaintPositions.start(); } inline int KBufferColumn::lastPos() const { return PaintPositions.end(); } inline KSection KBufferColumn::visiblePositions() const { return PaintPositions; } -inline const KBufferLayout *KBufferColumn::layout() const { return Layout; } +inline const KBufferLayout *KBufferColumn::tqlayout() const { return Layout; } inline void KBufferColumn::setCodec( KCharCodec *C ) { Codec = C; } diff --git a/khexedit/lib/kbuffercursor.h b/khexedit/lib/kbuffercursor.h index 855b3e8..93205cc 100644 --- a/khexedit/lib/kbuffercursor.h +++ b/khexedit/lib/kbuffercursor.h @@ -27,10 +27,10 @@ namespace KHE class KBufferLayout; -/**@short navigates through the buffer in an abstract way, based on the layout +/**@short navigates through the buffer in an abstract way, based on the tqlayout * * The cursor is allowed to access every coord that has content as - * described in the layout. It holds the coord of the actual position + * described in the tqlayout. It holds the coord of the actual position * and the according index in the data array. * * To enable the cursor to be placed behind the last position in a line @@ -138,7 +138,7 @@ class KBufferCursor void stepToEnd(); private: - /** layout, tells how the column is organized */ + /** tqlayout, tells how the column is organized */ const KBufferLayout *Layout; /** Position in buffer */ @@ -151,7 +151,7 @@ class KBufferCursor */ bool Behind : 1; - /** tells whether there could be a position behind the end of the layout */ + /** tells whether there could be a position behind the end of the tqlayout */ bool AppendPosEnabled : 1; }; diff --git a/khexedit/lib/kbufferdrag.cpp b/khexedit/lib/kbufferdrag.cpp index 3fb3cff..8fa1973 100644 --- a/khexedit/lib/kbufferdrag.cpp +++ b/khexedit/lib/kbufferdrag.cpp @@ -50,7 +50,7 @@ static const char *localTextPlain() TextPlainLocal = TQCString(KGlobal::locale()->encoding()).lower(); // remove the whitespaces int s; - while( (s=TextPlainLocal.find(' ')) >= 0 ) + while( (s=TextPlainLocal.tqfind(' ')) >= 0 ) TextPlainLocal.remove( s, 1 ); TextPlainLocal.prepend( TextPlainLocalStub ); @@ -62,12 +62,12 @@ static const char *localTextPlain() // tries to create a codec by the given charset description static TQTextCodec* codecForCharset( const TQCString& Desc ) { - int i = Desc.find( "charset=" ); + int i = Desc.tqfind( "charset=" ); if( i >= 0 ) { TQCString CharSetName = Desc.mid( i+8 ); // remove any further attributes - if( (i=CharSetName.find( ';' )) >= 0 ) + if( (i=CharSetName.tqfind( ';' )) >= 0 ) CharSetName = CharSetName.left( i ); // try to find codec @@ -135,7 +135,7 @@ const char *KBufferDrag::format( int i ) const } -TQByteArray KBufferDrag::encodedData( const char *Format ) const +TQByteArray KBufferDrag::tqencodedData( const char *Format ) const { if( Format != 0 ) { @@ -144,7 +144,7 @@ TQByteArray KBufferDrag::encodedData( const char *Format ) const return( Data ); // plain text wanted? - if( qstrncmp(Format,TextPlain,10) == 0 ) + if( tqstrncmp(Format,TextPlain,10) == 0 ) { TQCString Output; TQTextCodec *TextCodec = codecForCharset( TQCString(Format).lower() ); @@ -166,7 +166,7 @@ TQByteArray KBufferDrag::encodedData( const char *Format ) const { KHEChar B = CharCodec->decode( Data[i] ); - Text.at(i) = B.isUndefined() ? KHEChar(UndefinedChar) : + Text.tqat(i) = B.isUndefined() ? KHEChar(UndefinedChar) : (!B.isPrint() && B != Tab && B != Return ) ? KHEChar(SubstituteChar) : B; } // clean up @@ -224,12 +224,12 @@ bool KBufferDrag::canDecode( const TQMimeSource* Source ) bool KBufferDrag::decode( const TQMimeSource* Source, TQByteArray &Dest ) { -// Dest = Source->encodedData( MediaString ); +// Dest = Source->tqencodedData( MediaString ); // return Dest.size() != 0; bool CanDecode = Source->provides( OctetStream ); if( CanDecode ) - Dest = Source->encodedData( OctetStream ); + Dest = Source->tqencodedData( OctetStream ); return CanDecode; } diff --git a/khexedit/lib/kbufferdrag.h b/khexedit/lib/kbufferdrag.h index d04bca6..effd9a2 100644 --- a/khexedit/lib/kbufferdrag.h +++ b/khexedit/lib/kbufferdrag.h @@ -37,9 +37,10 @@ typedef KColTextExport* KColTextExportPtr; /** *@author Friedrich W. H. Kossebau */ -class KBufferDrag : public QDragObject +class KBufferDrag : public TQDragObject { Q_OBJECT + TQ_OBJECT public: // TODO: make this call somewhat more generic @@ -51,7 +52,7 @@ class KBufferDrag : public QDragObject public: // TQDragObject API virtual const char *format( int i ) const; - virtual TQByteArray encodedData( const char* ) const; + virtual TQByteArray tqencodedData( const char* ) const; public: virtual void setData( const TQByteArray &); diff --git a/khexedit/lib/kbufferlayout.h b/khexedit/lib/kbufferlayout.h index c243225..bd92005 100644 --- a/khexedit/lib/kbufferlayout.h +++ b/khexedit/lib/kbufferlayout.h @@ -24,7 +24,7 @@ namespace KHE { -/**@short the logical layout of a plain buffer view +/**@short the logical tqlayout of a plain buffer view * * Given the values for * * length of the buffer, @@ -38,7 +38,7 @@ namespace KHE { * * final position in this line, and * * the total number of lines (is final line +1 or 0) * - * This layout sees the buffer as a continous stream of byte, + * This tqlayout sees the buffer as a continous stream of byte, * thus uses each line after the start from the begin to the end. * * If the buffer is empty the end coord will be set one pos left to the start coord @@ -75,7 +75,7 @@ class KBufferLayout /** returns the coord of the end */ KBufferCoord final() const; - /** tells how much lines this layout needs (incl. blank leading lines due to StartOffset) */ + /** tells how much lines this tqlayout needs (incl. blank leading lines due to StartOffset) */ int noOfLines() const; diff --git a/khexedit/lib/kbufferranges.h b/khexedit/lib/kbufferranges.h index ed2cbce..6b293b2 100644 --- a/khexedit/lib/kbufferranges.h +++ b/khexedit/lib/kbufferranges.h @@ -28,7 +28,7 @@ namespace KHE { /** a class to control all the ranges like marking and selections - * holds also all modified ranges and merges them so a repaint can take its info from here + * holds also all modified ranges and merges them so a tqrepaint can take its info from here * * @author Friedrich W. H. Kossebau */ diff --git a/khexedit/lib/kbytesedit.cpp b/khexedit/lib/kbytesedit.cpp index 3eb49bd..db4b193 100644 --- a/khexedit/lib/kbytesedit.cpp +++ b/khexedit/lib/kbytesedit.cpp @@ -129,7 +129,7 @@ void KBytesEdit::setKeepsMemory( bool KM ) bool KBytesEdit::isAutoDelete() const { return AutoDelete; } -void KBytesEdit::repaintRange( int i1, int i2 ) +void KBytesEdit::tqrepaintRange( int i1, int i2 ) { bool ChangeCursor = !(CursorPaused) && KSection(i1,i2).includes( BufferCursor->index() ); if( ChangeCursor ) @@ -137,7 +137,7 @@ void KBytesEdit::repaintRange( int i1, int i2 ) BufferRanges->addChangedRange( i1, i2 ); - repaintChanged(); + tqrepaintChanged(); if( ChangeCursor ) unpauseCursor(); diff --git a/khexedit/lib/kbytesedit.h b/khexedit/lib/kbytesedit.h index e57d73a..884f565 100644 --- a/khexedit/lib/kbytesedit.h +++ b/khexedit/lib/kbytesedit.h @@ -36,10 +36,10 @@ class KBytesEditPrivate; * * 1. used as viewer * a) static data ranges -> no changes for data pointer and length - * possible changes are told to the widget by repaintRange + * possible changes are told to the widget by tqrepaintRange * b) changing data ranges -> data pointer and length might change * changes told by - * * resetData( char *, int size, bool repaint ); + * * resetData( char *, int size, bool tqrepaint ); * * * 2. used as editor * a) static data ranges @@ -57,10 +57,11 @@ class KBytesEditPrivate; class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit { Q_OBJECT + TQ_OBJECT //_PROPERTY( char * Data READ data ) - Q_PROPERTY( int DataSize READ dataSize ) - Q_PROPERTY( int MaxDataSize READ maxDataSize WRITE setMaxDataSize ) - Q_PROPERTY( bool AutoDelete READ isAutoDelete WRITE setAutoDelete DESIGNABLE false ) + TQ_PROPERTY( int DataSize READ dataSize ) + TQ_PROPERTY( int MaxDataSize READ maxDataSize WRITE setMaxDataSize ) + TQ_PROPERTY( bool AutoDelete READ isAutoDelete WRITE setAutoDelete DESIGNABLE false ) public: @@ -69,7 +70,7 @@ class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit * @param S size of used memory * @param RS_ real size of the memory * @param KM keep the memory on resize (RS_ is then the maximum size) - * @param Parent parent widget + * @param Parent tqparent widget * @param Name name for this widget * @param F flags */ @@ -136,8 +137,8 @@ class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit */ void setKeepsMemory( bool KM = true ); - /** repaint the indizes from i1 to i2 */ - void repaintRange( int i1, int i2 ); + /** tqrepaint the indizes from i1 to i2 */ + void tqrepaintRange( int i1, int i2 ); protected: /** deletes the databuffer */ diff --git a/khexedit/lib/kcolumnsview.cpp b/khexedit/lib/kcolumnsview.cpp index c855b51..90fa10c 100644 --- a/khexedit/lib/kcolumnsview.cpp +++ b/khexedit/lib/kcolumnsview.cpp @@ -129,10 +129,10 @@ void KColumnsView::updateView() } -void KColumnsView::repaintView() +void KColumnsView::tqrepaintView() { resizeContents( totalWidth(), totalHeight() ); - repaintContents( false ); + tqrepaintContents( false ); } @@ -167,7 +167,7 @@ void KColumnsView::drawContents( TQPainter *P, int cx, int cy, int cw, int ch ) if( AffectedLines.isValid() ) { TQPainter Paint; - Paint.begin( &LineBuffer, this ); + Paint.tqbegin( const_cast<TQPixmap*>(&LineBuffer), this ); // starting painting with the first line KColumn *C = RedrawColumns.first(); @@ -198,7 +198,7 @@ void KColumnsView::drawContents( TQPainter *P, int cx, int cy, int cw, int ch ) break; // to avoid flickers we first paint to the linebuffer - Paint.begin( &LineBuffer, this ); + Paint.tqbegin( TQT_TQPAINTDEVICE(&LineBuffer), this ); KColumn *C = RedrawColumns.first(); Paint.translate( C->x(), 0 ); diff --git a/khexedit/lib/kcolumnsview.h b/khexedit/lib/kcolumnsview.h index 372a6f5..f3e00da 100644 --- a/khexedit/lib/kcolumnsview.h +++ b/khexedit/lib/kcolumnsview.h @@ -39,14 +39,15 @@ class KColumnsViewPrivate; *@author Friedrich W. H. Kossebau */ -class KColumnsView : public QScrollView +class KColumnsView : public TQScrollView { Q_OBJECT + TQ_OBJECT friend class KColumn; public: - KColumnsView( /*bool R = false,*/ TQWidget *parent=0, const char *name=0, WFlags Flags=0 ); + KColumnsView( /*bool R = false,*/ TQWidget *tqparent=0, const char *name=0, WFlags Flags=0 ); virtual ~KColumnsView(); public: // drawing @@ -112,7 +113,7 @@ class KColumnsView : public QScrollView protected: // painting void updateView(); - void repaintView(); + void tqrepaintView(); private: /** hiding it*/ diff --git a/khexedit/lib/kcursor.h b/khexedit/lib/kcursor.h index 17b4371..bb66003 100644 --- a/khexedit/lib/kcursor.h +++ b/khexedit/lib/kcursor.h @@ -38,7 +38,7 @@ class KCursor public: /** sets size of the full cursor */ void setSize( KPixelX Width, KPixelY Height ); - /** sets the shape of the cursor to be drawn */ + /** sets the tqshape of the cursor to be drawn */ void setShape( KPixelX X, KPixelX W ); public: // access diff --git a/khexedit/lib/kdatabuffer.cpp b/khexedit/lib/kdatabuffer.cpp index 054d792..4c4f365 100644 --- a/khexedit/lib/kdatabuffer.cpp +++ b/khexedit/lib/kdatabuffer.cpp @@ -25,13 +25,13 @@ using namespace KHE; int KDataBuffer::insert( int Pos, const char* D, int Length ) { - return replace( Pos,0,D,Length ); + return tqreplace( Pos,0,D,Length ); } int KDataBuffer::remove( KSection Remove ) { - replace( Remove, 0, 0 ); + tqreplace( Remove, 0, 0 ); return Remove.width(); // TODO: check if this is true } diff --git a/khexedit/lib/kdatabuffer.h b/khexedit/lib/kdatabuffer.h index e7cc3bc..796ccd6 100644 --- a/khexedit/lib/kdatabuffer.h +++ b/khexedit/lib/kdatabuffer.h @@ -146,9 +146,9 @@ class KHEXEDIT_EXPORT KDataBuffer * @param SourceLength * @return length of replacced data */ - virtual unsigned int replace( KSection DestSection, const char* Source, unsigned int SourceLength ) = 0; + virtual unsigned int tqreplace( KSection DestSection, const char* Source, unsigned int SourceLength ) = 0; /** convenience function, behaves as above */ - unsigned int replace( unsigned int Pos, unsigned int RemoveLength, + unsigned int tqreplace( unsigned int Pos, unsigned int RemoveLength, const char* Source, unsigned int SourceLength ); /** moves a part of the data to a new position, while floating the other data around @@ -201,7 +201,7 @@ class KHEXEDIT_EXPORT KDataBuffer * @param Pos the position to start the search * @return index of the first or -1 */ - //virtual int find( const char*, int Length, int Pos = 0 ) const = 0; + //virtual int tqfind( const char*, int Length, int Pos = 0 ) const = 0; /** searches for a given data string * The section limits the data within which the key has to be found * If the end of the section is lower then the start the search continues at the start??? @@ -210,7 +210,7 @@ class KHEXEDIT_EXPORT KDataBuffer * @param Section section within the keydata is to be found * @return index of the first occurence or -1 */ - virtual int find( const char*KeyData, int Length, KSection Section ) const = 0; + virtual int tqfind( const char*KeyData, int Length, KSection Section ) const = 0; /** searches backward beginning with byte at Pos. * @param * @param Length length of search string @@ -219,7 +219,7 @@ class KHEXEDIT_EXPORT KDataBuffer */ virtual int rfind( const char*, int Length, int Pos = -1 ) const = 0; -/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ }; @@ -235,9 +235,9 @@ inline const char *KDataBuffer::dataSet( int Offset, int Length ) const inline int KDataBuffer::remove( int Pos, int Length ) { return remove( KSection(Pos,Pos+Length-1) ); } -inline unsigned int KDataBuffer::replace( unsigned int Pos, unsigned int RemoveLength, +inline unsigned int KDataBuffer::tqreplace( unsigned int Pos, unsigned int RemoveLength, const char* D, unsigned int InputLength ) -{ return replace( KSection(Pos,Pos+RemoveLength-1), D, InputLength ); } +{ return tqreplace( KSection(Pos,Pos+RemoveLength-1), D, InputLength ); } inline bool KDataBuffer::isReadOnly() const { return false; } diff --git a/khexedit/lib/kfixedsizebuffer.cpp b/khexedit/lib/kfixedsizebuffer.cpp index 784858c..0c13e94 100644 --- a/khexedit/lib/kfixedsizebuffer.cpp +++ b/khexedit/lib/kfixedsizebuffer.cpp @@ -89,7 +89,7 @@ int KFixedSizeBuffer::remove( KSection Remove ) } -unsigned int KFixedSizeBuffer::replace( KSection Remove, const char* D, unsigned int InputLength ) +unsigned int KFixedSizeBuffer::tqreplace( KSection Remove, const char* D, unsigned int InputLength ) { // check all parameters if( Remove.startsBehind( Size-1 ) || (Remove.width()==0 && InputLength==0) ) @@ -214,7 +214,7 @@ int KFixedSizeBuffer::fill( const char FChar, int FillLength, unsigned int Pos ) int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, unsigned int Pos ) { - //kdDebug() << TQString("Pos: %1, OtherRange: (%3/%4)" ).arg(Pos).arg(OtherRange.start()).arg(OtherRange.end()) + //kdDebug() << TQString("Pos: %1, OtherRange: (%3/%4)" ).tqarg(Pos).tqarg(OtherRange.start()).tqarg(OtherRange.end()) // << endl; // test other values if( OtherRange.startsBehind(Other.size()-1) ) @@ -245,14 +245,14 @@ int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, un ValueByLength = -1; } //kdDebug() - // << TQString( "Range: (%1/%2), OtherRange: (%3/%4)" ).arg(Range.start()).arg(Range.end()).arg(OtherRange.start()).arg(OtherRange.end()) + // << TQString( "Range: (%1/%2), OtherRange: (%3/%4)" ).tqarg(Range.start()).tqarg(Range.end()).tqarg(OtherRange.start()).tqarg(OtherRange.end()) // << endl; int oi = OtherRange.start(); for( int i=Range.start(); i<=Range.end(); ++i,++oi ) { char OD = Other.datum(oi); char D = Data[i]; - //kdDebug() << TQString("%1==%2").arg((int)D).arg((int)OD) << endl; + //kdDebug() << TQString("%1==%2").tqarg((int)D).tqarg((int)OD) << endl; if( OD == D ) continue; return OD < D ? 1 : -1; @@ -262,7 +262,7 @@ int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, un } -int KFixedSizeBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } +int KFixedSizeBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } int KFixedSizeBuffer::rfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } diff --git a/khexedit/lib/kfixedsizebuffer.h b/khexedit/lib/kfixedsizebuffer.h index 90060f0..e5997c3 100644 --- a/khexedit/lib/kfixedsizebuffer.h +++ b/khexedit/lib/kfixedsizebuffer.h @@ -48,17 +48,17 @@ class KFixedSizeBuffer : public KDataBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection Remove ); - virtual unsigned int replace( KSection Remove, const char*, unsigned int InputLength ); + virtual unsigned int tqreplace( KSection Remove, const char*, unsigned int InputLength ); virtual int move( int DestPos, KSection SourceSection ); virtual int fill( const char FillChar, int Length = -1, unsigned int Pos = 0 ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M = true ); - virtual int find( const char*KeyData, int Length, KSection Section ) const; + virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; -/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ public: void setReadOnly( bool RO = true ); diff --git a/khexedit/lib/khechar.h b/khexedit/lib/khechar.h index 04b4016..6f4cd7f 100644 --- a/khexedit/lib/khechar.h +++ b/khexedit/lib/khechar.h @@ -23,7 +23,7 @@ namespace KHE { -class KHEChar : public QChar +class KHEChar : public TQChar { public: KHEChar( TQChar C ); diff --git a/khexedit/lib/khexedit.cpp b/khexedit/lib/khexedit.cpp index a7a27c5..49030bf 100644 --- a/khexedit/lib/khexedit.cpp +++ b/khexedit/lib/khexedit.cpp @@ -29,7 +29,7 @@ #include <tqcursor.h> #include <tqapplication.h> // kde specific -#ifndef QT_ONLY +#ifndef TQT_ONLY #include <kglobalsettings.h> #endif // lib specific @@ -78,7 +78,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl TrippleClickTimer( new TQTimer(this) ), CursorPixmaps( new KCursor() ), Codec( 0 ), - ClipboardMode( QClipboard::Clipboard ), + ClipboardMode( TQClipboard::Clipboard ), ResizeStyle( DefaultResizeStyle ), Encoding( MaxEncodingId ), // forces update ReadOnly( false ), @@ -94,7 +94,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl InZooming( false ), d( 0 ) { - // initalize layout + // initalize tqlayout if( DataBuffer ) BufferLayout->setLength( DataBuffer->size() ); BufferLayout->setNoOfLinesPerPage( noOfLinesPerPage() ); @@ -123,7 +123,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl Controller = Navigator; -#ifdef QT_ONLY +#ifdef TQT_ONLY TQFont FixedFont( "fixed", 10 ); FixedFont.setFixedPitch( true ); setFont( FixedFont ); @@ -133,7 +133,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl // get the full control viewport()->setFocusProxy( this ); - viewport()->setFocusPolicy( WheelFocus ); + viewport()->setFocusPolicy( TQ_WheelFocus ); viewport()->installEventFilter( this ); installEventFilter( this ); @@ -199,7 +199,7 @@ void KHexEdit::setOverwriteMode( bool OM ) OverWrite = OM; // affected: - // cursor shape + // cursor tqshape bool ChangeCursor = !( CursorPaused || ValueEditor->isInEditMode() ); if( ChangeCursor ) pauseCursor(); @@ -478,7 +478,7 @@ void KHexEdit::zoomOut( int PointDec ) { InZooming = true; TQFont F( font() ); - F.setPointSize( QMAX( 1, TQFontInfo(F).pointSize() - PointDec ) ); + F.setPointSize( TQMAX( 1, TQFontInfo(F).pointSize() - PointDec ) ); setFont( F ); InZooming = false; } @@ -548,17 +548,17 @@ void KHexEdit::toggleOffsetColumn( bool Visible ) } -TQSize KHexEdit::sizeHint() const +TQSize KHexEdit::tqsizeHint() const { return TQSize( totalWidth(), totalHeight() ); } -TQSize KHexEdit::minimumSizeHint() const +TQSize KHexEdit::tqminimumSizeHint() const { // TODO: better minimal width (visibility!) return TQSize( OffsetColumn->visibleWidth()+FirstBorderColumn->visibleWidth()+SecondBorderColumn->visibleWidth()+valueColumn().byteWidth()+charColumn().byteWidth(), - lineHeight() + noOfLines()>1? style().pixelMetric(TQStyle::PM_ScrollBarExtent):0 ); + lineHeight() + noOfLines()>1? tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent):0 ); } @@ -598,7 +598,7 @@ int KHexEdit::fittingBytesPerLine( const TQSize &NewSize ) const // check influence of dis-/appearing of the vertical scrollbar bool VerticalScrollbarIsVisible = verticalScrollBar()->isVisible(); - KPixelX ScrollbarExtent = style().pixelMetric( TQStyle::PM_ScrollBarExtent );//verticalScrollBar()->width(); + KPixelX ScrollbarExtent = tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent );//verticalScrollBar()->width(); KPixelX AvailableWidth = FullWidth; if( VerticalScrollbarIsVisible ) @@ -737,7 +737,7 @@ bool KHexEdit::selectWord( /*unsigned TODO:change all unneeded signed into unsig BufferRanges->setFirstWordSelection( WordSection ); BufferCursor->gotoIndex( WordSection.end()+1 ); - repaintChanged(); + tqrepaintChanged(); unpauseCursor(); return true; @@ -757,7 +757,7 @@ void KHexEdit::select( KSection Section ) BufferRanges->setSelection( Section ); BufferCursor->gotoIndex( Section.end()+1 ); - repaintChanged(); + tqrepaintChanged(); unpauseCursor(); @@ -781,7 +781,7 @@ void KHexEdit::selectAll( bool Select ) BufferCursor->gotoEnd(); } - repaintChanged(); + tqrepaintChanged(); unpauseCursor(); @@ -850,7 +850,7 @@ void KHexEdit::cut() if( !Drag ) return; - TQApplication::clipboard()->setData( Drag, ClipboardMode ); + TQApplication::tqclipboard()->setData( Drag, ClipboardMode ); removeSelectedData(); } @@ -862,7 +862,7 @@ void KHexEdit::copy() if( !Drag ) return; - TQApplication::clipboard()->setData( Drag, ClipboardMode ); + TQApplication::tqclipboard()->setData( Drag, ClipboardMode ); } @@ -871,7 +871,7 @@ void KHexEdit::paste() if( isReadOnly() ) return; - TQMimeSource *Source = TQApplication::clipboard()->data( ClipboardMode ); + TQMimeSource *Source = TQApplication::tqclipboard()->data( ClipboardMode ); pasteFromSource( Source ); } @@ -904,7 +904,7 @@ void KHexEdit::insert( const TQByteArray &D ) // we restrict the replacement to the minimum length of selection and input ChangedRange = BufferRanges->selection(); ChangedRange.restrictEndTo( ChangedRange.start()+D.size()-1 ); - int W = DataBuffer->replace( ChangedRange, D.data(), ChangedRange.width() ); + int W = DataBuffer->tqreplace( ChangedRange, D.data(), ChangedRange.width() ); BufferCursor->gotoCIndex( ChangedRange.start()+W ); BufferRanges->removeSelection(); } @@ -917,7 +917,7 @@ void KHexEdit::insert( const TQByteArray &D ) ChangedRange.restrictEndTo( BufferLayout->length()-1 ); if( ChangedRange.isValid() ) { - int W = DataBuffer->replace( ChangedRange, D.data(), ChangedRange.width() ); + int W = DataBuffer->tqreplace( ChangedRange, D.data(), ChangedRange.width() ); BufferCursor->gotoNextByte( W ); } } @@ -930,7 +930,7 @@ void KHexEdit::insert( const TQByteArray &D ) // replacing the selection KSection Selection = BufferRanges->selection(); int OldLastIndex = BufferLayout->length() - 1; - int W = DataBuffer->replace( Selection, D.data(), D.size() ); + int W = DataBuffer->tqreplace( Selection, D.data(), D.size() ); updateLength(); BufferCursor->gotoIndex( Selection.start() + W ); if( W > 0 ) @@ -967,7 +967,7 @@ void KHexEdit::insert( const TQByteArray &D ) if( Changed ) { BufferRanges->addChangedRange( ChangedRange ); - repaintChanged(); + tqrepaintChanged(); } ensureCursorVisible(); @@ -994,7 +994,7 @@ void KHexEdit::removeSelectedData() KSection ChangedRange = removeData( Selection ); BufferRanges->removeSelection(); - repaintChanged(); + tqrepaintChanged(); BufferCursor->gotoCIndex( Selection.start() ); @@ -1017,7 +1017,7 @@ KSection KHexEdit::removeData( KSection Indizes ) // if( !undoRedoInfo.valid() ) // { // doc->selectionStart( selNum, undoRedoInfo.id, undoRedoInfo.index ); -// undoRedoInfo.d->text = TQString::null; +// undoRedoInfo.d->text = TQString(); // } // readFormats( c1, c2, undoRedoInfo.d->text, TRUE ); // } @@ -1042,7 +1042,7 @@ void KHexEdit::updateLength() void KHexEdit::clipboardChanged() { // don't listen to selection changes - disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0 ); + disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, 0 ); selectAll( false ); } @@ -1059,7 +1059,7 @@ void KHexEdit::setCursorPosition( int Index, bool Behind ) bool RangesModifed = BufferRanges->isModified(); if( RangesModifed ) { - repaintChanged(); + tqrepaintChanged(); viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor ); @@ -1178,7 +1178,7 @@ void KHexEdit::showEvent( TQShowEvent *e ) bool KHexEdit::eventFilter( TQObject *O, TQEvent *E ) { - if( O == this || O == viewport() ) + if( TQT_BASE_OBJECT(O) == TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(O) == TQT_BASE_OBJECT(viewport()) ) { if( E->type() == TQEvent::FocusIn ) { @@ -1192,16 +1192,16 @@ bool KHexEdit::eventFilter( TQObject *O, TQEvent *E ) // if( O == this && E->type() == TQEvent::PaletteChange ) // { -// TQColor old( viewport()->colorGroup().color(TQColorGroup::Text) ); +// TQColor old( viewport()->tqcolorGroup().color(TQColorGroup::Text) ); // -// if( old != colorGroup().color(TQColorGroup::Text) ) +// if( old != tqcolorGroup().color(TQColorGroup::Text) ) // { -// TQColor c( colorGroup().color(TQColorGroup::Text) ); +// TQColor c( tqcolorGroup().color(TQColorGroup::Text) ); // doc->setMinimumWidth( -1 ); // doc->setDefaultFormat( doc->formatCollection()->defaultFormat()->font(), c ); // lastFormatted = doc->firstParagraph(); // formatMore(); -// repaintChanged(); +// tqrepaintChanged(); // } // } @@ -1275,20 +1275,20 @@ void KHexEdit::createCursorPixmaps() int Index = BufferCursor->validIndex(); TQPainter Paint; - Paint.begin( &CursorPixmaps->offPixmap(), this ); + Paint.tqbegin( const_cast<TQPixmap*>(&CursorPixmaps->offPixmap()), this ); activeColumn().paintByte( &Paint, Index ); Paint.end(); - Paint.begin( &CursorPixmaps->onPixmap(), this ); + Paint.tqbegin( const_cast<TQPixmap*>(&CursorPixmaps->onPixmap()), this ); activeColumn().paintCursor( &Paint, Index ); Paint.end(); - // calculat the shape + // calculat the tqshape KPixelX CursorX; KPixelX CursorW; if( BufferCursor->isBehind() ) { - CursorX = QMAX( 0, CursorPixmaps->onPixmap().width()-InsertCursorWidth ); + CursorX = TQMAX( 0, CursorPixmaps->onPixmap().width()-InsertCursorWidth ); CursorW = InsertCursorWidth; } else @@ -1397,12 +1397,12 @@ void KHexEdit::keyPressEvent( TQKeyEvent *KeyEvent ) } -void KHexEdit::repaintChanged() +void KHexEdit::tqrepaintChanged() { if( !isUpdatesEnabled() || !viewport()->isUpdatesEnabled() || !BufferRanges->isModified() ) return; - // TODO: we do this only to let the scrollview handle new or removed lines. overlaps with repaintRange + // TODO: we do this only to let the scrollview handle new or removed lines. overlaps with tqrepaintRange resizeContents( totalWidth(), totalHeight() ); KPixelXs Xs( contentsX(), visibleWidth(), true ); @@ -1498,7 +1498,7 @@ void KHexEdit::paintLine( KBufferColumn *C, int Line, KSection Positions ) // to avoid flickers we first paint to the linebuffer TQPainter Paint; - Paint.begin( &LineBuffer, this ); + Paint.tqbegin( &LineBuffer, this ); Paint.translate( C->x(), 0 ); C->paintPositions( &Paint, Line, Positions ); @@ -1548,7 +1548,7 @@ void KHexEdit::contentsMousePressEvent( TQMouseEvent *e ) pauseCursor( true ); // care about a left button press? - if( e->button() == LeftButton ) + if( e->button() == Qt::LeftButton ) { MousePressed = true; @@ -1559,7 +1559,7 @@ void KHexEdit::contentsMousePressEvent( TQMouseEvent *e ) BufferRanges->setSelectionStart( BufferLayout->indexAtLineStart(DoubleClickLine) ); BufferCursor->gotoLineEnd(); BufferRanges->setSelectionEnd( BufferCursor->realIndex() ); - repaintChanged(); + tqrepaintChanged(); unpauseCursor(); return; @@ -1601,12 +1601,12 @@ void KHexEdit::contentsMousePressEvent( TQMouseEvent *e ) BufferRanges->removeFurtherSelections(); } - else if( e->button() == MidButton ) + else if( e->button() == Qt::MidButton ) BufferRanges->removeSelection(); if( BufferRanges->isModified() ) { - repaintChanged(); + tqrepaintChanged(); viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor ); } @@ -1671,20 +1671,20 @@ void KHexEdit::contentsMouseReleaseEvent( TQMouseEvent *e ) // was end of selection operation? else if( BufferRanges->hasSelection() ) { - if( TQApplication::clipboard()->supportsSelection() ) + if( TQApplication::tqclipboard()->supportsSelection() ) { - ClipboardMode = QClipboard::Selection; - disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0); + ClipboardMode = TQClipboard::Selection; + disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, 0); copy(); - connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) ); - ClipboardMode = QClipboard::Clipboard; + connect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) ); + ClipboardMode = TQClipboard::Clipboard; } } } // middle mouse button paste? - else if( e->button() == MidButton && !isReadOnly() ) + else if( e->button() == Qt::MidButton && !isReadOnly() ) { pauseCursor(); @@ -1694,12 +1694,12 @@ void KHexEdit::contentsMouseReleaseEvent( TQMouseEvent *e ) if( BufferRanges->hasSelection() && !BufferRanges->selectionIncludes(BufferCursor->index()) ) BufferRanges->removeSelection(); - ClipboardMode = QClipboard::Selection; + ClipboardMode = TQClipboard::Selection; paste(); - ClipboardMode = QClipboard::Clipboard; + ClipboardMode = TQClipboard::Clipboard; // ensure selection changes to be drawn TODO: create a insert/pasteAtCursor that leaves out drawing - repaintChanged(); + tqrepaintChanged(); ensureCursorVisible(); unpauseCursor(); @@ -1738,7 +1738,7 @@ void KHexEdit::contentsMouseDoubleClickEvent( TQMouseEvent *e ) selectWord( Index ); // as we already have a doubleclick maybe it is a tripple click - TrippleClickTimer->start( qApp->doubleClickInterval(), true ); + TrippleClickTimer->start( tqApp->doubleClickInterval(), true ); DoubleClickPoint = e->globalPos(); } // else @@ -1803,7 +1803,7 @@ void KHexEdit::handleMouseMove( const TQPoint& Point ) // handles the move of th if( BufferRanges->selectionStarted() ) BufferRanges->setSelectionEnd( BufferCursor->realIndex() ); - repaintChanged(); + tqrepaintChanged(); unpauseCursor(); } @@ -1915,7 +1915,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e ) if( NewIndex != Selection.start() ) { BufferCursor->gotoCIndex( NewIndex+Selection.width() ); - ChangedRange.set( QMIN(InsertIndex,Selection.start()), QMAX(InsertIndex,Selection.end()) ); + ChangedRange.set( TQMIN(InsertIndex,Selection.start()), TQMAX(InsertIndex,Selection.end()) ); } } // is a copy @@ -1933,7 +1933,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e ) ChangedRange.restrictEndTo( BufferLayout->length()-1 ); if( ChangedRange.isValid() ) { - int NoOfReplaced = DataBuffer->replace( ChangedRange, Data.data(), ChangedRange.width() ); + int NoOfReplaced = DataBuffer->tqreplace( ChangedRange, Data.data(), ChangedRange.width() ); BufferCursor->gotoNextByte( NoOfReplaced ); } } @@ -1953,7 +1953,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e ) BufferRanges->addChangedRange( ChangedRange ); BufferRanges->removeSelection(); - repaintChanged(); + tqrepaintChanged(); ensureCursorVisible(); // open ui @@ -2005,15 +2005,15 @@ void KHexEdit::contentsContextMenuEvent( TQContextMenuEvent *e ) { selectAll(); // if the clipboard support selections, put the newly selected text into the clipboard - if( TQApplication::clipboard()->supportsSelection() ) + if( TQApplication::tqclipboard()->supportsSelection() ) { - ClipboardMode = QClipboard::Selection; - disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0); + ClipboardMode = TQClipboard::Selection; + disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, 0); copy(); - connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) ); - ClipboardMode = QClipboard::Clipboard; + connect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) ); + ClipboardMode = TQClipboard::Clipboard; } } else if( r == d->id[IdUndo] ) diff --git a/khexedit/lib/khexedit.h b/khexedit/lib/khexedit.h index 8e81fd8..80d36d9 100644 --- a/khexedit/lib/khexedit.h +++ b/khexedit/lib/khexedit.h @@ -81,31 +81,32 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView friend class KCharEditor; Q_OBJECT + TQ_OBJECT Q_ENUMS( KResizeStyle KCoding ) - Q_PROPERTY( bool OverwriteMode READ isOverwriteMode WRITE setOverwriteMode ) - Q_PROPERTY( bool OverwriteOnly READ isOverwriteOnly WRITE setOverwriteOnly ) - Q_PROPERTY( bool Modified READ isModified WRITE setModified DESIGNABLE false ) - Q_PROPERTY( bool ReadOnly READ isReadOnly WRITE setReadOnly ) - - Q_PROPERTY( int NoOfBytesPerLine READ noOfBytesPerLine WRITE setNoOfBytesPerLine ) - Q_PROPERTY( bool TabChangesFocus READ tabChangesFocus WRITE setTabChangesFocus ) - - //Q_PROPERTY( bool hasSelectedData READ hasSelectedData ) - //Q_PROPERTY( TQByteArray SelectedData READ selectedData ) - Q_PROPERTY( KResizeStyle ResizeStyle READ resizeStyle WRITE setResizeStyle ) - Q_PROPERTY( int StartOffset READ startOffset WRITE setStartOffset ) - Q_PROPERTY( int FirstLineOffset READ firstLineOffset WRITE setFirstLineOffset ) + TQ_PROPERTY( bool OverwriteMode READ isOverwriteMode WRITE setOverwriteMode ) + TQ_PROPERTY( bool OverwriteOnly READ isOverwriteOnly WRITE setOverwriteOnly ) + TQ_PROPERTY( bool Modified READ isModified WRITE setModified DESIGNABLE false ) + TQ_PROPERTY( bool ReadOnly READ isReadOnly WRITE setReadOnly ) + + TQ_PROPERTY( int NoOfBytesPerLine READ noOfBytesPerLine WRITE setNoOfBytesPerLine ) + TQ_PROPERTY( bool TabChangesFocus READ tabChangesFocus WRITE setTabChangesFocus ) + + //TQ_PROPERTY( bool hasSelectedData READ hasSelectedData ) + //TQ_PROPERTY( TQByteArray SelectedData READ selectedData ) + TQ_PROPERTY( KResizeStyle ResizeStyle READ resizeStyle WRITE setResizeStyle ) + TQ_PROPERTY( int StartOffset READ startOffset WRITE setStartOffset ) + TQ_PROPERTY( int FirstLineOffset READ firstLineOffset WRITE setFirstLineOffset ) //_PROPERTY( int undoDepth READ undoDepth WRITE setUndoDepth ) //_PROPERTY( bool undoRedoEnabled READ isUndoRedoEnabled WRITE setUndoRedoEnabled ) // value column - Q_PROPERTY( KCoding Coding READ coding WRITE setCoding ) - Q_PROPERTY( int ByteSpacingWidth READ byteSpacingWidth WRITE setByteSpacingWidth ) - Q_PROPERTY( int NoOfGroupedBytes READ noOfGroupedBytes WRITE setNoOfGroupedBytes ) - Q_PROPERTY( int GroupSpacingWidth READ groupSpacingWidth WRITE setGroupSpacingWidth ) - Q_PROPERTY( int BinaryGapWidth READ binaryGapWidth WRITE setBinaryGapWidth ) + TQ_PROPERTY( KCoding Coding READ coding WRITE setCoding ) + TQ_PROPERTY( int ByteSpacingWidth READ byteSpacingWidth WRITE setByteSpacingWidth ) + TQ_PROPERTY( int NoOfGroupedBytes READ noOfGroupedBytes WRITE setNoOfGroupedBytes ) + TQ_PROPERTY( int GroupSpacingWidth READ groupSpacingWidth WRITE setGroupSpacingWidth ) + TQ_PROPERTY( int BinaryGapWidth READ binaryGapWidth WRITE setBinaryGapWidth ) // char column - Q_PROPERTY( bool ShowUnprintable READ showUnprintable WRITE setShowUnprintable ) - Q_PROPERTY( TQChar SubstituteChar READ substituteChar WRITE setSubstituteChar ) + TQ_PROPERTY( bool ShowUnprintable READ showUnprintable WRITE setShowUnprintable ) + TQ_PROPERTY( TQChar SubstituteChar READ substituteChar WRITE setSubstituteChar ) public: enum KResizeStyle { NoResize=0, LockGrouping=1, FullSizeUsage=2, MaxResizeStyleId=0xFF }; @@ -129,8 +130,8 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView // void focusOutEvent( TQFocusEvent *FocusEvent ); virtual bool eventFilter( TQObject *O, TQEvent *E ); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; public: // value access @@ -215,7 +216,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView void placeCursor( const TQPoint &Point ); /***/ void setCursorColumn( KBufferColumnId ); -// void repaintByte( int row, int column, bool Erase = true ); +// void tqrepaintByte( int row, int column, bool Erase = true ); // void updateByte( int row, int column ); // void ensureByteVisible( int row, int column ); @@ -396,8 +397,8 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView /** handles screen update in case of a change to any of the width sizes */ void updateViewByWidth(); - /** repaints all the parts that are signed as changed */ - void repaintChanged(); + /** tqrepaints all the parts that are signed as changed */ + void tqrepaintChanged(); protected: // drawing related operations /** recreates the cursor pixmaps and paints active and inactive cursors if doable */ @@ -424,7 +425,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView protected: /** recalcs all dependant values with the actual NoOfBytesPerLine */ void adjustToLayoutNoOfBytesPerLine(); - /** recalcs a layout due to the resize style that fits into the view size + /** recalcs a tqlayout due to the resize style that fits into the view size * and updates the dependant values */ void adjustLayoutToSize(); @@ -451,7 +452,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView /** Buffer with the data */ KDataBuffer *DataBuffer; - /** holds the logical layout */ + /** holds the logical tqlayout */ KBufferLayout *BufferLayout; /** */ KBufferCursor *BufferCursor; @@ -506,7 +507,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView /** point at which the current dragging started */ TQPoint DragStartPoint; /** */ - QClipboard::Mode ClipboardMode; + TQClipboard::Mode ClipboardMode; /** font size as set by user (used for zooming) */ int DefaultFontSize; diff --git a/khexedit/lib/koffsetcolumn.cpp b/khexedit/lib/koffsetcolumn.cpp index fb8e694..c2be15a 100644 --- a/khexedit/lib/koffsetcolumn.cpp +++ b/khexedit/lib/koffsetcolumn.cpp @@ -42,8 +42,8 @@ KOffsetColumn::~KOffsetColumn() void KOffsetColumn::paintLine( TQPainter *P, int Line ) { - const TQColor &ButtonColor = View->colorGroup().button(); - P->fillRect( 0,0,width(),LineHeight, TQBrush(ButtonColor,Qt::SolidPattern) ); + const TQColor &ButtonColor = View->tqcolorGroup().button(); + P->fillRect( 0,0,width(),LineHeight, TQBrush(ButtonColor,TQt::SolidPattern) ); printFunction()( CodedOffset,FirstLineOffset+Delta*Line ); P->drawText( 0, DigitBaseLine, TQString().append(CodedOffset) ); @@ -68,8 +68,8 @@ void KOffsetColumn::paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys ) { Xs.restrictTo( XSpan ); - const TQColor &ButtonColor = View->colorGroup().button(); - P->fillRect( Xs.start(), Ys.start(), Xs.width(), Ys.width(), TQBrush(ButtonColor,Qt::SolidPattern) ); + const TQColor &ButtonColor = View->tqcolorGroup().button(); + P->fillRect( Xs.start(), Ys.start(), Xs.width(), Ys.width(), TQBrush(ButtonColor,TQt::SolidPattern) ); } void KOffsetColumn::setFormat( KOffsetFormat::KFormat F ) diff --git a/khexedit/lib/koffsetcolumn.h b/khexedit/lib/koffsetcolumn.h index 497d7ef..56b48f1 100644 --- a/khexedit/lib/koffsetcolumn.h +++ b/khexedit/lib/koffsetcolumn.h @@ -81,7 +81,7 @@ class KOffsetColumn : public KColumn /** */ KPixelY DigitBaseLine; - protected: // general layout + protected: // general tqlayout KOffsetFormat::KFormat Format; int CodingWidth; diff --git a/khexedit/lib/kplainbuffer.cpp b/khexedit/lib/kplainbuffer.cpp index 02b9d70..1d79756 100644 --- a/khexedit/lib/kplainbuffer.cpp +++ b/khexedit/lib/kplainbuffer.cpp @@ -72,7 +72,7 @@ int KPlainBuffer::insert( int Pos, const char* D, int Length ) // check all parameters if( Length == 0 ) return 0; - //kdDebug() << TQString("before: Size: %1, RawSize: %2").arg(Size).arg(RawSize) << endl; + //kdDebug() << TQString("before: Size: %1, RawSize: %2").tqarg(Size).tqarg(RawSize) << endl; // correct for appending if( Pos > (int)Size ) Pos = Size; @@ -82,7 +82,7 @@ int KPlainBuffer::insert( int Pos, const char* D, int Length ) // copy new data to its place memcpy( &Data[Pos], D, Length ); - //kdDebug() << TQString("after: Size: %1, RawSize: %2").arg(Size).arg(RawSize) << endl; + //kdDebug() << TQString("after: Size: %1, RawSize: %2").tqarg(Size).tqarg(RawSize) << endl; Modified = true; return Length; @@ -108,7 +108,7 @@ int KPlainBuffer::remove( KSection Remove ) } -unsigned int KPlainBuffer::replace( KSection Remove, const char* D, unsigned int InputLength ) +unsigned int KPlainBuffer::tqreplace( KSection Remove, const char* D, unsigned int InputLength ) { // check all parameters if( Remove.start() >= (int)Size || (Remove.width()==0 && InputLength==0) ) @@ -259,7 +259,7 @@ int KPlainBuffer::fill( const char FChar, int FillLength, unsigned int Pos ) } -int KPlainBuffer::find( const char* SearchString, int Length, KSection Section ) const +int KPlainBuffer::tqfind( const char* SearchString, int Length, KSection Section ) const { Section.restrictEndTo( Size-1 ); diff --git a/khexedit/lib/kplainbuffer.h b/khexedit/lib/kplainbuffer.h index 31851ae..c0d8846 100644 --- a/khexedit/lib/kplainbuffer.h +++ b/khexedit/lib/kplainbuffer.h @@ -54,18 +54,18 @@ class KPlainBuffer : public KDataBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection Remove ); - virtual unsigned int replace( KSection Remove, const char*, unsigned int InputLength ); + virtual unsigned int tqreplace( KSection Remove, const char*, unsigned int InputLength ); virtual int move( int DestPos, KSection SourceSection ); virtual int fill( const char FillChar, int Length = -1, unsigned int Pos = 0 ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M = true ); - //virtual int find( const char*, int Length, int Pos = 0 ) const; - virtual int find( const char*KeyData, int Length, KSection Section ) const; + //virtual int tqfind( const char*, int Length, int Pos = 0 ) const; + virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; -/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ public: void setReadOnly( bool RO = true ); diff --git a/khexedit/lib/kvaluecolumn.cpp b/khexedit/lib/kvaluecolumn.cpp index 62d36c0..beb706a 100644 --- a/khexedit/lib/kvaluecolumn.cpp +++ b/khexedit/lib/kvaluecolumn.cpp @@ -105,9 +105,9 @@ void KValueColumn::paintEditedByte( TQPainter *P, char Byte, const TQString &Edi { KHEChar B = Codec->decode( Byte ); - const TQColorGroup &CG = View->colorGroup(); + const TQColorGroup &CG = View->tqcolorGroup(); - P->fillRect( 0,0,ByteWidth,LineHeight, TQBrush(colorForChar(B),Qt::SolidPattern) ); + P->fillRect( 0,0,ByteWidth,LineHeight, TQBrush(colorForChar(B),TQt::SolidPattern) ); drawCode( P, EditBuffer, CG.base() ); } diff --git a/khexedit/lib/kwrappingrobuffer.cpp b/khexedit/lib/kwrappingrobuffer.cpp index b913c1a..a47745c 100644 --- a/khexedit/lib/kwrappingrobuffer.cpp +++ b/khexedit/lib/kwrappingrobuffer.cpp @@ -50,7 +50,7 @@ void KWrappingROBuffer::set( const char* D, int L ) } -int KWrappingROBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const +int KWrappingROBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } diff --git a/khexedit/lib/kwrappingrobuffer.h b/khexedit/lib/kwrappingrobuffer.h index 51ee7b8..97ae33c 100644 --- a/khexedit/lib/kwrappingrobuffer.h +++ b/khexedit/lib/kwrappingrobuffer.h @@ -47,13 +47,13 @@ class KWrappingROBuffer : public KReadOnlyBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection S ); - virtual unsigned int replace( KSection S, const char*, unsigned int Length ); + virtual unsigned int tqreplace( KSection S, const char*, unsigned int Length ); virtual int fill( const char FillChar, int, int ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M ); - virtual int find( const char*KeyData, int Length, KSection Section ) const; + virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; @@ -75,7 +75,7 @@ inline char KWrappingROBuffer::datum( unsigned int Offset ) const { return Data[ inline int KWrappingROBuffer::insert( int, const char*, int ) { return 0; } inline int KWrappingROBuffer::remove( KSection ) { return 0; } -inline unsigned int KWrappingROBuffer::replace( KSection, const char*, unsigned int ) { return 0; } +inline unsigned int KWrappingROBuffer::tqreplace( KSection, const char*, unsigned int ) { return 0; } inline int KWrappingROBuffer::fill( const char , int, int ) { return 0; } inline void KWrappingROBuffer::setDatum( unsigned int, const char ) {} |