summaryrefslogtreecommitdiffstats
path: root/khexedit/lib
diff options
context:
space:
mode:
Diffstat (limited to 'khexedit/lib')
-rw-r--r--khexedit/lib/codecs/kbinarybytecodec.cpp4
-rw-r--r--khexedit/lib/codecs/kbinarybytecodec.h4
-rw-r--r--khexedit/lib/codecs/kbytecodec.cpp4
-rw-r--r--khexedit/lib/codecs/kcharcodec.cpp6
-rw-r--r--khexedit/lib/codecs/kdecimalbytecodec.cpp4
-rw-r--r--khexedit/lib/codecs/kdecimalbytecodec.h4
-rw-r--r--khexedit/lib/codecs/kebcdic1047charcodec.cpp10
-rw-r--r--khexedit/lib/codecs/kebcdic1047charcodec.h6
-rw-r--r--khexedit/lib/codecs/khexadecimalbytecodec.cpp8
-rw-r--r--khexedit/lib/codecs/khexadecimalbytecodec.h6
-rw-r--r--khexedit/lib/codecs/koctalbytecodec.cpp4
-rw-r--r--khexedit/lib/codecs/koctalbytecodec.h4
-rw-r--r--khexedit/lib/codecs/ktextcharcodec.cpp52
-rw-r--r--khexedit/lib/codecs/ktextcharcodec.h20
-rw-r--r--khexedit/lib/controller/kchareditor.cpp8
-rw-r--r--khexedit/lib/controller/kchareditor.h2
-rw-r--r--khexedit/lib/controller/kcontroller.cpp2
-rw-r--r--khexedit/lib/controller/kcontroller.h2
-rw-r--r--khexedit/lib/controller/keditor.cpp2
-rw-r--r--khexedit/lib/controller/keditor.h2
-rw-r--r--khexedit/lib/controller/knavigator.cpp4
-rw-r--r--khexedit/lib/controller/knavigator.h2
-rw-r--r--khexedit/lib/controller/ktabcontroller.cpp4
-rw-r--r--khexedit/lib/controller/ktabcontroller.h2
-rw-r--r--khexedit/lib/controller/kvalueeditor.cpp6
-rw-r--r--khexedit/lib/controller/kvalueeditor.h4
-rw-r--r--khexedit/lib/helper.h4
-rw-r--r--khexedit/lib/kbigbuffer.cpp2
-rw-r--r--khexedit/lib/kbigbuffer.h12
-rw-r--r--khexedit/lib/kbordercoltextexport.cpp8
-rw-r--r--khexedit/lib/kbordercoltextexport.h6
-rw-r--r--khexedit/lib/kbordercolumn.cpp16
-rw-r--r--khexedit/lib/kbordercolumn.h8
-rw-r--r--khexedit/lib/kbuffercoltextexport.cpp10
-rw-r--r--khexedit/lib/kbuffercoltextexport.h10
-rw-r--r--khexedit/lib/kbuffercolumn.cpp48
-rw-r--r--khexedit/lib/kbuffercolumn.h26
-rw-r--r--khexedit/lib/kbufferdrag.cpp46
-rw-r--r--khexedit/lib/kbufferdrag.h26
-rw-r--r--khexedit/lib/kbytecodec.h8
-rw-r--r--khexedit/lib/kbytesedit.cpp6
-rw-r--r--khexedit/lib/kbytesedit.h6
-rw-r--r--khexedit/lib/kcharcodec.h12
-rw-r--r--khexedit/lib/kcharcoltextexport.cpp4
-rw-r--r--khexedit/lib/kcharcoltextexport.h8
-rw-r--r--khexedit/lib/kcharcolumn.cpp10
-rw-r--r--khexedit/lib/kcharcolumn.h24
-rw-r--r--khexedit/lib/kcoltextexport.h4
-rw-r--r--khexedit/lib/kcolumn.cpp10
-rw-r--r--khexedit/lib/kcolumn.h8
-rw-r--r--khexedit/lib/kcolumnsview.cpp16
-rw-r--r--khexedit/lib/kcolumnsview.h24
-rw-r--r--khexedit/lib/kcoordrangelist.h4
-rw-r--r--khexedit/lib/kcursor.h14
-rw-r--r--khexedit/lib/kdatabuffer.h2
-rw-r--r--khexedit/lib/kfixedsizebuffer.cpp6
-rw-r--r--khexedit/lib/kfixedsizebuffer.h2
-rw-r--r--khexedit/lib/khechar.h10
-rw-r--r--khexedit/lib/khexedit.cpp198
-rw-r--r--khexedit/lib/khexedit.h102
-rw-r--r--khexedit/lib/koffsetcoltextexport.cpp8
-rw-r--r--khexedit/lib/koffsetcoltextexport.h6
-rw-r--r--khexedit/lib/koffsetcolumn.cpp20
-rw-r--r--khexedit/lib/koffsetcolumn.h8
-rw-r--r--khexedit/lib/kplainbuffer.cpp4
-rw-r--r--khexedit/lib/kplainbuffer.h2
-rw-r--r--khexedit/lib/ksectionlist.h4
-rw-r--r--khexedit/lib/kvaluecoltextexport.cpp4
-rw-r--r--khexedit/lib/kvaluecoltextexport.h2
-rw-r--r--khexedit/lib/kvaluecolumn.cpp12
-rw-r--r--khexedit/lib/kvaluecolumn.h8
71 files changed, 477 insertions, 477 deletions
diff --git a/khexedit/lib/codecs/kbinarybytecodec.cpp b/khexedit/lib/codecs/kbinarybytecodec.cpp
index d665a05..a49a460 100644
--- a/khexedit/lib/codecs/kbinarybytecodec.cpp
+++ b/khexedit/lib/codecs/kbinarybytecodec.cpp
@@ -21,13 +21,13 @@
using namespace KHE;
-void KBinaryByteCodec::encode( QString &Digits, unsigned int Pos, const unsigned char Char ) const
+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';
}
-void KBinaryByteCodec::encodeShort( QString &Digits, unsigned int Pos, unsigned char Char ) const
+void KBinaryByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{
unsigned char M = 1<<7;
// find first set bit
diff --git a/khexedit/lib/codecs/kbinarybytecodec.h b/khexedit/lib/codecs/kbinarybytecodec.h
index d0354fa..631fa74 100644
--- a/khexedit/lib/codecs/kbinarybytecodec.h
+++ b/khexedit/lib/codecs/kbinarybytecodec.h
@@ -41,9 +41,9 @@ class KBinaryByteCodec : public KByteCodec
virtual unsigned char digitsFilledLimit() const { return 128; }
/** encodes the Char and writes the result to */
- virtual void encode( QString &Digits, unsigned int Pos, const unsigned char Char ) const;
+ virtual void encode( TQString &Digits, unsigned int Pos, const unsigned char Char ) const;
/** */
- virtual void encodeShort( QString &Digits, unsigned int Pos, const unsigned char Char ) const;
+ virtual void encodeShort( TQString &Digits, unsigned int Pos, const unsigned char Char ) const;
/** */
virtual bool appendDigit( unsigned char *Byte, const unsigned char Digit ) const;
/** */
diff --git a/khexedit/lib/codecs/kbytecodec.cpp b/khexedit/lib/codecs/kbytecodec.cpp
index dc5137f..f4847ba 100644
--- a/khexedit/lib/codecs/kbytecodec.cpp
+++ b/khexedit/lib/codecs/kbytecodec.cpp
@@ -38,9 +38,9 @@ KByteCodec *KByteCodec::createCodec( KCoding C )
return Codec;
}
-unsigned int KByteCodec::decode( unsigned char *Char, const QString &Digits, uint Pos ) const
+unsigned int KByteCodec::decode( unsigned char *Char, const TQString &Digits, uint Pos ) const
{
- //kdDebug() << QString("KByteCodec::decode(%1,%2)").arg(Digits).arg(Pos) << endl;
+ //kdDebug() << TQString("KByteCodec::decode(%1,%2)").arg(Digits).arg(Pos) << endl;
const uint P = Pos;
// remove leading 0s
diff --git a/khexedit/lib/codecs/kcharcodec.cpp b/khexedit/lib/codecs/kcharcodec.cpp
index 5a58320..1aab79b 100644
--- a/khexedit/lib/codecs/kcharcodec.cpp
+++ b/khexedit/lib/codecs/kcharcodec.cpp
@@ -23,9 +23,9 @@
using namespace KHE;
-QStringList KCharCodec::CodecNames;
+TQStringList KCharCodec::CodecNames;
-const QStringList &KCharCodec::codecNames()
+const TQStringList &KCharCodec::codecNames()
{
// first call?
if( CodecNames.isEmpty() )
@@ -38,7 +38,7 @@ const QStringList &KCharCodec::codecNames()
}
-KCharCodec *KCharCodec::createCodec( const QString &Name )
+KCharCodec *KCharCodec::createCodec( const TQString &Name )
{
KCharCodec *Codec = 0;
diff --git a/khexedit/lib/codecs/kdecimalbytecodec.cpp b/khexedit/lib/codecs/kdecimalbytecodec.cpp
index 9470382..c556875 100644
--- a/khexedit/lib/codecs/kdecimalbytecodec.cpp
+++ b/khexedit/lib/codecs/kdecimalbytecodec.cpp
@@ -21,7 +21,7 @@
using namespace KHE;
-void KDecimalByteCodec::encode( QString &Digits, unsigned int Pos, unsigned char Char ) const
+void KDecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{
unsigned char C = Char / 100;
Digits.at(Pos++) = '0'+C;
@@ -33,7 +33,7 @@ void KDecimalByteCodec::encode( QString &Digits, unsigned int Pos, unsigned char
}
-void KDecimalByteCodec::encodeShort( QString &Digits, unsigned int Pos, unsigned char Char ) const
+void KDecimalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{
unsigned char C;
if( (C = Char / 100) )
diff --git a/khexedit/lib/codecs/kdecimalbytecodec.h b/khexedit/lib/codecs/kdecimalbytecodec.h
index 31f61d0..b91e6a8 100644
--- a/khexedit/lib/codecs/kdecimalbytecodec.h
+++ b/khexedit/lib/codecs/kdecimalbytecodec.h
@@ -41,9 +41,9 @@ class KDecimalByteCodec : public KByteCodec
virtual unsigned char digitsFilledLimit() const { return 26; }
/** encodes the Char and writes the result to */
- virtual void encode( QString &Digits, unsigned int Pos, const unsigned char Char ) const;
+ virtual void encode( TQString &Digits, unsigned int Pos, const unsigned char Char ) const;
/** */
- virtual void encodeShort( QString &Digits, unsigned int Pos, const unsigned char Char ) const;
+ virtual void encodeShort( TQString &Digits, unsigned int Pos, const unsigned char Char ) const;
/** */
virtual bool appendDigit( unsigned char *Byte, const unsigned char Digit ) const;
/** */
diff --git a/khexedit/lib/codecs/kebcdic1047charcodec.cpp b/khexedit/lib/codecs/kebcdic1047charcodec.cpp
index f26da37..d1002c3 100644
--- a/khexedit/lib/codecs/kebcdic1047charcodec.cpp
+++ b/khexedit/lib/codecs/kebcdic1047charcodec.cpp
@@ -96,7 +96,7 @@ static unsigned char EBCDICChars[256] =
static const char KEBCDIC1047CharCodecName[] = "EBCDIC 1047";
-bool KEBCDIC1047CharCodec::encode( char *D, const QChar &C ) const
+bool KEBCDIC1047CharCodec::encode( char *D, const TQChar &C ) const
{
int I = C.unicode();
// not in range?
@@ -109,16 +109,16 @@ bool KEBCDIC1047CharCodec::encode( char *D, const QChar &C ) const
KHEChar KEBCDIC1047CharCodec::decode( char Byte ) const
{
- return QChar(UnicodeChars[(unsigned char)Byte]);
+ return TQChar(UnicodeChars[(unsigned char)Byte]);
}
-const QString& KEBCDIC1047CharCodec::name() const
+const TQString& KEBCDIC1047CharCodec::name() const
{
return codecName();
}
-const QString& KEBCDIC1047CharCodec::codecName()
+const TQString& KEBCDIC1047CharCodec::codecName()
{
- static const QString Name( QString::fromLatin1(KEBCDIC1047CharCodecName) );
+ static const TQString Name( TQString::fromLatin1(KEBCDIC1047CharCodecName) );
return Name;
}
diff --git a/khexedit/lib/codecs/kebcdic1047charcodec.h b/khexedit/lib/codecs/kebcdic1047charcodec.h
index 7c30956..8ac1d43 100644
--- a/khexedit/lib/codecs/kebcdic1047charcodec.h
+++ b/khexedit/lib/codecs/kebcdic1047charcodec.h
@@ -32,12 +32,12 @@ class KEBCDIC1047CharCodec : public KCharCodec
public: // KCharCodec API
virtual KHEChar decode( char Byte ) const;
- virtual bool encode( char *D, const QChar &C ) const;
- virtual const QString& name() const;
+ virtual bool encode( char *D, const TQChar &C ) const;
+ virtual const TQString& name() const;
public:
static KEBCDIC1047CharCodec *create();
- static const QString& codecName();
+ static const TQString& codecName();
};
diff --git a/khexedit/lib/codecs/khexadecimalbytecodec.cpp b/khexedit/lib/codecs/khexadecimalbytecodec.cpp
index 7072464..596fd24 100644
--- a/khexedit/lib/codecs/khexadecimalbytecodec.cpp
+++ b/khexedit/lib/codecs/khexadecimalbytecodec.cpp
@@ -21,9 +21,9 @@
using namespace KHE;
-static const QChar BigDigit[16] =
+static const TQChar BigDigit[16] =
{ '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' };
-static const QChar SmallDigit[16] =
+static const TQChar SmallDigit[16] =
{ '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' };
@@ -39,13 +39,13 @@ bool KHexadecimalByteCodec::setSmallDigits( bool S )
bool KHexadecimalByteCodec::smallDigits() const { return Digit != BigDigit; }
-void KHexadecimalByteCodec::encode( QString &Digits, unsigned int Pos, unsigned char Char ) const
+void KHexadecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{
Digits.at(Pos++) = Digit[Char>>4];
Digits.at(Pos) = Digit[Char&0x0F];
}
-void KHexadecimalByteCodec::encodeShort( QString &Digits, unsigned int Pos, unsigned char Char ) const
+void KHexadecimalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{
unsigned char C;
if( (C = (Char>>4)) )
diff --git a/khexedit/lib/codecs/khexadecimalbytecodec.h b/khexedit/lib/codecs/khexadecimalbytecodec.h
index 9bb1969..88b2f83 100644
--- a/khexedit/lib/codecs/khexadecimalbytecodec.h
+++ b/khexedit/lib/codecs/khexadecimalbytecodec.h
@@ -48,9 +48,9 @@ class KHexadecimalByteCodec : public KByteCodec
virtual unsigned char digitsFilledLimit() const { return 16; }
/** encodes the Char and writes the result to */
- virtual void encode( QString &Digits, unsigned int Pos, const unsigned char Char ) const;
+ virtual void encode( TQString &Digits, unsigned int Pos, const unsigned char Char ) const;
/** */
- virtual void encodeShort( QString &Digits, unsigned int Pos, const unsigned char Char ) const;
+ virtual void encodeShort( TQString &Digits, unsigned int Pos, const unsigned char Char ) const;
/** */
virtual bool appendDigit( unsigned char *Byte, const unsigned char Digit ) const;
/** */
@@ -61,7 +61,7 @@ class KHexadecimalByteCodec : public KByteCodec
virtual bool turnToValue( unsigned char *Digit ) const;
protected:
- const QChar* Digit;
+ const TQChar* Digit;
};
}
diff --git a/khexedit/lib/codecs/koctalbytecodec.cpp b/khexedit/lib/codecs/koctalbytecodec.cpp
index 1167941..44c7952 100644
--- a/khexedit/lib/codecs/koctalbytecodec.cpp
+++ b/khexedit/lib/codecs/koctalbytecodec.cpp
@@ -21,7 +21,7 @@
using namespace KHE;
-void KOctalByteCodec::encode( QString &Digits, unsigned int Pos, unsigned char Char ) const
+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);
@@ -29,7 +29,7 @@ void KOctalByteCodec::encode( QString &Digits, unsigned int Pos, unsigned char C
}
-void KOctalByteCodec::encodeShort( QString &Digits, unsigned int Pos, unsigned char Char ) const
+void KOctalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{
unsigned char C;
if( (C = (Char>>6)&0x07) )
diff --git a/khexedit/lib/codecs/koctalbytecodec.h b/khexedit/lib/codecs/koctalbytecodec.h
index e05ca66..14693f3 100644
--- a/khexedit/lib/codecs/koctalbytecodec.h
+++ b/khexedit/lib/codecs/koctalbytecodec.h
@@ -41,9 +41,9 @@ class KOctalByteCodec : public KByteCodec
virtual unsigned char digitsFilledLimit() const { return 64; }
/** encodes the Char and writes the result to */
- virtual void encode( QString &Digits, unsigned int Pos, const unsigned char Char ) const;
+ virtual void encode( TQString &Digits, unsigned int Pos, const unsigned char Char ) const;
/** */
- virtual void encodeShort( QString &Digits, unsigned int Pos, const unsigned char Char ) const;
+ virtual void encodeShort( TQString &Digits, unsigned int Pos, const unsigned char Char ) const;
/** */
virtual bool appendDigit( unsigned char *Byte, const unsigned char Digit ) const;
/** */
diff --git a/khexedit/lib/codecs/ktextcharcodec.cpp b/khexedit/lib/codecs/ktextcharcodec.cpp
index 613dedd..a9014dd 100644
--- a/khexedit/lib/codecs/ktextcharcodec.cpp
+++ b/khexedit/lib/codecs/ktextcharcodec.cpp
@@ -16,7 +16,7 @@
// qt specific
-#include "qtextcodec.h"
+#include "tqtextcodec.h"
// kde specific
#include <kglobal.h>
#include <klocale.h>
@@ -63,7 +63,7 @@ const EncodingNames[] = {
//TODO: WS2
static const unsigned int NoOfEncodings = 26;
-static bool is8Bit( QTextCodec *Codec )
+static bool is8Bit( TQTextCodec *Codec )
{
bool Found = false;
for( unsigned int i=0; i<NoOfEncodings; ++i )
@@ -77,13 +77,13 @@ static bool is8Bit( QTextCodec *Codec )
return Found;
}
-static QTextCodec *createLatin1()
+static TQTextCodec *createLatin1()
{
return KGlobal::charsets()->codecForName( EncodingNames[0].Name );
}
/** heuristic seems to be doomed :(
-static bool is8Bit( QTextCodec *Codec )
+static bool is8Bit( TQTextCodec *Codec )
{
bool Result = true;
@@ -91,9 +91,9 @@ static bool is8Bit( QTextCodec *Codec )
unsigned char c[4];
c[0] = 0;
c[1] = c[2] = c[3] = 230;
- QString S = Codec->toUnicode( (const char*)&c,4 );
+ TQString S = Codec->toUnicode( (const char*)&c,4 );
int Length = 1;
- QCString CS = Codec->fromUnicode( S, Length );
+ TQCString CS = Codec->fromUnicode( S, Length );
//kdDebug() << Codec->name() << " "<<Length << endl;
if( Length > 0 )
Result = false;
@@ -115,26 +115,26 @@ static bool is8Bit( QTextCodec *Codec )
while( c[0] < 255 );
return Result;
}
-const QStringList &KTextCharCodec::codecNames()
+const TQStringList &KTextCharCodec::codecNames()
{
// first call?
if( CodecNames.isEmpty() )
{
- const QStringList &CharSets = KGlobal::charsets()->availableEncodingNames();
+ const TQStringList &CharSets = KGlobal::charsets()->availableEncodingNames();
- for( QStringList::ConstIterator it = CharSets.begin(); it != CharSets.end(); ++it )
+ for( TQStringList::ConstIterator it = CharSets.begin(); it != CharSets.end(); ++it )
{
bool Found = true;
- QTextCodec* Codec = KGlobal::charsets()->codecForName( *it, Found );
+ TQTextCodec* Codec = KGlobal::charsets()->codecForName( *it, Found );
if( Found && is8Bit(Codec) )
- CodecNames.append( QString::fromLatin1(Codec->name()) );
+ CodecNames.append( TQString::fromLatin1(Codec->name()) );
}
}
return CodecNames;
}
-QString KTextCharCodec::nameOfEncoding( KEncoding C )
+TQString KTextCharCodec::nameOfEncoding( KEncoding C )
{
KTextCharCodec *Codec = 0;
@@ -150,35 +150,35 @@ QString KTextCharCodec::nameOfEncoding( KEncoding C )
if( N != 0 )
{
- QString CodeName = QString::fromLatin1( N );
+ TQString CodeName = TQString::fromLatin1( N );
}
return Codec;
}
*/
-QStringList KTextCharCodec::CodecNames;
+TQStringList KTextCharCodec::CodecNames;
KTextCharCodec *KTextCharCodec::createLocalCodec()
{
- QTextCodec *Codec = KGlobal::locale()->codecForEncoding();
+ TQTextCodec *Codec = KGlobal::locale()->codecForEncoding();
if( !is8Bit(Codec) )
Codec = createLatin1();
return new KTextCharCodec( Codec );
}
-KTextCharCodec *KTextCharCodec::createCodec( const QString &CodeName )
+KTextCharCodec *KTextCharCodec::createCodec( const TQString &CodeName )
{
bool Ok;
- QTextCodec *Codec = KGlobal::charsets()->codecForName( CodeName, Ok );
+ TQTextCodec *Codec = KGlobal::charsets()->codecForName( CodeName, Ok );
if( Ok )
Ok = is8Bit( Codec );
return Ok ? new KTextCharCodec( Codec ) : 0;
}
-const QStringList &KTextCharCodec::codecNames()
+const TQStringList &KTextCharCodec::codecNames()
{
// first call?
if( CodecNames.isEmpty() )
@@ -186,10 +186,10 @@ const QStringList &KTextCharCodec::codecNames()
for( unsigned int i=0; i<NoOfEncodings; ++i )
{
bool Found = true;
- QString Name = QString::fromLatin1( EncodingNames[i].Name );
- QTextCodec* Codec = KGlobal::charsets()->codecForName( Name, Found );
+ TQString Name = TQString::fromLatin1( EncodingNames[i].Name );
+ TQTextCodec* Codec = KGlobal::charsets()->codecForName( Name, Found );
if( Found )
- CodecNames.append( QString::fromLatin1(Codec->name()) );
+ CodecNames.append( TQString::fromLatin1(Codec->name()) );
}
}
@@ -197,7 +197,7 @@ const QStringList &KTextCharCodec::codecNames()
}
-KTextCharCodec::KTextCharCodec( QTextCodec *C )
+KTextCharCodec::KTextCharCodec( TQTextCodec *C )
: Codec( C ),
Decoder( C->makeDecoder() ),
Encoder( C->makeEncoder() )
@@ -209,7 +209,7 @@ KTextCharCodec::~KTextCharCodec()
delete Encoder;
}
-bool KTextCharCodec::encode( char *D, const QChar &C ) const
+bool KTextCharCodec::encode( char *D, const TQChar &C ) const
{
if( !Codec->canEncode(C) ) // TODO: do we really need the codec?
return false;
@@ -223,14 +223,14 @@ bool KTextCharCodec::encode( char *D, const QChar &C ) const
KHEChar KTextCharCodec::decode( char Byte ) const
{
- QString S( Decoder->toUnicode(&Byte,1) );
+ TQString S( Decoder->toUnicode(&Byte,1) );
return KHEChar(S.at(0));
}
-const QString& KTextCharCodec::name() const
+const TQString& KTextCharCodec::name() const
{
if( Name.isNull() )
- Name = QString::fromLatin1( Codec->name() );
+ Name = TQString::fromLatin1( Codec->name() );
return Name;
}
diff --git a/khexedit/lib/codecs/ktextcharcodec.h b/khexedit/lib/codecs/ktextcharcodec.h
index 683919c..48ca3b0 100644
--- a/khexedit/lib/codecs/ktextcharcodec.h
+++ b/khexedit/lib/codecs/ktextcharcodec.h
@@ -32,33 +32,33 @@ namespace KHE
class KTextCharCodec : public KCharCodec
{
public:
- static KTextCharCodec *createCodec( const QString &CodeName );
+ static KTextCharCodec *createCodec( const TQString &CodeName );
static KTextCharCodec *createCodec( KEncoding C );
static KTextCharCodec *createLocalCodec();
- static const QStringList &codecNames();
+ static const TQStringList &codecNames();
protected:
- KTextCharCodec( QTextCodec *C );
+ KTextCharCodec( TQTextCodec *C );
public:
virtual ~KTextCharCodec();
public: // KCharCodec API
- virtual bool encode( char *D, const QChar &C ) const;
+ virtual bool encode( char *D, const TQChar &C ) const;
virtual KHEChar decode( char Byte ) const;
- virtual const QString& name() const;
+ virtual const TQString& name() const;
protected:
- QTextCodec *Codec;
+ TQTextCodec *Codec;
/** decodes the chars to unicode */
- QTextDecoder *Decoder;
+ TQTextDecoder *Decoder;
/** encodes the chars from unicode */
- QTextEncoder *Encoder;
+ TQTextEncoder *Encoder;
/** */
- mutable QString Name;
+ mutable TQString Name;
- static QStringList CodecNames;
+ static TQStringList CodecNames;
};
}
diff --git a/khexedit/lib/controller/kchareditor.cpp b/khexedit/lib/controller/kchareditor.cpp
index 5b48fc6..7225ec7 100644
--- a/khexedit/lib/controller/kchareditor.cpp
+++ b/khexedit/lib/controller/kchareditor.cpp
@@ -16,7 +16,7 @@
// qt specific
-#include <qevent.h>
+#include <tqevent.h>
// lib specific
#include "kcharcolumn.h"
#include "kcharcodec.h"
@@ -34,17 +34,17 @@ KCharEditor::KCharEditor( KCharColumn *CC, KBufferCursor *BC, KHexEdit *HE, KCon
}
-bool KCharEditor::handleKeyPress( QKeyEvent *KeyEvent )
+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 )) )
{
- QChar C = KeyEvent->text()[0];
+ TQChar C = KeyEvent->text()[0];
if( C.isPrint() )
{
- QByteArray D( 1 );
+ TQByteArray D( 1 );
if( CharColumn->codec()->encode(&D[0],C) )
{
// clearUndoRedoInfo = false;
diff --git a/khexedit/lib/controller/kchareditor.h b/khexedit/lib/controller/kchareditor.h
index 74c3d8d..fba1f66 100644
--- a/khexedit/lib/controller/kchareditor.h
+++ b/khexedit/lib/controller/kchareditor.h
@@ -32,7 +32,7 @@ class KCharEditor : public KEditor
KCharEditor( KCharColumn *CC, KBufferCursor *BC, KHexEdit *HE, KController *P );
public: // KEditor API
- virtual bool handleKeyPress( QKeyEvent *KeyEvent );
+ virtual bool handleKeyPress( TQKeyEvent *KeyEvent );
protected:
KCharColumn *CharColumn;
diff --git a/khexedit/lib/controller/kcontroller.cpp b/khexedit/lib/controller/kcontroller.cpp
index 490da93..b9c42a6 100644
--- a/khexedit/lib/controller/kcontroller.cpp
+++ b/khexedit/lib/controller/kcontroller.cpp
@@ -28,7 +28,7 @@ KController::KController( KHexEdit* HE, KController *P )
{
}
-bool KController::handleKeyPress( QKeyEvent *KeyEvent )
+bool KController::handleKeyPress( TQKeyEvent *KeyEvent )
{
return Parent ? Parent->handleKeyPress( KeyEvent ) : false;
}
diff --git a/khexedit/lib/controller/kcontroller.h b/khexedit/lib/controller/kcontroller.h
index daeb0d5..be1f9fc 100644
--- a/khexedit/lib/controller/kcontroller.h
+++ b/khexedit/lib/controller/kcontroller.h
@@ -32,7 +32,7 @@ class KController
KController( KHexEdit *HE, KController *P );
public: // KController API
- virtual bool handleKeyPress( QKeyEvent *KeyEvent );
+ virtual bool handleKeyPress( TQKeyEvent *KeyEvent );
protected:
KController *Parent;
diff --git a/khexedit/lib/controller/keditor.cpp b/khexedit/lib/controller/keditor.cpp
index 7d4e92f..5678b09 100644
--- a/khexedit/lib/controller/keditor.cpp
+++ b/khexedit/lib/controller/keditor.cpp
@@ -35,7 +35,7 @@ KEditor::KEditor( KBufferCursor *BC, KHexEdit* HE, KController *P )
}
-bool KEditor::handleKeyPress( QKeyEvent *KeyEvent )
+bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent )
{
bool clearUndoRedoInfo = true;
bool ShiftPressed = KeyEvent->state() & Qt::ShiftButton;
diff --git a/khexedit/lib/controller/keditor.h b/khexedit/lib/controller/keditor.h
index dc2b0fd..e4fa06c 100644
--- a/khexedit/lib/controller/keditor.h
+++ b/khexedit/lib/controller/keditor.h
@@ -37,7 +37,7 @@ class KEditor : public KController
KEditor( KBufferCursor *BC, KHexEdit *HE, KController *P );
public: // API
- virtual bool handleKeyPress( QKeyEvent *KeyEvent );
+ virtual bool handleKeyPress( TQKeyEvent *KeyEvent );
protected:
/** executes keyboard Action \a Action. This is normally called by a key event handler. */
diff --git a/khexedit/lib/controller/knavigator.cpp b/khexedit/lib/controller/knavigator.cpp
index 51c8048..d865d12 100644
--- a/khexedit/lib/controller/knavigator.cpp
+++ b/khexedit/lib/controller/knavigator.cpp
@@ -17,7 +17,7 @@
// qt specific
-#include <qevent.h>
+#include <tqevent.h>
// lib specific
#include "kdatabuffer.h"
#include "kbufferranges.h"
@@ -34,7 +34,7 @@ KNavigator::KNavigator( KHexEdit* HE, KController *P )
{
}
-bool KNavigator::handleKeyPress( QKeyEvent *KeyEvent )
+bool KNavigator::handleKeyPress( TQKeyEvent *KeyEvent )
{
bool KeyUsed = true;
diff --git a/khexedit/lib/controller/knavigator.h b/khexedit/lib/controller/knavigator.h
index 4615419..c20cd84 100644
--- a/khexedit/lib/controller/knavigator.h
+++ b/khexedit/lib/controller/knavigator.h
@@ -34,7 +34,7 @@ class KNavigator : public KController
KNavigator( KHexEdit *HE, KController *P );
public: // KEditor API
- virtual bool handleKeyPress( QKeyEvent *KeyEvent );
+ virtual bool handleKeyPress( TQKeyEvent *KeyEvent );
protected:
/** moves the cursor according to the action, handles all drawing */
diff --git a/khexedit/lib/controller/ktabcontroller.cpp b/khexedit/lib/controller/ktabcontroller.cpp
index 76c3051..0531b2c 100644
--- a/khexedit/lib/controller/ktabcontroller.cpp
+++ b/khexedit/lib/controller/ktabcontroller.cpp
@@ -16,7 +16,7 @@
// qt specific
-#include <qevent.h>
+#include <tqevent.h>
// lib specific
#include "kvaluecolumn.h"
#include "kcharcolumn.h"
@@ -33,7 +33,7 @@ KTabController::KTabController( KHexEdit* HE, KController *P )
}
-bool KTabController::handleKeyPress( QKeyEvent *KeyEvent )
+bool KTabController::handleKeyPress( TQKeyEvent *KeyEvent )
{
bool KeyUsed = false;
diff --git a/khexedit/lib/controller/ktabcontroller.h b/khexedit/lib/controller/ktabcontroller.h
index e1898b4..a17d55d 100644
--- a/khexedit/lib/controller/ktabcontroller.h
+++ b/khexedit/lib/controller/ktabcontroller.h
@@ -32,7 +32,7 @@ class KTabController : public KController
KTabController( KHexEdit *HE, KController *P );
public: // API
- virtual bool handleKeyPress( QKeyEvent *KeyEvent );
+ virtual bool handleKeyPress( TQKeyEvent *KeyEvent );
public:
bool tabChangesFocus() const;
diff --git a/khexedit/lib/controller/kvalueeditor.cpp b/khexedit/lib/controller/kvalueeditor.cpp
index ebfb589..3bf4c9b 100644
--- a/khexedit/lib/controller/kvalueeditor.cpp
+++ b/khexedit/lib/controller/kvalueeditor.cpp
@@ -16,7 +16,7 @@
// qt specific
-#include <qevent.h>
+#include <tqevent.h>
// lib specific
#include "kvaluecolumn.h"
#include "kbufferranges.h"
@@ -36,7 +36,7 @@ KValueEditor::KValueEditor( KValueColumn *VC, KBufferCursor *BC, KHexEdit* HE, K
}
-bool KValueEditor::handleKeyPress( QKeyEvent *KeyEvent )
+bool KValueEditor::handleKeyPress( TQKeyEvent *KeyEvent )
{
bool KeyUsed = true;
@@ -79,7 +79,7 @@ bool KValueEditor::handleKeyPress( QKeyEvent *KeyEvent )
if( KeyEvent->text().length() > 0
&& ( !(KeyEvent->state()&( Qt::ControlButton | Qt::AltButton | Qt::MetaButton )) ) )
{
- QChar C = KeyEvent->text()[0];
+ TQChar C = KeyEvent->text()[0];
// no usable char?
if( !C.isLetterOrNumber() )
{
diff --git a/khexedit/lib/controller/kvalueeditor.h b/khexedit/lib/controller/kvalueeditor.h
index 496bcde..4656c36 100644
--- a/khexedit/lib/controller/kvalueeditor.h
+++ b/khexedit/lib/controller/kvalueeditor.h
@@ -39,7 +39,7 @@ class KValueEditor: public KEditor
virtual ~KValueEditor();
public: // KEditor API
- virtual bool handleKeyPress( QKeyEvent *KeyEvent );
+ virtual bool handleKeyPress( TQKeyEvent *KeyEvent );
public:
void reset();
@@ -62,7 +62,7 @@ class KValueEditor: public KEditor
/** stores the old byte value */
unsigned char OldValue;
/** buffer with the */
- QString ByteBuffer;
+ TQString ByteBuffer;
};
inline KValueEditor::~KValueEditor() {}
diff --git a/khexedit/lib/helper.h b/khexedit/lib/helper.h
index 600ac5b..5f2b009 100644
--- a/khexedit/lib/helper.h
+++ b/khexedit/lib/helper.h
@@ -18,12 +18,12 @@
#define KHEXEDIT_HELPER
// qt specific
-#include <qcolor.h>
+#include <tqcolor.h>
// lib specific
#include <khechar.h>
// temporary solution until syntax highlighting is implemented
-static inline QColor colorForChar( const KHE::KHEChar Byte )
+static inline TQColor colorForChar( const KHE::KHEChar Byte )
{
return Byte.isUndefined() ? Qt::yellow : Byte.isPunct() ? Qt::red : Byte.isPrint() ? Qt::black : Qt::blue;
}
diff --git a/khexedit/lib/kbigbuffer.cpp b/khexedit/lib/kbigbuffer.cpp
index 8505ef7..99925da 100644
--- a/khexedit/lib/kbigbuffer.cpp
+++ b/khexedit/lib/kbigbuffer.cpp
@@ -102,7 +102,7 @@ int KBigBuffer::rfind( const char*, int /*Length*/, int /*Pos*/ ) const { return
-bool KBigBuffer::open( const QString& FileName )
+bool KBigBuffer::open( const TQString& FileName )
{
// clear old data
if( isOpen() && !close() ) // only occurs if close somehow fails.
diff --git a/khexedit/lib/kbigbuffer.h b/khexedit/lib/kbigbuffer.h
index 138e64b..63e6ec4 100644
--- a/khexedit/lib/kbigbuffer.h
+++ b/khexedit/lib/kbigbuffer.h
@@ -19,8 +19,8 @@
#define KHE_KBIGBUFFER_H
// qt specific
-#include <qvaluevector.h>
-#include <qfile.h>
+#include <tqvaluevector.h>
+#include <tqfile.h>
// lib specific
#include "kdatabuffer.h"
#include "khexedit_export.h"
@@ -35,7 +35,7 @@ namespace KHE {
class KHEXEDIT_EXPORT KBigBuffer : public KDataBuffer
{
- typedef QValueVector<char *> KPageOfChar;
+ typedef TQValueVector<char *> KPageOfChar;
public:
/** default is only 50*4k = 200k memory image */
@@ -63,12 +63,12 @@ class KHEXEDIT_EXPORT KBigBuffer : public KDataBuffer
virtual int find( const char*KeyData, int Length, KSection Section ) const;
virtual int rfind( const char*, int Length, int Pos = -1 ) const;
-/* virtual int find( const QString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
+/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
public:
void setReadOnly( bool RO = true );
bool isOpen() const;
- bool open (const QString& filename );
+ bool open (const TQString& filename );
bool close();
protected:
@@ -78,7 +78,7 @@ class KHEXEDIT_EXPORT KBigBuffer : public KDataBuffer
protected:
/** */
- mutable QFile File;
+ mutable TQFile File;
/** */
bool ReadOnly:1;
bool IsOpen:1;
diff --git a/khexedit/lib/kbordercoltextexport.cpp b/khexedit/lib/kbordercoltextexport.cpp
index d46490f..b60f249 100644
--- a/khexedit/lib/kbordercoltextexport.cpp
+++ b/khexedit/lib/kbordercoltextexport.cpp
@@ -16,7 +16,7 @@
// qt specific
-#include <qstring.h>
+#include <tqstring.h>
// lib specific
#include "kbordercoltextexport.h"
@@ -31,17 +31,17 @@ int KBorderColTextExport::charsPerLine() const
return BorderColumnTEWidth;
}
-void KBorderColTextExport::printFirstLine( QString &T, int /*Line*/ ) const
+void KBorderColTextExport::printFirstLine( TQString &T, int /*Line*/ ) const
{
print( T );
}
-void KBorderColTextExport::printNextLine( QString &T ) const
+void KBorderColTextExport::printNextLine( TQString &T ) const
{
print( T );
}
-void KBorderColTextExport::print( QString &T ) const
+void KBorderColTextExport::print( TQString &T ) const
{
T.append( " | " );
}
diff --git a/khexedit/lib/kbordercoltextexport.h b/khexedit/lib/kbordercoltextexport.h
index 4103f0b..0fe6c5c 100644
--- a/khexedit/lib/kbordercoltextexport.h
+++ b/khexedit/lib/kbordercoltextexport.h
@@ -26,13 +26,13 @@ namespace KHE
class KBorderColTextExport : public KColTextExport
{
public: // API
- void printFirstLine( QString &T, int Line ) const;
- void printNextLine( QString &T) const;
+ void printFirstLine( TQString &T, int Line ) const;
+ void printNextLine( TQString &T) const;
/** tells how much chars per line are needed */
int charsPerLine() const ;
protected:
- void print( QString &T ) const;
+ void print( TQString &T ) const;
};
}
diff --git a/khexedit/lib/kbordercolumn.cpp b/khexedit/lib/kbordercolumn.cpp
index c590246..d23bfea 100644
--- a/khexedit/lib/kbordercolumn.cpp
+++ b/khexedit/lib/kbordercolumn.cpp
@@ -16,8 +16,8 @@
// qt specific
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
// lib specific
#include "kcolumnsview.h"
#include "kbordercolumn.h"
@@ -41,7 +41,7 @@ KBorderColumn::~KBorderColumn()
}
-void KBorderColumn::paintLine( QPainter *P )
+void KBorderColumn::paintLine( TQPainter *P )
{
if( LineHeight > 0 )
{
@@ -49,7 +49,7 @@ void KBorderColumn::paintLine( QPainter *P )
if( Middle )
{
- int GridColor = View->style().styleHint( QStyle::SH_Table_GridLineColor, View );
+ int GridColor = View->style().styleHint( TQStyle::SH_Table_GridLineColor, View );
P->setPen( GridColor != -1 ? (QRgb)GridColor : View->colorGroup().mid() );
P->drawLine( LineX, 0, LineX, LineHeight-1 ) ;
}
@@ -57,25 +57,25 @@ void KBorderColumn::paintLine( QPainter *P )
}
-void KBorderColumn::paintFirstLine( QPainter *P, KPixelXs , int )
+void KBorderColumn::paintFirstLine( TQPainter *P, KPixelXs , int )
{
paintLine( P );
}
-void KBorderColumn::paintNextLine( QPainter *P )
+void KBorderColumn::paintNextLine( TQPainter *P )
{
paintLine( P );
}
-void KBorderColumn::paintEmptyColumn( QPainter *P, KPixelXs Xs, KPixelYs Ys )
+void KBorderColumn::paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys )
{
KColumn::paintEmptyColumn( P,Xs,Ys );
KPixelX LX = x() + LineX;
if( Middle && Xs.includes(LX) )
{
- int GridColor = View->style().styleHint( QStyle::SH_Table_GridLineColor, View );
+ int GridColor = View->style().styleHint( TQStyle::SH_Table_GridLineColor, View );
P->setPen( GridColor != -1 ? (QRgb)GridColor : View->colorGroup().mid() );
P->drawLine( LX, Ys.start(), LX, Ys.end() ) ;
}
diff --git a/khexedit/lib/kbordercolumn.h b/khexedit/lib/kbordercolumn.h
index 0a72c05..06446f2 100644
--- a/khexedit/lib/kbordercolumn.h
+++ b/khexedit/lib/kbordercolumn.h
@@ -35,12 +35,12 @@ class KBorderColumn : public KColumn
~KBorderColumn();
public: // KColumn-API
- virtual void paintFirstLine( QPainter *P, KPixelXs Xs, int FirstLine );
- virtual void paintNextLine( QPainter *P );
- virtual void paintEmptyColumn( QPainter *P, KPixelXs Xs, KPixelYs Ys );
+ virtual void paintFirstLine( TQPainter *P, KPixelXs Xs, int FirstLine );
+ virtual void paintNextLine( TQPainter *P );
+ virtual void paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys );
protected:
- virtual void paintLine( QPainter *P );
+ virtual void paintLine( TQPainter *P );
protected:
/** true if we are between two columns and should show a line */
diff --git a/khexedit/lib/kbuffercoltextexport.cpp b/khexedit/lib/kbuffercoltextexport.cpp
index a4ee91f..142504c 100644
--- a/khexedit/lib/kbuffercoltextexport.cpp
+++ b/khexedit/lib/kbuffercoltextexport.cpp
@@ -28,9 +28,9 @@ using namespace KHE;
static const int DefaultTEByteSpacingWidth = 1;
static const int TEGroupSpacingWidth = 3;
-QString KBufferColTextExport::whiteSpace( uint s )
+TQString KBufferColTextExport::whiteSpace( uint s )
{
- return QString().fill( ' ', s );
+ return TQString().fill( ' ', s );
}
KBufferColTextExport::KBufferColTextExport( const KBufferColumn* BufferColumn, const char *D,
@@ -86,7 +86,7 @@ int KBufferColTextExport::charsPerLine() const
}
-void KBufferColTextExport::printFirstLine( QString &T, int Line ) const
+void KBufferColTextExport::printFirstLine( TQString &T, int Line ) const
{
PrintLine = Line;
PrintData = Data;
@@ -94,13 +94,13 @@ void KBufferColTextExport::printFirstLine( QString &T, int Line ) const
}
-void KBufferColTextExport::printNextLine( QString &T ) const
+void KBufferColTextExport::printNextLine( TQString &T ) const
{
print( T );
}
-void KBufferColTextExport::print( QString &T ) const
+void KBufferColTextExport::print( TQString &T ) const
{
T.append( whiteSpace(NoOfCharsPerLine) );
++PrintLine;
diff --git a/khexedit/lib/kbuffercoltextexport.h b/khexedit/lib/kbuffercoltextexport.h
index 6cb161d..d26b21c 100644
--- a/khexedit/lib/kbuffercoltextexport.h
+++ b/khexedit/lib/kbuffercoltextexport.h
@@ -19,7 +19,7 @@
#define KHE_KBUFFERCOLTEXTEXPORT_H
// qt specific
-#include <qstring.h>
+#include <tqstring.h>
// lib specific
#include "kcoltextexport.h"
#include "kcoordrange.h"
@@ -38,18 +38,18 @@ class KBufferColTextExport : public KColTextExport
virtual ~KBufferColTextExport();
public: // API
- void printFirstLine( QString &T, int Line ) const;
- void printNextLine( QString &T ) const;
+ void printFirstLine( TQString &T, int Line ) const;
+ void printNextLine( TQString &T ) const;
/** tells how much chars per line are needed */
int charsPerLine() const;
protected: // API to be reimplemented by subclasses
- virtual void print( QString &T ) const;
+ virtual void print( TQString &T ) const;
protected:
- static QString whiteSpace( uint s );
+ static TQString whiteSpace( uint s );
protected:
const char *Data;
diff --git a/khexedit/lib/kbuffercolumn.cpp b/khexedit/lib/kbuffercolumn.cpp
index 4291e00..d4f58d9 100644
--- a/khexedit/lib/kbuffercolumn.cpp
+++ b/khexedit/lib/kbuffercolumn.cpp
@@ -18,7 +18,7 @@
//#include <kdebug.h>
// qt specific
-#include <qpainter.h>
+#include <tqpainter.h>
// lib specific
#include "kcolumnsview.h"
#include "kbuffercursor.h"
@@ -362,7 +362,7 @@ void KBufferColumn::preparePainting( KPixelXs Xs )
}
-void KBufferColumn::paintFirstLine( QPainter *P, KPixelXs Xs, int FirstLine )
+void KBufferColumn::paintFirstLine( TQPainter *P, KPixelXs Xs, int FirstLine )
{
preparePainting( Xs );
@@ -375,14 +375,14 @@ void KBufferColumn::paintFirstLine( QPainter *P, KPixelXs Xs, int FirstLine )
}
-void KBufferColumn::paintNextLine( QPainter *P )
+void KBufferColumn::paintNextLine( TQPainter *P )
{
// paintPositions( P, PaintLine++, PaintPositions );
paintLine( P, PaintLine++ );
}
-void KBufferColumn::paintLine( QPainter *P, int Line ) // TODO: could be removed???
+void KBufferColumn::paintLine( TQPainter *P, int Line ) // TODO: could be removed???
{
// kdDebug(1501) << "paintLine line: "<<Line<<" Start: "<<PaintPositions.start()<<" End: "<<PaintPositions.end() << "\n";
// no bytes to paint?
@@ -393,9 +393,9 @@ void KBufferColumn::paintLine( QPainter *P, int Line ) // TODO: could be removed
}
-void KBufferColumn::paintPositions( QPainter *P, int Line, KSection Pos )
+void KBufferColumn::paintPositions( TQPainter *P, int Line, KSection Pos )
{
- const QColorGroup &CG = View->colorGroup();
+ const TQColorGroup &CG = View->colorGroup();
// clear background
unsigned int BlankFlag = (Pos.start()!=0?StartsBefore:0) | (Pos.end()!=LastPos?EndsLater:0);
@@ -481,7 +481,7 @@ void KBufferColumn::paintPositions( QPainter *P, int Line, KSection Pos )
}
-void KBufferColumn::paintPlain( QPainter *P, KSection Positions, int Index )
+void KBufferColumn::paintPlain( TQPainter *P, KSection Positions, int Index )
{
// paint all the bytes affected
for( int p=Positions.start(); p<=Positions.end(); ++p,++Index )
@@ -499,13 +499,13 @@ void KBufferColumn::paintPlain( QPainter *P, KSection Positions, int Index )
}
-void KBufferColumn::paintSelection( QPainter *P, KSection Positions, int Index, int Flag )
+void KBufferColumn::paintSelection( TQPainter *P, KSection Positions, int Index, int Flag )
{
- const QColorGroup &CG = View->colorGroup();
+ const TQColorGroup &CG = View->colorGroup();
paintRange( P, CG.highlight(), Positions, Flag );
- const QColor &HTC = CG.highlightedText();
+ const TQColor &HTC = CG.highlightedText();
// paint all the bytes affected
for( int p=Positions.start(); p<=Positions.end(); ++p,++Index )
{
@@ -522,13 +522,13 @@ void KBufferColumn::paintSelection( QPainter *P, KSection Positions, int Index,
}
-void KBufferColumn::paintMarking( QPainter *P, KSection Positions, int Index, int Flag )
+void KBufferColumn::paintMarking( TQPainter *P, KSection Positions, int Index, int Flag )
{
- const QColorGroup &CG = View->colorGroup();
+ const TQColorGroup &CG = View->colorGroup();
paintRange( P, CG.text(), Positions, Flag );
- const QColor &BC = CG.base();
+ const TQColor &BC = CG.base();
// paint all the bytes affected
for( int p=Positions.start(); p<=Positions.end(); ++p,++Index )
{
@@ -546,7 +546,7 @@ void KBufferColumn::paintMarking( QPainter *P, KSection Positions, int Index, in
// TODO: smarter calculation
-void KBufferColumn::paintGrid( QPainter *P, KSection Range )
+void KBufferColumn::paintGrid( TQPainter *P, KSection Range )
{
int st = 0; // counter for spacing triggering
P->setPen( Qt::black );
@@ -567,23 +567,23 @@ void KBufferColumn::paintGrid( QPainter *P, KSection Range )
}
-void KBufferColumn::paintRange( QPainter *P, const QColor &Color, KSection Positions, int Flag )
+void KBufferColumn::paintRange( TQPainter *P, const TQColor &Color, KSection Positions, int Flag )
{
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, QBrush(Color,Qt::SolidPattern) );
+ P->fillRect( RangeX,0,RangeW,LineHeight, TQBrush(Color,Qt::SolidPattern) );
}
-void KBufferColumn::paintByte( QPainter *P, int Index )
+void KBufferColumn::paintByte( TQPainter *P, int Index )
{
char Byte = ( Index > -1 ) ? Buffer->datum( Index ) : EmptyByte;
KHEChar B = Codec->decode( Byte );
- const QColorGroup &CG = View->colorGroup();
- QColor Color = CG.text();
- QBrush Brush( CG.base(), Qt::SolidPattern );
+ const TQColorGroup &CG = View->colorGroup();
+ TQColor Color = CG.text();
+ TQBrush Brush( CG.base(), Qt::SolidPattern );
if( Index > -1 )
{
@@ -611,7 +611,7 @@ void KBufferColumn::paintByte( QPainter *P, int Index )
}
-void KBufferColumn::paintFramedByte( QPainter *P, int Index, KFrameStyle FrameStyle )
+void KBufferColumn::paintFramedByte( TQPainter *P, int Index, KFrameStyle FrameStyle )
{
paintByte( P, Index );
char Byte = ( Index > -1 ) ? Buffer->datum( Index ) : EmptyByte;
@@ -627,15 +627,15 @@ void KBufferColumn::paintFramedByte( QPainter *P, int Index, KFrameStyle FrameSt
}
-void KBufferColumn::paintCursor( QPainter *P, int Index )
+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, QBrush(colorForChar(B),Qt::SolidPattern) );
+ P->fillRect( 0, 0, ByteWidth, LineHeight, TQBrush(colorForChar(B),Qt::SolidPattern) );
}
-void KBufferColumn::drawByte( QPainter *P, char /*Byte*/, KHEChar B, const QColor &Color ) const
+void KBufferColumn::drawByte( TQPainter *P, char /*Byte*/, KHEChar B, const TQColor &Color ) const
{
P->setPen( Color );
P->drawText( 0, DigitBaseLine, B );
diff --git a/khexedit/lib/kbuffercolumn.h b/khexedit/lib/kbuffercolumn.h
index 76ed8bc..37a495a 100644
--- a/khexedit/lib/kbuffercolumn.h
+++ b/khexedit/lib/kbuffercolumn.h
@@ -55,28 +55,28 @@ class KBufferColumn : public KColumn
public: // KColumn-API
- virtual void paintFirstLine( QPainter *P, KPixelXs Xs, int FirstLine );
- virtual void paintNextLine( QPainter *P );
+ virtual void paintFirstLine( TQPainter *P, KPixelXs Xs, int FirstLine );
+ virtual void paintNextLine( TQPainter *P );
public:
void preparePainting( KPixelXs Xs );
public:
- void paintLine( QPainter *P, int Line );
- void paintPositions( QPainter *P, int Line, KSection Positions );
+ void paintLine( TQPainter *P, int Line );
+ void paintPositions( TQPainter *P, int Line, KSection Positions );
/** paints a cursor based on the type of the byte.
* @param Index Index of the byte to paint the cursor for. If -1 a space is used as char.
*/
- void paintCursor( QPainter *P, int Index );
+ void paintCursor( TQPainter *P, int Index );
/** paints the byte with background.
* @param Index Index of the byte to paint. If -1 only the background is painted.
*/
- void paintByte( QPainter *P, int Index );
+ void paintByte( TQPainter *P, int Index );
/** paints the byte with background and a frame around.
* @param Index Index of the byte to paint the frame for. If -1 a space is used as char.
* @param Style the style of the framing
*/
- void paintFramedByte( QPainter *P, int Index, KFrameStyle Style );
+ void paintFramedByte( TQPainter *P, int Index, KFrameStyle Style );
public: // modification access
@@ -165,17 +165,17 @@ class KBufferColumn : public KColumn
protected: // API to be refined
/** default implementation simply prints the byte as ASCII */
- virtual void drawByte( QPainter *P, char Byte, KHEChar B, const QColor &Color ) const;
+ virtual void drawByte( TQPainter *P, char Byte, KHEChar B, const TQColor &Color ) const;
/** default implementation sets byte width to one digit width */
virtual void recalcByteWidth();
protected:
- void paintGrid( QPainter *P, KSection Range );
- void paintPlain( QPainter *P, KSection Positions, int Index );
- void paintSelection( QPainter *P, KSection Positions, int Index, int Flag );
- void paintMarking( QPainter *P, KSection Positions, int Index, int Flag );
- void paintRange( QPainter *P, const QColor &Color, KSection Positions, int Flag );
+ void paintGrid( TQPainter *P, KSection Range );
+ void paintPlain( TQPainter *P, KSection Positions, int Index );
+ void paintSelection( TQPainter *P, KSection Positions, int Index, int Flag );
+ void paintMarking( TQPainter *P, KSection Positions, int Index, int Flag );
+ void paintRange( TQPainter *P, const TQColor &Color, KSection Positions, int Flag );
bool isSelected( KSection Range, KSection *Selection, unsigned int *Flag ) const;
bool isMarked( KSection Range, KSection *Marking, unsigned int *Flag ) const;
diff --git a/khexedit/lib/kbufferdrag.cpp b/khexedit/lib/kbufferdrag.cpp
index 199982c..3fb3cff 100644
--- a/khexedit/lib/kbufferdrag.cpp
+++ b/khexedit/lib/kbufferdrag.cpp
@@ -16,8 +16,8 @@
// qt specific
-#include <qcstring.h>
-#include <qtextcodec.h>
+#include <tqcstring.h>
+#include <tqtextcodec.h>
// kde specific
#include <kglobal.h>
#include <klocale.h>
@@ -43,11 +43,11 @@ static const char TextPlainLocalStub[] = "text/plain;charset=";
// creates the name for the local text/plain
static const char *localTextPlain()
{
- static QCString TextPlainLocal;
+ static TQCString TextPlainLocal;
if( TextPlainLocal.isNull() )
{
- TextPlainLocal = QCString(KGlobal::locale()->encoding()).lower();
+ TextPlainLocal = TQCString(KGlobal::locale()->encoding()).lower();
// remove the whitespaces
int s;
while( (s=TextPlainLocal.find(' ')) >= 0 )
@@ -60,18 +60,18 @@ static const char *localTextPlain()
}
// tries to create a codec by the given charset description
-static QTextCodec* codecForCharset( const QCString& Desc )
+static TQTextCodec* codecForCharset( const TQCString& Desc )
{
int i = Desc.find( "charset=" );
if( i >= 0 )
{
- QCString CharSetName = Desc.mid( i+8 );
+ TQCString CharSetName = Desc.mid( i+8 );
// remove any further attributes
if( (i=CharSetName.find( ';' )) >= 0 )
CharSetName = CharSetName.left( i );
// try to find codec
- return QTextCodec::codecForName( CharSetName );
+ return TQTextCodec::codecForName( CharSetName );
}
// no charset=, use locale
return KGlobal::locale()->codecForEncoding();
@@ -79,11 +79,11 @@ static QTextCodec* codecForCharset( const QCString& Desc )
-KBufferDrag::KBufferDrag( const QByteArray &D, KCoordRange Range,
+KBufferDrag::KBufferDrag( const TQByteArray &D, KCoordRange Range,
const KOffsetColumn *OC, const KValueColumn *HC, const KCharColumn *TC,
- QChar SC, QChar UC, const QString &CN,
- QWidget *Source, const char *Name )
- :QDragObject( Source, Name ),
+ TQChar SC, TQChar UC, const TQString &CN,
+ TQWidget *Source, const char *Name )
+ :TQDragObject( Source, Name ),
CoordRange( Range ),
NoOfCol( 0 ),
SubstituteChar( SC ),
@@ -119,7 +119,7 @@ KBufferDrag::~KBufferDrag()
-void KBufferDrag::setData( const QByteArray &D )
+void KBufferDrag::setData( const TQByteArray &D )
{
Data = D;
}
@@ -135,7 +135,7 @@ const char *KBufferDrag::format( int i ) const
}
-QByteArray KBufferDrag::encodedData( const char *Format ) const
+TQByteArray KBufferDrag::encodedData( const char *Format ) const
{
if( Format != 0 )
{
@@ -146,19 +146,19 @@ QByteArray KBufferDrag::encodedData( const char *Format ) const
// plain text wanted?
if( qstrncmp(Format,TextPlain,10) == 0 )
{
- QCString Output;
- QTextCodec *TextCodec = codecForCharset( QCString(Format).lower() );
+ TQCString Output;
+ TQTextCodec *TextCodec = codecForCharset( TQCString(Format).lower() );
if( TextCodec == 0 )
return Output;
- QString Text;
+ TQString Text;
// plain copy?
if( NoOfCol == 0 )
{
// duplicate the data and substitute all non-printable items with a space
KCharCodec *CharCodec = KCharCodec::createCodec( CodecName );
- static const QChar Tab('\t');
- static const QChar Return('\n');
+ static const TQChar Tab('\t');
+ static const TQChar Return('\n');
uint Size = Data.size();
Text.setLength( Size );
@@ -201,20 +201,20 @@ QByteArray KBufferDrag::encodedData( const char *Format ) const
// fix end
//if( TextCodec->mibEnum() != 1000 )
//{
- // Don't include NUL in size (QCString::resize() adds NUL)
- // ((QByteArray&)Output).resize( Output.length() );
+ // Don't include NUL in size (TQCString::resize() adds NUL)
+ // ((TQByteArray&)Output).resize( Output.length() );
//}
return Output;
}
}
// return empty dummy
- return QByteArray();
+ return TQByteArray();
}
-bool KBufferDrag::canDecode( const QMimeSource* Source )
+bool KBufferDrag::canDecode( const TQMimeSource* Source )
{
bool c =( Source->provides(OctetStream) /*|| Source->provides(TextPlain)*/ );
return c;
@@ -222,7 +222,7 @@ bool KBufferDrag::canDecode( const QMimeSource* Source )
}
-bool KBufferDrag::decode( const QMimeSource* Source, QByteArray &Dest )
+bool KBufferDrag::decode( const TQMimeSource* Source, TQByteArray &Dest )
{
// Dest = Source->encodedData( MediaString );
// return Dest.size() != 0;
diff --git a/khexedit/lib/kbufferdrag.h b/khexedit/lib/kbufferdrag.h
index 86c498f..d04bca6 100644
--- a/khexedit/lib/kbufferdrag.h
+++ b/khexedit/lib/kbufferdrag.h
@@ -19,7 +19,7 @@
#define KHE_KBUFFERDRAG_H
// qt specific
-#include <qdragobject.h>
+#include <tqdragobject.h>
// lib specific
#include "khe.h"
#include "kcoordrange.h"
@@ -43,32 +43,32 @@ class KBufferDrag : public QDragObject
public:
// TODO: make this call somewhat more generic
- KBufferDrag( const QByteArray &, KCoordRange Range,
+ KBufferDrag( const TQByteArray &, KCoordRange Range,
const KOffsetColumn *OC, const KValueColumn *HC, const KCharColumn *TC,
- QChar SC, QChar UC, const QString &CN,
- QWidget *Source = 0, const char *Name = 0 );
+ TQChar SC, TQChar UC, const TQString &CN,
+ TQWidget *Source = 0, const char *Name = 0 );
~KBufferDrag();
- public: // QDragObject API
+ public: // TQDragObject API
virtual const char *format( int i ) const;
- virtual QByteArray encodedData( const char* ) const;
+ virtual TQByteArray encodedData( const char* ) const;
public:
- virtual void setData( const QByteArray &);
+ virtual void setData( const TQByteArray &);
public:
- static bool canDecode( const QMimeSource* Source );
- static bool decode( const QMimeSource* Source, QByteArray &Dest );
+ static bool canDecode( const TQMimeSource* Source );
+ static bool decode( const TQMimeSource* Source, TQByteArray &Dest );
protected:
- QByteArray Data;
+ TQByteArray Data;
KCoordRange CoordRange;
/** collection of all the columns. All columns will be autodeleted. */
KColTextExportPtr Columns[5];
uint NoOfCol;
- QChar SubstituteChar;
- QChar UndefinedChar;
- const QString &CodecName;
+ TQChar SubstituteChar;
+ TQChar UndefinedChar;
+ const TQString &CodecName;
};
}
diff --git a/khexedit/lib/kbytecodec.h b/khexedit/lib/kbytecodec.h
index fc4e1b3..f966ac5 100644
--- a/khexedit/lib/kbytecodec.h
+++ b/khexedit/lib/kbytecodec.h
@@ -19,7 +19,7 @@
#define KHE_KBYTECODEC_H
#include "khe.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace KHE
{
@@ -49,9 +49,9 @@ class KByteCodec
virtual unsigned char digitsFilledLimit() const = 0;
/** encodes the Char and writes the result to */
- virtual void encode( QString &Digits, unsigned int Pos, const unsigned char Char ) const = 0;
+ virtual void encode( TQString &Digits, unsigned int Pos, const unsigned char Char ) const = 0;
/** */
- virtual void encodeShort( QString &Digits, unsigned int Pos, const unsigned char Char ) const = 0;
+ virtual void encodeShort( TQString &Digits, unsigned int Pos, const unsigned char Char ) const = 0;
/** */
virtual bool appendDigit( unsigned char *Byte, const unsigned char Digit ) const = 0;
@@ -65,7 +65,7 @@ class KByteCodec
public:
/** */
- uint decode( unsigned char *Char, const QString &Digits, uint Pos ) const;
+ uint decode( unsigned char *Char, const TQString &Digits, uint Pos ) const;
};
}
diff --git a/khexedit/lib/kbytesedit.cpp b/khexedit/lib/kbytesedit.cpp
index 40b57a1..3eb49bd 100644
--- a/khexedit/lib/kbytesedit.cpp
+++ b/khexedit/lib/kbytesedit.cpp
@@ -24,14 +24,14 @@
using namespace KHE;
-KBytesEdit::KBytesEdit( char *D, int DS_, int RS_, bool KM, QWidget *Parent, const char *Name, WFlags F )
+KBytesEdit::KBytesEdit( char *D, int DS_, int RS_, bool KM, TQWidget *Parent, const char *Name, WFlags F )
: KHexEdit( 0L, Parent, Name, F ),
AutoDelete( false )
{
setData( D, DS_, RS_, KM );
}
-KBytesEdit::KBytesEdit( char *D, int DS_, QWidget *Parent, const char *Name, WFlags F )
+KBytesEdit::KBytesEdit( char *D, int DS_, TQWidget *Parent, const char *Name, WFlags F )
: KHexEdit( 0L, Parent, Name, F ),
AutoDelete( false )
{
@@ -39,7 +39,7 @@ KBytesEdit::KBytesEdit( char *D, int DS_, QWidget *Parent, const char *Name, WFl
}
-KBytesEdit::KBytesEdit( QWidget *Parent, const char *Name, WFlags F )
+KBytesEdit::KBytesEdit( TQWidget *Parent, const char *Name, WFlags F )
: KHexEdit( 0L, Parent, Name, F ),
AutoDelete( false )
{
diff --git a/khexedit/lib/kbytesedit.h b/khexedit/lib/kbytesedit.h
index daf8b6e..e57d73a 100644
--- a/khexedit/lib/kbytesedit.h
+++ b/khexedit/lib/kbytesedit.h
@@ -73,7 +73,7 @@ class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit
* @param Name name for this widget
* @param F flags
*/
- KBytesEdit( char *D, int DS_, int RS_, bool KM, QWidget *Parent = 0, const char *Name = 0, WFlags F = 0 );
+ KBytesEdit( char *D, int DS_, int RS_, bool KM, TQWidget *Parent = 0, const char *Name = 0, WFlags F = 0 );
/** hands over to the editor a new byte array.
* If there exists an old one and autodelete is set the old one gets deleted.
* @param D pointer to memory
@@ -81,7 +81,7 @@ class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit
* @param RS_ real size of the memory
* @param KM keep the memory on resize (RS_ is the maximum size)
*/
- KBytesEdit( char *D, int DS_, QWidget *Parent = 0, const char *Name = 0, WFlags F = 0 );
+ KBytesEdit( char *D, int DS_, TQWidget *Parent = 0, const char *Name = 0, WFlags F = 0 );
/** hands over to the editor a new byte array.
* If there exists an old one and autodelete is set the old one gets deleted.
* @param D pointer to memory
@@ -89,7 +89,7 @@ class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit
* @param RS_ real size of the memory
* @param KM keep the memory on resize (RS_ is the maximum size)
*/
- KBytesEdit( QWidget *Parent = 0, const char *Name = 0, WFlags F = 0 );
+ KBytesEdit( TQWidget *Parent = 0, const char *Name = 0, WFlags F = 0 );
virtual ~KBytesEdit();
diff --git a/khexedit/lib/kcharcodec.h b/khexedit/lib/kcharcodec.h
index 9d1b628..15d47aa 100644
--- a/khexedit/lib/kcharcodec.h
+++ b/khexedit/lib/kcharcodec.h
@@ -19,7 +19,7 @@
#define KHE_KCHARCODEC_H
// qt specific
-#include <qstringlist.h>
+#include <tqstringlist.h>
// lib specific
#include "khe.h"
#include "khechar.h"
@@ -35,18 +35,18 @@ class KHEXEDIT_EXPORT KCharCodec
/** */
static KCharCodec* createCodec( KEncoding E );
/** */
- static KCharCodec* createCodec( const QString &Name );
+ static KCharCodec* createCodec( const TQString &Name );
- static const QStringList &codecNames();
+ static const TQStringList &codecNames();
public: // API to be implemented
virtual KHEChar decode( char Byte ) const = 0;
- virtual bool encode( char *D, const QChar &C ) const = 0;
- virtual const QString& name() const = 0;
+ virtual bool encode( char *D, const TQChar &C ) const = 0;
+ virtual const TQString& name() const = 0;
protected:
/** */
- static QStringList CodecNames;
+ static TQStringList CodecNames;
};
}
diff --git a/khexedit/lib/kcharcoltextexport.cpp b/khexedit/lib/kcharcoltextexport.cpp
index bc4a60e..d53d187 100644
--- a/khexedit/lib/kcharcoltextexport.cpp
+++ b/khexedit/lib/kcharcoltextexport.cpp
@@ -24,7 +24,7 @@
using namespace KHE;
-KCharColTextExport::KCharColTextExport( const KCharColumn* TC, const char *D, KCoordRange CR, const QString &CodecName )
+KCharColTextExport::KCharColTextExport( const KCharColumn* TC, const char *D, KCoordRange CR, const TQString &CodecName )
: KBufferColTextExport( TC, D, CR, 1 ),
CharCodec( KCharCodec::createCodec(CodecName) ),
SubstituteChar( TC->substituteChar() ),
@@ -39,7 +39,7 @@ KCharColTextExport::~KCharColTextExport()
}
-void KCharColTextExport::print( QString &T ) const
+void KCharColTextExport::print( TQString &T ) const
{
int p = 0;
int pEnd = NoOfBytesPerLine;
diff --git a/khexedit/lib/kcharcoltextexport.h b/khexedit/lib/kcharcoltextexport.h
index 05a570c..7d9da2f 100644
--- a/khexedit/lib/kcharcoltextexport.h
+++ b/khexedit/lib/kcharcoltextexport.h
@@ -33,16 +33,16 @@ class KCharCodec;
class KCharColTextExport : public KBufferColTextExport
{
public:
- KCharColTextExport( const KCharColumn* BF, const char *D, KCoordRange CR, const QString &CodecName );
+ KCharColTextExport( const KCharColumn* BF, const char *D, KCoordRange CR, const TQString &CodecName );
virtual ~KCharColTextExport();
protected: //API
- virtual void print( QString &T ) const;
+ virtual void print( TQString &T ) const;
protected:
KCharCodec *CharCodec;
- QChar SubstituteChar;
- QChar UndefinedChar;
+ TQChar SubstituteChar;
+ TQChar UndefinedChar;
};
}
diff --git a/khexedit/lib/kcharcolumn.cpp b/khexedit/lib/kcharcolumn.cpp
index 9ecbd5a..10105a0 100644
--- a/khexedit/lib/kcharcolumn.cpp
+++ b/khexedit/lib/kcharcolumn.cpp
@@ -18,7 +18,7 @@
// c specific
#include <ctype.h>
// qt specific
-#include <qpainter.h>
+#include <tqpainter.h>
// kde specific
#include <kcharsets.h>
#include <klocale.h>
@@ -33,8 +33,8 @@
using namespace KHE;
static const bool DefaultShowUnprintable = false;
-static const QChar DefaultSubstituteChar = (char)'.';
-static const QChar DefaultUndefinedChar = (char)'?';
+static const TQChar DefaultSubstituteChar = (char)'.';
+static const TQChar DefaultUndefinedChar = (char)'?';
KCharColumn::KCharColumn( KColumnsView *CV, KDataBuffer *B, KBufferLayout *L, KBufferRanges *R )
@@ -51,10 +51,10 @@ KCharColumn::~KCharColumn()
{
}
-void KCharColumn::drawByte( QPainter *P, char /*Byte*/, KHEChar B, const QColor &Color ) const
+void KCharColumn::drawByte( TQPainter *P, char /*Byte*/, KHEChar B, const TQColor &Color ) const
{
// make a drawable String out of it
- QString BS( B.isUndefined() ? KHEChar(UndefinedChar) : ( !(ShowUnprintable || B.isPrint()) ? KHEChar(SubstituteChar) : B ));
+ TQString BS( B.isUndefined() ? KHEChar(UndefinedChar) : ( !(ShowUnprintable || B.isPrint()) ? KHEChar(SubstituteChar) : B ));
P->setPen( Color );
P->drawText( 0, DigitBaseLine, BS );
diff --git a/khexedit/lib/kcharcolumn.h b/khexedit/lib/kcharcolumn.h
index 1e875b0..e196cf9 100644
--- a/khexedit/lib/kcharcolumn.h
+++ b/khexedit/lib/kcharcolumn.h
@@ -19,7 +19,7 @@
#define KHE_KCHARCOLUMN_H
// qt specific
-#include <qstring.h>
+#include <tqstring.h>
// lib specific
#include "kbuffercolumn.h"
@@ -52,11 +52,11 @@ class KCharColumn : public KBufferColumn
/** sets the substitute character for "unprintable" chars
* returns true if there was a change
*/
- bool setSubstituteChar( QChar SC );
+ bool setSubstituteChar( TQChar SC );
/** sets the undefined character for "undefined" chars
* returns true if there was a change
*/
- bool setUndefinedChar( QChar UC );
+ bool setUndefinedChar( TQChar UC );
public: // value access
@@ -65,29 +65,29 @@ class KCharColumn : public KBufferColumn
*/
bool showUnprintable() const;
/** returns the actually used substitute character for "unprintable" chars, default is '.' */
- QChar substituteChar() const;
+ TQChar substituteChar() const;
/** returns the actually used undefined character for "undefined" chars, default is '?' */
- QChar undefinedChar() const;
+ TQChar undefinedChar() const;
protected: // KBufferColumn API
- virtual void drawByte( QPainter *P, char Byte, KHEChar B, const QColor &Color ) const;
+ virtual void drawByte( TQPainter *P, char Byte, KHEChar B, const TQColor &Color ) const;
protected:
/** */
bool ShowUnprintable;
/** */
- QChar SubstituteChar;
+ TQChar SubstituteChar;
/** */
- QChar UndefinedChar;
+ TQChar UndefinedChar;
};
inline bool KCharColumn::showUnprintable() const { return ShowUnprintable; }
-inline QChar KCharColumn::substituteChar() const { return SubstituteChar; }
-inline QChar KCharColumn::undefinedChar() const { return UndefinedChar; }
+inline TQChar KCharColumn::substituteChar() const { return SubstituteChar; }
+inline TQChar KCharColumn::undefinedChar() const { return UndefinedChar; }
-inline bool KCharColumn::setSubstituteChar( QChar SC )
+inline bool KCharColumn::setSubstituteChar( TQChar SC )
{
if( SubstituteChar == SC )
return false;
@@ -95,7 +95,7 @@ inline bool KCharColumn::setSubstituteChar( QChar SC )
return true;
}
-inline bool KCharColumn::setUndefinedChar( QChar UC )
+inline bool KCharColumn::setUndefinedChar( TQChar UC )
{
if( UndefinedChar == UC )
return false;
diff --git a/khexedit/lib/kcoltextexport.h b/khexedit/lib/kcoltextexport.h
index d0b3918..0042bae 100644
--- a/khexedit/lib/kcoltextexport.h
+++ b/khexedit/lib/kcoltextexport.h
@@ -29,8 +29,8 @@ namespace KHE
class KColTextExport
{
public: // API
- virtual void printFirstLine( QString &T, int Line ) const = 0;
- virtual void printNextLine( QString &T ) const = 0;
+ virtual void printFirstLine( TQString &T, int Line ) const = 0;
+ virtual void printNextLine( TQString &T ) const = 0;
/** tells how much chars per line are needed */
virtual int charsPerLine() const = 0;
};
diff --git a/khexedit/lib/kcolumn.cpp b/khexedit/lib/kcolumn.cpp
index f9b0ce5..c23f935 100644
--- a/khexedit/lib/kcolumn.cpp
+++ b/khexedit/lib/kcolumn.cpp
@@ -16,7 +16,7 @@
// qt specific
-#include <qpainter.h>
+#include <tqpainter.h>
// lib specific
#include "kcolumnsview.h"
#include "kcolumn.h"
@@ -34,26 +34,26 @@ KColumn::KColumn( KColumnsView *V )
}
-void KColumn::paintFirstLine( QPainter *P, KPixelXs, int /*FirstLine*/ )
+void KColumn::paintFirstLine( TQPainter *P, KPixelXs, int /*FirstLine*/ )
{
paintBlankLine( P );
}
-void KColumn::paintNextLine( QPainter *P )
+void KColumn::paintNextLine( TQPainter *P )
{
paintBlankLine( P );
}
-void KColumn::paintBlankLine( QPainter *P ) const
+void KColumn::paintBlankLine( TQPainter *P ) const
{
if( LineHeight > 0 )
P->fillRect( 0,0,width(),LineHeight, View->backgroundBrush() );
}
-void KColumn::paintEmptyColumn( QPainter *P, KPixelXs Xs, KPixelYs Ys )
+void KColumn::paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys )
{
Xs.restrictTo( XSpan );
P->fillRect( Xs.start(), Ys.start(), Xs.width(), Ys.width(), View->backgroundBrush() );
diff --git a/khexedit/lib/kcolumn.h b/khexedit/lib/kcolumn.h
index 37c3118..ea219c6 100644
--- a/khexedit/lib/kcolumn.h
+++ b/khexedit/lib/kcolumn.h
@@ -55,14 +55,14 @@ class KColumn
* @param cw
* @param FirstLine no of the first of the range of lines to paint
*/
- virtual void paintFirstLine( QPainter *P, KPixelXs Xs, int FirstLine );
+ virtual void paintFirstLine( TQPainter *P, KPixelXs Xs, int FirstLine );
/** the actual painting call for a column's line.
* The default implementation simply paints the background
*/
- virtual void paintNextLine( QPainter *P );
+ virtual void paintNextLine( TQPainter *P );
/** */
- virtual void paintEmptyColumn( QPainter *P, KPixelXs Xs, KPixelYs Ys );
+ virtual void paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys );
public: // modification access
/** sets starting point of the column */
@@ -92,7 +92,7 @@ class KColumn
/** sets width of the column */
void setWidth( KPixelX W );
/** */
- void paintBlankLine( QPainter *P ) const;
+ void paintBlankLine( TQPainter *P ) const;
protected: // general column data
/** pointer to the view */
diff --git a/khexedit/lib/kcolumnsview.cpp b/khexedit/lib/kcolumnsview.cpp
index 1c93af8..c855b51 100644
--- a/khexedit/lib/kcolumnsview.cpp
+++ b/khexedit/lib/kcolumnsview.cpp
@@ -18,7 +18,7 @@
//#include <kdebug.h>
// qt specific
-#include <qpainter.h>
+#include <tqpainter.h>
// lib specific
#include "kcolumn.h"
#include "kcolumnsview.h"
@@ -28,8 +28,8 @@ using namespace KHE;
static bool DefaultHorizontalGrid = false;
-KColumnsView::KColumnsView( /*bool R,*/ QWidget *Parent, const char *Name, WFlags Flags )
- : QScrollView( Parent, Name, Flags | WRepaintNoErase /*| WStaticContents*/ ),
+KColumnsView::KColumnsView( /*bool R,*/ TQWidget *Parent, const char *Name, WFlags Flags )
+ : TQScrollView( Parent, Name, Flags | WRepaintNoErase /*| WStaticContents*/ ),
NoOfLines( 0 ),
LineHeight( 0 ),
TotalWidth( 0 ),
@@ -136,13 +136,13 @@ void KColumnsView::repaintView()
}
-void KColumnsView::paintEmptyArea( QPainter *P, int cx ,int cy, int cw, int ch)
+void KColumnsView::paintEmptyArea( TQPainter *P, int cx ,int cy, int cw, int ch)
{
P->fillRect( cx, cy, cw, ch, backgroundBrush() );
}
-void KColumnsView::drawContents( QPainter *P, int cx, int cy, int cw, int ch )
+void KColumnsView::drawContents( TQPainter *P, int cx, int cy, int cw, int ch )
{
//kdDebug(1501) << "drawContents(" << cx<<","<<cw<<"#"<<cy<<","<<ch<<")\n";
KPixelXs AffectedXs( cx, cw, true );
@@ -152,7 +152,7 @@ void KColumnsView::drawContents( QPainter *P, int cx, int cy, int cw, int ch )
KPixelYs AffectedYs( cy, ch, true );
// collect affected columns
- QPtrList<KColumn> RedrawColumns;
+ TQPtrList<KColumn> RedrawColumns;
for( KColumn *C=Columns.first(); C; C=Columns.next() )
if( C->isVisible() && C->overlaps(AffectedXs) )
RedrawColumns.append( C );
@@ -166,7 +166,7 @@ void KColumnsView::drawContents( QPainter *P, int cx, int cy, int cw, int ch )
if( AffectedLines.isValid() )
{
- QPainter Paint;
+ TQPainter Paint;
Paint.begin( &LineBuffer, this );
// starting painting with the first line
@@ -231,6 +231,6 @@ void KColumnsView::drawContents( QPainter *P, int cx, int cy, int cw, int ch )
}
// Implemented to get rid of a compiler warning
-void KColumnsView::drawContents( QPainter * ) {}
+void KColumnsView::drawContents( TQPainter * ) {}
#include "kcolumnsview.moc"
diff --git a/khexedit/lib/kcolumnsview.h b/khexedit/lib/kcolumnsview.h
index aa3521d..372a6f5 100644
--- a/khexedit/lib/kcolumnsview.h
+++ b/khexedit/lib/kcolumnsview.h
@@ -19,10 +19,10 @@
#define KHE_KCOLUMNSVIEW_H
// qt specific
-#include <qptrlist.h>
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qscrollview.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqscrollview.h>
// lib specific
#include "kadds.h"
#include "ksection.h" // TODO: think about moving this out of the public API
@@ -46,12 +46,12 @@ class KColumnsView : public QScrollView
friend class KColumn;
public:
- KColumnsView( /*bool R = false,*/ QWidget *parent=0, const char *name=0, WFlags Flags=0 );
+ KColumnsView( /*bool R = false,*/ TQWidget *parent=0, const char *name=0, WFlags Flags=0 );
virtual ~KColumnsView();
public: // drawing
- virtual void paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch );
- virtual void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
+ virtual void paintEmptyArea( TQPainter *p, int cx, int cy, int cw, int ch );
+ virtual void drawContents( TQPainter *p, int cx, int cy, int cw, int ch );
public: // data-wise sizes
/** returns the number of all lines */
@@ -65,7 +65,7 @@ class KColumnsView : public QScrollView
/** returns the height of each line */
KPixelY lineHeight() const;
/** returns the size of all visible columns together */
- QSize totalViewSize() const;
+ TQSize totalViewSize() const;
/** returns the width of all visible columns together */
KPixelX totalWidth() const;
/** returns the height of all lines together */
@@ -116,12 +116,12 @@ class KColumnsView : public QScrollView
private:
/** hiding it*/
- void drawContents( QPainter* );
+ void drawContents( TQPainter* );
protected: // calculated
/** collection of all the columns. All columns will be autodeleted. */
- QPtrList<KColumn> Columns;
+ TQPtrList<KColumn> Columns;
/** the number of lines which the column view has */
int NoOfLines;
/** the height of each line in pixels */
@@ -135,7 +135,7 @@ class KColumnsView : public QScrollView
// TODO: do we really want this?
bool HorizontalGrid;
/** Buffer where each line is drawn to before it is copied onto the screen */
- QPixmap LineBuffer;
+ TQPixmap LineBuffer;
// bool Reversed;
private:
@@ -161,7 +161,7 @@ inline KSection KColumnsView::visibleLines( KPixelYs YPixels ) const
inline KPixelY KColumnsView::totalHeight() const { return NoOfLines*LineHeight; }
inline KPixelX KColumnsView::totalWidth() const { return TotalWidth; }
-inline QSize KColumnsView::totalViewSize() const { return QSize( totalWidth(), totalHeight() ); }
+inline TQSize KColumnsView::totalViewSize() const { return TQSize( totalWidth(), totalHeight() ); }
}
diff --git a/khexedit/lib/kcoordrangelist.h b/khexedit/lib/kcoordrangelist.h
index 187ec7f..a4401f7 100644
--- a/khexedit/lib/kcoordrangelist.h
+++ b/khexedit/lib/kcoordrangelist.h
@@ -19,13 +19,13 @@
#define KHE_KCOORDRANGELIST_H
// qt specific
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
// lib specific
#include "kcoordrange.h"
namespace KHE {
-typedef QValueList<KCoordRange> KCoordRangeBasicList;
+typedef TQValueList<KCoordRange> KCoordRangeBasicList;
/**
@author Friedrich W. H. Kossebau
*/
diff --git a/khexedit/lib/kcursor.h b/khexedit/lib/kcursor.h
index 428c7ed..17b4371 100644
--- a/khexedit/lib/kcursor.h
+++ b/khexedit/lib/kcursor.h
@@ -19,7 +19,7 @@
#define KHE_KCURSOR_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "kadds.h"
@@ -42,23 +42,23 @@ class KCursor
void setShape( KPixelX X, KPixelX W );
public: // access
- const QPixmap &onPixmap() const;
- const QPixmap &offPixmap() const;
+ const TQPixmap &onPixmap() const;
+ const TQPixmap &offPixmap() const;
KPixelX cursorX() const;
KPixelX cursorW() const;
protected:
- QPixmap OnPixmap;
- QPixmap OffPixmap;
+ TQPixmap OnPixmap;
+ TQPixmap OffPixmap;
KPixelX CursorX;
KPixelX CursorW;
};
-inline const QPixmap &KCursor::onPixmap() const { return OnPixmap; }
-inline const QPixmap &KCursor::offPixmap() const { return OffPixmap; }
+inline const TQPixmap &KCursor::onPixmap() const { return OnPixmap; }
+inline const TQPixmap &KCursor::offPixmap() const { return OffPixmap; }
inline KPixelX KCursor::cursorX() const { return CursorX; }
inline KPixelX KCursor::cursorW() const { return CursorW; }
diff --git a/khexedit/lib/kdatabuffer.h b/khexedit/lib/kdatabuffer.h
index e9733d8..e7cc3bc 100644
--- a/khexedit/lib/kdatabuffer.h
+++ b/khexedit/lib/kdatabuffer.h
@@ -219,7 +219,7 @@ class KHEXEDIT_EXPORT KDataBuffer
*/
virtual int rfind( const char*, int Length, int Pos = -1 ) const = 0;
-/* virtual int find( const QString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
+/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
};
diff --git a/khexedit/lib/kfixedsizebuffer.cpp b/khexedit/lib/kfixedsizebuffer.cpp
index 2945620..784858c 100644
--- a/khexedit/lib/kfixedsizebuffer.cpp
+++ b/khexedit/lib/kfixedsizebuffer.cpp
@@ -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() << QString("Pos: %1, OtherRange: (%3/%4)" ).arg(Pos).arg(OtherRange.start()).arg(OtherRange.end())
+ //kdDebug() << TQString("Pos: %1, OtherRange: (%3/%4)" ).arg(Pos).arg(OtherRange.start()).arg(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()
- // << QString( "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)" ).arg(Range.start()).arg(Range.end()).arg(OtherRange.start()).arg(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() << QString("%1==%2").arg((int)D).arg((int)OD) << endl;
+ //kdDebug() << TQString("%1==%2").arg((int)D).arg((int)OD) << endl;
if( OD == D )
continue;
return OD < D ? 1 : -1;
diff --git a/khexedit/lib/kfixedsizebuffer.h b/khexedit/lib/kfixedsizebuffer.h
index 15c17da..90060f0 100644
--- a/khexedit/lib/kfixedsizebuffer.h
+++ b/khexedit/lib/kfixedsizebuffer.h
@@ -58,7 +58,7 @@ class KFixedSizeBuffer : public KDataBuffer
virtual int find( const char*KeyData, int Length, KSection Section ) const;
virtual int rfind( const char*, int Length, int Pos = -1 ) const;
-/* virtual int find( const QString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
+/* virtual int find( 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 4f51e9e..04b4016 100644
--- a/khexedit/lib/khechar.h
+++ b/khexedit/lib/khechar.h
@@ -18,7 +18,7 @@
#define KHE_KHECHAR_H
// qt specific
-#include <qstring.h>
+#include <tqstring.h>
namespace KHE
{
@@ -26,8 +26,8 @@ namespace KHE
class KHEChar : public QChar
{
public:
- KHEChar( QChar C );
- KHEChar( QChar C, bool U );
+ KHEChar( TQChar C );
+ KHEChar( TQChar C, bool U );
public:
bool isUndefined() const;
protected:
@@ -35,8 +35,8 @@ class KHEChar : public QChar
bool IsUndefined:1;
};
-inline KHEChar::KHEChar( QChar C ) : QChar( C ), IsUndefined( false ) {}
-inline KHEChar::KHEChar( QChar C, bool U ) : QChar( C ), IsUndefined( U ) {}
+inline KHEChar::KHEChar( TQChar C ) : TQChar( C ), IsUndefined( false ) {}
+inline KHEChar::KHEChar( TQChar C, bool U ) : TQChar( C ), IsUndefined( U ) {}
inline bool KHEChar::isUndefined() const { return IsUndefined; }
}
diff --git a/khexedit/lib/khexedit.cpp b/khexedit/lib/khexedit.cpp
index 85478e5..a7a27c5 100644
--- a/khexedit/lib/khexedit.cpp
+++ b/khexedit/lib/khexedit.cpp
@@ -23,11 +23,11 @@
// c++ specific
//#include <limits>
// qt specific
-#include <qstyle.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
// kde specific
#ifndef QT_ONLY
#include <kglobalsettings.h>
@@ -66,16 +66,16 @@ static const int InsertCursorWidth = 2;
-KHexEdit::KHexEdit( KDataBuffer *Buffer, QWidget *Parent, const char *Name, WFlags Flags )
+KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFlags Flags )
: KColumnsView( Parent, Name, Flags ),
DataBuffer( Buffer ),
BufferLayout( new KBufferLayout(DefaultNoOfBytesPerLine,DefaultStartOffset,0) ),
BufferCursor( new KBufferCursor(BufferLayout) ),
BufferRanges( new KBufferRanges(BufferLayout) ),
- CursorBlinkTimer( new QTimer(this) ),
- ScrollTimer( new QTimer(this) ),
- DragStartTimer( new QTimer(this) ),
- TrippleClickTimer( new QTimer(this) ),
+ CursorBlinkTimer( new TQTimer(this) ),
+ ScrollTimer( new TQTimer(this) ),
+ DragStartTimer( new TQTimer(this) ),
+ TrippleClickTimer( new TQTimer(this) ),
CursorPixmaps( new KCursor() ),
Codec( 0 ),
ClipboardMode( QClipboard::Clipboard ),
@@ -124,7 +124,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, QWidget *Parent, const char *Name, WFla
Controller = Navigator;
#ifdef QT_ONLY
- QFont FixedFont( "fixed", 10 );
+ TQFont FixedFont( "fixed", 10 );
FixedFont.setFixedPitch( true );
setFont( FixedFont );
#else
@@ -138,9 +138,9 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, QWidget *Parent, const char *Name, WFla
viewport()->installEventFilter( this );
installEventFilter( this );
- connect( CursorBlinkTimer, SIGNAL(timeout()), this, SLOT(blinkCursor()) );
- connect( ScrollTimer, SIGNAL(timeout()), this, SLOT(autoScrollTimerDone()) );
- connect( DragStartTimer, SIGNAL(timeout()), this, SLOT(startDrag()) );
+ connect( CursorBlinkTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(blinkCursor()) );
+ connect( ScrollTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(autoScrollTimerDone()) );
+ connect( DragStartTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(startDrag()) );
viewport()->setAcceptDrops( true );
}
@@ -170,10 +170,10 @@ bool KHexEdit::isReadOnly() const { return ReadOnly; }
bool KHexEdit::isModified() const { return DataBuffer->isModified(); }
bool KHexEdit::tabChangesFocus() const { return TabController->tabChangesFocus(); }
bool KHexEdit::showUnprintable() const { return charColumn().showUnprintable(); }
-QChar KHexEdit::substituteChar() const { return charColumn().substituteChar(); }
-QChar KHexEdit::undefinedChar() const { return charColumn().undefinedChar(); }
+TQChar KHexEdit::substituteChar() const { return charColumn().substituteChar(); }
+TQChar KHexEdit::undefinedChar() const { return charColumn().undefinedChar(); }
KHexEdit::KEncoding KHexEdit::encoding() const { return (KHexEdit::KEncoding)Encoding; }
-const QString &KHexEdit::encodingName() const { return Codec->name(); }
+const TQString &KHexEdit::encodingName() const { return Codec->name(); }
KSection KHexEdit::selection() const { return BufferRanges->selection(); }
int KHexEdit::cursorPosition() const { return BufferCursor->index(); }
@@ -347,7 +347,7 @@ void KHexEdit::setBinaryGapWidth( int/*KPixelX*/ BGW )
}
-void KHexEdit::setSubstituteChar( QChar SC )
+void KHexEdit::setSubstituteChar( TQChar SC )
{
if( !charColumn().setSubstituteChar(SC) )
return;
@@ -356,7 +356,7 @@ void KHexEdit::setSubstituteChar( QChar SC )
unpauseCursor();
}
-void KHexEdit::setUndefinedChar( QChar UC )
+void KHexEdit::setUndefinedChar( TQChar UC )
{
if( !charColumn().setUndefinedChar(UC) )
return;
@@ -398,7 +398,7 @@ void KHexEdit::setEncoding( KEncoding C )
}
// TODO: join with function above!
-void KHexEdit::setEncoding( const QString& EncodingName )
+void KHexEdit::setEncoding( const TQString& EncodingName )
{
if( EncodingName == Codec->name() )
return;
@@ -421,15 +421,15 @@ void KHexEdit::setEncoding( const QString& EncodingName )
}
-void KHexEdit::fontChange( const QFont &OldFont )
+void KHexEdit::fontChange( const TQFont &OldFont )
{
- QScrollView::fontChange( OldFont );
+ TQScrollView::fontChange( OldFont );
if( !InZooming )
DefaultFontSize = font().pointSize();
// get new values
- QFontMetrics FM( fontMetrics() );
+ TQFontMetrics FM( fontMetrics() );
KPixelX DigitWidth = FM.maxWidth();
KPixelY DigitBaseLine = FM.ascent();
@@ -468,8 +468,8 @@ void KHexEdit::zoomOut() { zoomOut( DefaultZoomStep ); }
void KHexEdit::zoomIn( int PointInc )
{
InZooming = true;
- QFont F( font() );
- F.setPointSize( QFontInfo(F).pointSize() + PointInc );
+ TQFont F( font() );
+ F.setPointSize( TQFontInfo(F).pointSize() + PointInc );
setFont( F );
InZooming = false;
}
@@ -477,8 +477,8 @@ void KHexEdit::zoomIn( int PointInc )
void KHexEdit::zoomOut( int PointDec )
{
InZooming = true;
- QFont F( font() );
- F.setPointSize( QMAX( 1, QFontInfo(F).pointSize() - PointDec ) );
+ TQFont F( font() );
+ F.setPointSize( QMAX( 1, TQFontInfo(F).pointSize() - PointDec ) );
setFont( F );
InZooming = false;
}
@@ -487,7 +487,7 @@ void KHexEdit::zoomOut( int PointDec )
void KHexEdit::zoomTo( int PointSize )
{
InZooming = true;
- QFont F( font() );
+ TQFont F( font() );
F.setPointSize( PointSize );
setFont( F );
InZooming = false;
@@ -548,21 +548,21 @@ void KHexEdit::toggleOffsetColumn( bool Visible )
}
-QSize KHexEdit::sizeHint() const
+TQSize KHexEdit::sizeHint() const
{
- return QSize( totalWidth(), totalHeight() );
+ return TQSize( totalWidth(), totalHeight() );
}
-QSize KHexEdit::minimumSizeHint() const
+TQSize KHexEdit::minimumSizeHint() const
{
// TODO: better minimal width (visibility!)
- return QSize( OffsetColumn->visibleWidth()+FirstBorderColumn->visibleWidth()+SecondBorderColumn->visibleWidth()+valueColumn().byteWidth()+charColumn().byteWidth(),
- lineHeight() + noOfLines()>1? style().pixelMetric(QStyle::PM_ScrollBarExtent):0 );
+ return TQSize( OffsetColumn->visibleWidth()+FirstBorderColumn->visibleWidth()+SecondBorderColumn->visibleWidth()+valueColumn().byteWidth()+charColumn().byteWidth(),
+ lineHeight() + noOfLines()>1? style().pixelMetric(TQStyle::PM_ScrollBarExtent):0 );
}
-void KHexEdit::resizeEvent( QResizeEvent *ResizeEvent )
+void KHexEdit::resizeEvent( TQResizeEvent *ResizeEvent )
{
if( ResizeStyle != NoResize )
{
@@ -576,13 +576,13 @@ void KHexEdit::resizeEvent( QResizeEvent *ResizeEvent )
}
}
- QScrollView::resizeEvent( ResizeEvent );
+ TQScrollView::resizeEvent( ResizeEvent );
BufferLayout->setNoOfLinesPerPage( noOfLinesPerPage() ); // TODO: doesn't work with the new size!!!
}
-int KHexEdit::fittingBytesPerLine( const QSize &NewSize ) const
+int KHexEdit::fittingBytesPerLine( const TQSize &NewSize ) const
{
KPixelX ReservedWidth = OffsetColumn->visibleWidth() + FirstBorderColumn->visibleWidth() + SecondBorderColumn->visibleWidth();
@@ -598,7 +598,7 @@ int KHexEdit::fittingBytesPerLine( const QSize &NewSize ) const
// check influence of dis-/appearing of the vertical scrollbar
bool VerticalScrollbarIsVisible = verticalScrollBar()->isVisible();
- KPixelX ScrollbarExtent = style().pixelMetric( QStyle::PM_ScrollBarExtent );//verticalScrollBar()->width();
+ KPixelX ScrollbarExtent = style().pixelMetric( TQStyle::PM_ScrollBarExtent );//verticalScrollBar()->width();
KPixelX AvailableWidth = FullWidth;
if( VerticalScrollbarIsVisible )
@@ -798,19 +798,19 @@ bool KHexEdit::hasSelectedData() const
}
-QByteArray KHexEdit::selectedData() const
+TQByteArray KHexEdit::selectedData() const
{
if( !BufferRanges->hasSelection() )
- return QByteArray();
+ return TQByteArray();
KSection Selection = BufferRanges->selection();
- QByteArray SD( Selection.width() );
+ TQByteArray SD( Selection.width() );
DataBuffer->copyTo( SD.data(), Selection.start(), Selection.width() );
return SD;
}
-KBufferDrag *KHexEdit::dragObject( QWidget *Parent ) const
+KBufferDrag *KHexEdit::dragObject( TQWidget *Parent ) const
{
if( !BufferRanges->hasSelection() )
return 0;
@@ -850,7 +850,7 @@ void KHexEdit::cut()
if( !Drag )
return;
- QApplication::clipboard()->setData( Drag, ClipboardMode );
+ TQApplication::clipboard()->setData( Drag, ClipboardMode );
removeSelectedData();
}
@@ -862,7 +862,7 @@ void KHexEdit::copy()
if( !Drag )
return;
- QApplication::clipboard()->setData( Drag, ClipboardMode );
+ TQApplication::clipboard()->setData( Drag, ClipboardMode );
}
@@ -871,17 +871,17 @@ void KHexEdit::paste()
if( isReadOnly() )
return;
- QMimeSource *Source = QApplication::clipboard()->data( ClipboardMode );
+ TQMimeSource *Source = TQApplication::clipboard()->data( ClipboardMode );
pasteFromSource( Source );
}
-void KHexEdit::pasteFromSource( QMimeSource *Source )
+void KHexEdit::pasteFromSource( TQMimeSource *Source )
{
if( !Source || !KBufferDrag::canDecode(Source) )
return;
- QByteArray Data;
+ TQByteArray Data;
if( !KBufferDrag::decode(Source,Data) )
return;
@@ -890,7 +890,7 @@ void KHexEdit::pasteFromSource( QMimeSource *Source )
}
-void KHexEdit::insert( const QByteArray &D )
+void KHexEdit::insert( const TQByteArray &D )
{
pauseCursor( true );
@@ -1017,7 +1017,7 @@ KSection KHexEdit::removeData( KSection Indizes )
// if( !undoRedoInfo.valid() )
// {
// doc->selectionStart( selNum, undoRedoInfo.id, undoRedoInfo.index );
-// undoRedoInfo.d->text = QString::null;
+// undoRedoInfo.d->text = TQString::null;
// }
// readFormats( c1, c2, undoRedoInfo.d->text, TRUE );
// }
@@ -1042,7 +1042,7 @@ void KHexEdit::updateLength()
void KHexEdit::clipboardChanged()
{
// don't listen to selection changes
- disconnect( QApplication::clipboard(), SIGNAL(selectionChanged()), this, 0 );
+ disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0 );
selectAll( false );
}
@@ -1130,7 +1130,7 @@ void KHexEdit::setCursorColumn( KBufferColumnId CC )
}
-void KHexEdit::placeCursor( const QPoint &Point )
+void KHexEdit::placeCursor( const TQPoint &Point )
{
resetInputContext();
@@ -1155,7 +1155,7 @@ void KHexEdit::placeCursor( const QPoint &Point )
}
-int KHexEdit::indexByPoint( const QPoint &Point ) const
+int KHexEdit::indexByPoint( const TQPoint &Point ) const
{
const KBufferColumn *C;
if( charColumn().isVisible() && Point.x() >= charColumn().x() )
@@ -1169,34 +1169,34 @@ int KHexEdit::indexByPoint( const QPoint &Point ) const
}
-void KHexEdit::showEvent( QShowEvent *e )
+void KHexEdit::showEvent( TQShowEvent *e )
{
KColumnsView::showEvent( e );
BufferLayout->setNoOfLinesPerPage( noOfLinesPerPage() );
}
-bool KHexEdit::eventFilter( QObject *O, QEvent *E )
+bool KHexEdit::eventFilter( TQObject *O, TQEvent *E )
{
if( O == this || O == viewport() )
{
- if( E->type() == QEvent::FocusIn )
+ if( E->type() == TQEvent::FocusIn )
{
startCursor();
}
- else if( E->type() == QEvent::FocusOut )
+ else if( E->type() == TQEvent::FocusOut )
{
stopCursor();
}
}
-// if( O == this && E->type() == QEvent::PaletteChange )
+// if( O == this && E->type() == TQEvent::PaletteChange )
// {
-// QColor old( viewport()->colorGroup().color(QColorGroup::Text) );
+// TQColor old( viewport()->colorGroup().color(TQColorGroup::Text) );
//
-// if( old != colorGroup().color(QColorGroup::Text) )
+// if( old != colorGroup().color(TQColorGroup::Text) )
// {
-// QColor c( colorGroup().color(QColorGroup::Text) );
+// TQColor c( colorGroup().color(TQColorGroup::Text) );
// doc->setMinimumWidth( -1 );
// doc->setDefaultFormat( doc->formatCollection()->defaultFormat()->font(), c );
// lastFormatted = doc->firstParagraph();
@@ -1205,7 +1205,7 @@ bool KHexEdit::eventFilter( QObject *O, QEvent *E )
// }
// }
- return QScrollView::eventFilter( O, E );
+ return TQScrollView::eventFilter( O, E );
}
@@ -1226,7 +1226,7 @@ void KHexEdit::startCursor()
updateCursor();
- CursorBlinkTimer->start( QApplication::cursorFlashTime()/2 );
+ CursorBlinkTimer->start( TQApplication::cursorFlashTime()/2 );
}
@@ -1274,7 +1274,7 @@ void KHexEdit::createCursorPixmaps()
int Index = BufferCursor->validIndex();
- QPainter Paint;
+ TQPainter Paint;
Paint.begin( &CursorPixmaps->offPixmap(), this );
activeColumn().paintByte( &Paint, Index );
Paint.end();
@@ -1300,7 +1300,7 @@ void KHexEdit::createCursorPixmaps()
}
-void KHexEdit::pointPainterToCursor( QPainter &Painter, const KBufferColumn &Column ) const
+void KHexEdit::pointPainterToCursor( TQPainter &Painter, const KBufferColumn &Column ) const
{
int x = Column.xOfPos( BufferCursor->pos() ) - contentsX();
int y = LineHeight * BufferCursor->line() - contentsY();
@@ -1317,7 +1317,7 @@ void KHexEdit::paintActiveCursor( bool CursorOn )
|| (CursorOn && !hasFocus() && !viewport()->hasFocus() && !InDnD ) )
return;
- QPainter Painter;
+ TQPainter Painter;
pointPainterToCursor( Painter, activeColumn() );
// paint edited byte?
@@ -1353,7 +1353,7 @@ void KHexEdit::paintInactiveCursor( bool CursorOn )
int Index = BufferCursor->validIndex();
- QPainter Painter;
+ TQPainter Painter;
pointPainterToCursor( Painter, inactiveColumn() );
if( CursorOn )
{
@@ -1368,7 +1368,7 @@ void KHexEdit::paintInactiveCursor( bool CursorOn )
}
-void KHexEdit::drawContents( QPainter *P, int cx, int cy, int cw, int ch )
+void KHexEdit::drawContents( TQPainter *P, int cx, int cy, int cw, int ch )
{
KColumnsView::drawContents( P, cx, cy, cw, ch );
// TODO: update non blinking cursors. Should this perhaps be done in the buffercolumn?
@@ -1390,7 +1390,7 @@ void KHexEdit::updateColumn( KColumn &Column )
}
-void KHexEdit::keyPressEvent( QKeyEvent *KeyEvent )
+void KHexEdit::keyPressEvent( TQKeyEvent *KeyEvent )
{
if( !Controller->handleKeyPress( KeyEvent ) )
KeyEvent->ignore();
@@ -1408,7 +1408,7 @@ void KHexEdit::repaintChanged()
KPixelXs Xs( contentsX(), visibleWidth(), true );
// collect affected buffer columns
- QPtrList<KBufferColumn> RepaintColumns;
+ TQPtrList<KBufferColumn> RepaintColumns;
KBufferColumn *C = ValueColumn;
while( true )
@@ -1497,7 +1497,7 @@ void KHexEdit::paintLine( KBufferColumn *C, int Line, KSection Positions )
KPixelY cy = Line * LineHeight;
// to avoid flickers we first paint to the linebuffer
- QPainter Paint;
+ TQPainter Paint;
Paint.begin( &LineBuffer, this );
Paint.translate( C->x(), 0 );
@@ -1542,7 +1542,7 @@ void KHexEdit::ensureCursorVisible()
-void KHexEdit::contentsMousePressEvent( QMouseEvent *e )
+void KHexEdit::contentsMousePressEvent( TQMouseEvent *e )
{
// clearUndoRedo();
pauseCursor( true );
@@ -1554,7 +1554,7 @@ void KHexEdit::contentsMousePressEvent( QMouseEvent *e )
// select whole line?
if( TrippleClickTimer->isActive()
- && (e->globalPos()-DoubleClickPoint).manhattanLength() < QApplication::startDragDistance() )
+ && (e->globalPos()-DoubleClickPoint).manhattanLength() < TQApplication::startDragDistance() )
{
BufferRanges->setSelectionStart( BufferLayout->indexAtLineStart(DoubleClickLine) );
BufferCursor->gotoLineEnd();
@@ -1565,7 +1565,7 @@ void KHexEdit::contentsMousePressEvent( QMouseEvent *e )
return;
}
- QPoint MousePoint = e->pos();
+ TQPoint MousePoint = e->pos();
placeCursor( MousePoint );
ensureCursorVisible();
@@ -1573,7 +1573,7 @@ void KHexEdit::contentsMousePressEvent( QMouseEvent *e )
if( BufferRanges->selectionIncludes(BufferCursor->index()) )
{
DragStartPossible = true;
- DragStartTimer->start( QApplication::startDragTime(), true );
+ DragStartTimer->start( TQApplication::startDragTime(), true );
DragStartPoint = MousePoint;
unpauseCursor();
@@ -1614,7 +1614,7 @@ void KHexEdit::contentsMousePressEvent( QMouseEvent *e )
}
-void KHexEdit::contentsMouseMoveEvent( QMouseEvent *e )
+void KHexEdit::contentsMouseMoveEvent( TQMouseEvent *e )
{
if( MousePressed )
{
@@ -1622,14 +1622,14 @@ void KHexEdit::contentsMouseMoveEvent( QMouseEvent *e )
{
DragStartTimer->stop();
// moved enough for a drag?
- if( (e->pos()-DragStartPoint).manhattanLength() > QApplication::startDragDistance() )
+ if( (e->pos()-DragStartPoint).manhattanLength() > TQApplication::startDragDistance() )
startDrag();
if( !isReadOnly() )
viewport()->setCursor( ibeamCursor );
return;
}
// selecting
- QPoint MousePoint = e->pos();
+ TQPoint MousePoint = e->pos();
handleMouseMove( MousePoint );
}
else if( !isReadOnly() )
@@ -1641,7 +1641,7 @@ void KHexEdit::contentsMouseMoveEvent( QMouseEvent *e )
}
-void KHexEdit::contentsMouseReleaseEvent( QMouseEvent *e )
+void KHexEdit::contentsMouseReleaseEvent( TQMouseEvent *e )
{
// this is not the release of a doubleclick so we need to process it?
if( !InDoubleClick )
@@ -1671,14 +1671,14 @@ void KHexEdit::contentsMouseReleaseEvent( QMouseEvent *e )
// was end of selection operation?
else if( BufferRanges->hasSelection() )
{
- if( QApplication::clipboard()->supportsSelection() )
+ if( TQApplication::clipboard()->supportsSelection() )
{
ClipboardMode = QClipboard::Selection;
- disconnect( QApplication::clipboard(), SIGNAL(selectionChanged()), this, 0);
+ disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0);
copy();
- connect( QApplication::clipboard(), SIGNAL(selectionChanged()), this, SLOT(clipboardChanged()) );
+ connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) );
ClipboardMode = QClipboard::Clipboard;
}
}
@@ -1720,7 +1720,7 @@ void KHexEdit::contentsMouseReleaseEvent( QMouseEvent *e )
// gets called after press and release instead of a plain press event (?)
-void KHexEdit::contentsMouseDoubleClickEvent( QMouseEvent *e )
+void KHexEdit::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
// we are only interested in LMB doubleclicks
if( e->button() != Qt::LeftButton )
@@ -1754,11 +1754,11 @@ void KHexEdit::contentsMouseDoubleClickEvent( QMouseEvent *e )
void KHexEdit::autoScrollTimerDone()
{
if( MousePressed )
- handleMouseMove( viewportToContents(viewport()->mapFromGlobal( QCursor::pos() )) );
+ handleMouseMove( viewportToContents(viewport()->mapFromGlobal( TQCursor::pos() )) );
}
-void KHexEdit::handleMouseMove( const QPoint& Point ) // handles the move of the mouse with pressed buttons
+void KHexEdit::handleMouseMove( const TQPoint& Point ) // handles the move of the mouse with pressed buttons
{
// no scrolltimer and outside of viewport?
if( !ScrollTimer->isActive() && Point.y() < contentsY() || Point.y() > contentsY() + visibleHeight() )
@@ -1817,7 +1817,7 @@ void KHexEdit::startDrag()
DragStartPossible = false;
// create data
- QDragObject *Drag = dragObject( viewport() );
+ TQDragObject *Drag = dragObject( viewport() );
if( !Drag )
return;
@@ -1827,12 +1827,12 @@ void KHexEdit::startDrag()
// or is this left to the user and he choose to move?
else if( Drag->drag() )
// Not inside this widget itself?
- if( QDragObject::target() != this && QDragObject::target() != viewport() )
+ if( TQDragObject::target() != this && TQDragObject::target() != viewport() )
removeSelectedData();
}
-void KHexEdit::contentsDragEnterEvent( QDragEnterEvent *e )
+void KHexEdit::contentsDragEnterEvent( TQDragEnterEvent *e )
{
// interesting for this widget?
if( isReadOnly() || !KBufferDrag::canDecode(e) )
@@ -1846,7 +1846,7 @@ void KHexEdit::contentsDragEnterEvent( QDragEnterEvent *e )
}
-void KHexEdit::contentsDragMoveEvent( QDragMoveEvent *e )
+void KHexEdit::contentsDragMoveEvent( TQDragMoveEvent *e )
{
// is this content still interesting for us?
if( isReadOnly() || !KBufferDrag::canDecode(e) )
@@ -1864,7 +1864,7 @@ void KHexEdit::contentsDragMoveEvent( QDragMoveEvent *e )
}
-void KHexEdit::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KHexEdit::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
// bye... and thanks for all the cursor movement...
InDnD = false;
@@ -1872,7 +1872,7 @@ void KHexEdit::contentsDragLeaveEvent( QDragLeaveEvent * )
-void KHexEdit::contentsDropEvent( QDropEvent *e )
+void KHexEdit::contentsDropEvent( TQDropEvent *e )
{
// after drag enter and move check one more time
if( isReadOnly() )
@@ -1896,7 +1896,7 @@ void KHexEdit::contentsDropEvent( QDropEvent *e )
}
-void KHexEdit::handleInternalDrag( QDropEvent *e )
+void KHexEdit::handleInternalDrag( TQDropEvent *e )
{
KSection ChangedRange;
@@ -1908,7 +1908,7 @@ void KHexEdit::handleInternalDrag( QDropEvent *e )
int InsertIndex = BufferCursor->realIndex();
// is this a move?
- if( e->action() == QDropEvent::Move )
+ if( e->action() == TQDropEvent::Move )
{
// ignore the copy hold in the event but only move
int NewIndex = DataBuffer->move( InsertIndex, Selection );
@@ -1922,7 +1922,7 @@ void KHexEdit::handleInternalDrag( QDropEvent *e )
else
{
// get data
- QByteArray Data;
+ TQByteArray Data;
if( KBufferDrag::decode(e,Data) && !Data.isEmpty() )
{
if( OverWrite )
@@ -1966,7 +1966,7 @@ void KHexEdit::handleInternalDrag( QDropEvent *e )
}
-void KHexEdit::contentsWheelEvent( QWheelEvent *e )
+void KHexEdit::contentsWheelEvent( TQWheelEvent *e )
{
if( isReadOnly() )
{
@@ -1979,19 +1979,19 @@ void KHexEdit::contentsWheelEvent( QWheelEvent *e )
return;
}
}
- QScrollView::contentsWheelEvent( e );
+ TQScrollView::contentsWheelEvent( e );
}
#if 0
-void KHexEdit::contentsContextMenuEvent( QContextMenuEvent *e )
+void KHexEdit::contentsContextMenuEvent( TQContextMenuEvent *e )
{
// clearUndoRedo();
MousePressed = false;
e->accept();
- QPopupMenu *PopupMenu = createPopupMenu( e->pos() );
+ TQPopupMenu *PopupMenu = createPopupMenu( e->pos() );
if( !PopupMenu )
PopupMenu = createPopupMenu();
if( !PopupMenu )
@@ -2005,14 +2005,14 @@ void KHexEdit::contentsContextMenuEvent( QContextMenuEvent *e )
{
selectAll();
// if the clipboard support selections, put the newly selected text into the clipboard
- if( QApplication::clipboard()->supportsSelection() )
+ if( TQApplication::clipboard()->supportsSelection() )
{
ClipboardMode = QClipboard::Selection;
- disconnect( QApplication::clipboard(), SIGNAL(selectionChanged()), this, 0);
+ disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0);
copy();
- connect( QApplication::clipboard(), SIGNAL(selectionChanged()), this, SLOT(clipboardChanged()) );
+ connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) );
ClipboardMode = QClipboard::Clipboard;
}
}
diff --git a/khexedit/lib/khexedit.h b/khexedit/lib/khexedit.h
index 66059c8..38bb53e 100644
--- a/khexedit/lib/khexedit.h
+++ b/khexedit/lib/khexedit.h
@@ -19,7 +19,7 @@
#define KHE_KHEXEDIT_H
// qt specific
-#include <qclipboard.h>
+#include <tqclipboard.h>
// lib specific
// #include "khe.h"
#include "khexedit_export.h"
@@ -91,7 +91,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
Q_PROPERTY( bool TabChangesFocus READ tabChangesFocus WRITE setTabChangesFocus )
//Q_PROPERTY( bool hasSelectedData READ hasSelectedData )
- //Q_PROPERTY( QByteArray SelectedData READ selectedData )
+ //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 )
@@ -105,7 +105,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
Q_PROPERTY( int BinaryGapWidth READ binaryGapWidth WRITE setBinaryGapWidth )
// char column
Q_PROPERTY( bool ShowUnprintable READ showUnprintable WRITE setShowUnprintable )
- Q_PROPERTY( QChar SubstituteChar READ substituteChar WRITE setSubstituteChar )
+ Q_PROPERTY( TQChar SubstituteChar READ substituteChar WRITE setSubstituteChar )
public:
enum KResizeStyle { NoResize=0, LockGrouping=1, FullSizeUsage=2, MaxResizeStyleId=0xFF };
@@ -117,20 +117,20 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
public:
- KHexEdit( KDataBuffer *Buffer = 0, QWidget *Parent = 0, const char *Name = 0, WFlags F = 0 );
+ KHexEdit( KDataBuffer *Buffer = 0, TQWidget *Parent = 0, const char *Name = 0, WFlags F = 0 );
virtual ~KHexEdit();
public: // KColumnsView API
- virtual void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
+ virtual void drawContents( TQPainter *p, int cx, int cy, int cw, int ch );
- public: // QWidget API
-// void focusInEvent( QFocusEvent *FocusEvent ); // TODO: why don't these work?
-// void focusOutEvent( QFocusEvent *FocusEvent );
- virtual bool eventFilter( QObject *O, QEvent *E );
+ public: // TQWidget API
+// void focusInEvent( TQFocusEvent *FocusEvent ); // TODO: why don't these work?
+// void focusOutEvent( TQFocusEvent *FocusEvent );
+ virtual bool eventFilter( TQObject *O, TQEvent *E );
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
public: // value access
@@ -171,9 +171,9 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/** gives the used substitute character for "unprintable" chars, default is '.'
* @return substitute character
*/
- QChar substituteChar() const;
+ TQChar substituteChar() const;
/** returns the actually used undefined character for "undefined" chars, default is '?' */
- QChar undefinedChar() const;
+ TQChar undefinedChar() const;
/**
* @return encoding used in the char column
*/
@@ -181,7 +181,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/**
* @return name of the encoding used in the char column
*/
- const QString &encodingName() const;
+ const TQString &encodingName() const;
public: // logic value service
/** calculates the number of bytes per line that fit into a widget with the given size
@@ -190,12 +190,12 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
* @param TestSize Size the widget might have
* @return number of bytes per line that fit into a widget with the given size
*/
- int fittingBytesPerLine( const QSize &TestSize ) const;
+ int fittingBytesPerLine( const TQSize &TestSize ) const;
/** detects the index of the byte at the given point
* @param Point in viewport coordinate system
* @return index of the byte that covers the point
*/
- int indexByPoint(const QPoint &Point ) const;
+ int indexByPoint(const TQPoint &Point ) const;
public:
/** returns true if there is a selected range in the array */
@@ -203,7 +203,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/**
* @return deep copy of the selected data
*/
- QByteArray selectedData() const;
+ TQByteArray selectedData() const;
KSection selection() const;
public: // modification access
@@ -212,7 +212,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
*/
void setCursorPosition( int Index, bool Behind=false );
/** puts the cursor in the column at the pos of Point (in absolute coord), does not handle the drawing */
- void placeCursor( const QPoint &Point );
+ void placeCursor( const TQPoint &Point );
/***/
void setCursorColumn( KBufferColumnId );
// void repaintByte( int row, int column, bool Erase = true );
@@ -294,11 +294,11 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/** sets the substitute character for "unprintable" chars
* returns true if there was a change
*/
- void setSubstituteChar( QChar SC );
+ void setSubstituteChar( TQChar SC );
/** sets the undefined character for "undefined" chars
* returns true if there was a change
*/
- void setUndefinedChar( QChar UC );
+ void setUndefinedChar( TQChar UC );
/** sets the encoding of the char column. Default is KHE::LocalEncoding.
* If the encoding is not available the format will not be changed. */
void setEncoding( KEncoding C );
@@ -306,7 +306,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
* If the encoding is not available the format will not be changed.
* @param Encoding name of the encoding
*/
- void setEncoding( const QString& Encoding );
+ void setEncoding( const TQString& Encoding );
// interaction
/** de-/selects all data */
@@ -318,7 +318,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/** removes the selected data, takes care of the cursor */
virtual void removeSelectedData();
/** inserts */
- virtual void insert( const QByteArray &D );
+ virtual void insert( const TQByteArray &D );
// clipboard interaction
virtual void copy();
@@ -361,22 +361,22 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
void bufferChanged( int StartIndex, int EndIndex );
- protected: // QWidget API
- virtual void keyPressEvent( QKeyEvent *KeyEvent );
- virtual void resizeEvent( QResizeEvent *ResizeEvent );
- virtual void showEvent( QShowEvent *e );
+ protected: // TQWidget API
+ virtual void keyPressEvent( TQKeyEvent *KeyEvent );
+ virtual void resizeEvent( TQResizeEvent *ResizeEvent );
+ virtual void showEvent( TQShowEvent *e );
- protected: // QScrollView API
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseReleaseEvent( QMouseEvent * e );
- virtual void contentsMouseMoveEvent( QMouseEvent *e );
- virtual void contentsMouseDoubleClickEvent( QMouseEvent * e );
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent * );
- virtual void contentsDropEvent( QDropEvent *e );
- virtual void contentsWheelEvent( QWheelEvent *e );
-// virtual void contentsContextMenuEvent( QContextMenuEvent *e );
+ protected: // TQScrollView API
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent * e );
+ virtual void contentsMouseMoveEvent( TQMouseEvent *e );
+ virtual void contentsMouseDoubleClickEvent( TQMouseEvent * e );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent * );
+ virtual void contentsDropEvent( TQDropEvent *e );
+ virtual void contentsWheelEvent( TQWheelEvent *e );
+// virtual void contentsContextMenuEvent( TQContextMenuEvent *e );
protected: // KColumnsView API
virtual void setNoOfLines( int NewNoOfLines );
@@ -403,23 +403,23 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/** recreates the cursor pixmaps and paints active and inactive cursors if doable */
void updateCursor();
void createCursorPixmaps();
- void pointPainterToCursor( QPainter &Painter, const KBufferColumn &Column ) const;
+ void pointPainterToCursor( TQPainter &Painter, const KBufferColumn &Column ) const;
/** draws the blinking cursor or removes it */
void paintActiveCursor( bool CursorOn );
void paintInactiveCursor( bool CursorOn );
void paintLine( KBufferColumn *C, int Line, KSection Positions );
protected: // partial operations
- void handleMouseMove( const QPoint& Point );
- KBufferDrag *dragObject( QWidget *Parent = 0 ) const;
- void pasteFromSource( QMimeSource *Source );
+ void handleMouseMove( const TQPoint& Point );
+ KBufferDrag *dragObject( TQWidget *Parent = 0 ) const;
+ void pasteFromSource( TQMimeSource *Source );
/** removes the section from the databuffer and updates all affected values */
KSection removeData( KSection Indizes );
/** sets ChangedRange to the range of VisibleRange that is actually changed
* @return true if there was a change within the visible range
*/
bool hasChanged( const KCoordRange &VisibleRange, KCoordRange *ChangedRange ) const;
- void handleInternalDrag( QDropEvent *e );
+ void handleInternalDrag( TQDropEvent *e );
protected:
/** recalcs all dependant values with the actual NoOfBytesPerLine */
@@ -443,8 +443,8 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/** */
void startDrag();
- protected slots: // QWidget API
- virtual void fontChange( const QFont &OldFont );
+ protected slots: // TQWidget API
+ virtual void fontChange( const TQFont &OldFont );
protected:
@@ -484,14 +484,14 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
protected:
/** Timer that controls the blinking of the cursor */
- QTimer *CursorBlinkTimer;
+ TQTimer *CursorBlinkTimer;
/** Timer that triggers ensureCursorVisible function calls */
- QTimer *ScrollTimer;
-/* QTimer *ChangeIntervalTimer, */
+ TQTimer *ScrollTimer;
+/* TQTimer *ChangeIntervalTimer, */
/** Timer to start a drag */
- QTimer *DragStartTimer;
+ TQTimer *DragStartTimer;
/** timer to measure whether the time between a double click and the following counts for a tripleclick */
- QTimer *TrippleClickTimer;
+ TQTimer *TrippleClickTimer;
/** object to store the blinking cursor pixmaps */
KCursor *CursorPixmaps;
@@ -500,11 +500,11 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
protected:
/** point at which the current double click happended (used by TrippleClick) */
- QPoint DoubleClickPoint;
+ TQPoint DoubleClickPoint;
/** line in which the current double click happended (used by TrippleClick) */
int DoubleClickLine;
/** point at which the current dragging started */
- QPoint DragStartPoint;
+ TQPoint DragStartPoint;
/** */
QClipboard::Mode ClipboardMode;
/** font size as set by user (used for zooming) */
diff --git a/khexedit/lib/koffsetcoltextexport.cpp b/khexedit/lib/koffsetcoltextexport.cpp
index c5644df..bce1fa6 100644
--- a/khexedit/lib/koffsetcoltextexport.cpp
+++ b/khexedit/lib/koffsetcoltextexport.cpp
@@ -16,7 +16,7 @@
// qt specific
-#include <qstring.h>
+#include <tqstring.h>
// lib specific
#include "koffsetcolumn.h"
#include "koffsetcoltextexport.h"
@@ -38,18 +38,18 @@ int KOffsetColTextExport::charsPerLine() const
}
-void KOffsetColTextExport::printFirstLine( QString &T, int Line ) const
+void KOffsetColTextExport::printFirstLine( TQString &T, int Line ) const
{
PrintLine = Line;
print( T );
}
-void KOffsetColTextExport::printNextLine( QString &T ) const
+void KOffsetColTextExport::printNextLine( TQString &T ) const
{
print( T );
}
-void KOffsetColTextExport::print( QString &T ) const
+void KOffsetColTextExport::print( TQString &T ) const
{
// TODO: fix me (no more printFunction)
char *B = new char[CodingWidth+1];
diff --git a/khexedit/lib/koffsetcoltextexport.h b/khexedit/lib/koffsetcoltextexport.h
index e07e659..cfc9adb 100644
--- a/khexedit/lib/koffsetcoltextexport.h
+++ b/khexedit/lib/koffsetcoltextexport.h
@@ -34,13 +34,13 @@ class KOffsetColTextExport : public KColTextExport
KOffsetColTextExport( const KOffsetColumn *OC );
public: // KColTextExport API
- void printFirstLine( QString &T, int Line ) const;
- void printNextLine( QString &T ) const;
+ void printFirstLine( TQString &T, int Line ) const;
+ void printNextLine( TQString &T ) const;
/** tells how much chars per line are needed */
int charsPerLine() const;
protected:
- void print( QString &T ) const;
+ void print( TQString &T ) const;
protected:
const int CodingWidth;
diff --git a/khexedit/lib/koffsetcolumn.cpp b/khexedit/lib/koffsetcolumn.cpp
index 6bd6d09..fb8e694 100644
--- a/khexedit/lib/koffsetcolumn.cpp
+++ b/khexedit/lib/koffsetcolumn.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
// qt specific
-#include "qpainter.h"
+#include "tqpainter.h"
// lib specific
#include "kcolumnsview.h"
#include "koffsetcolumn.h"
@@ -40,36 +40,36 @@ KOffsetColumn::~KOffsetColumn()
}
-void KOffsetColumn::paintLine( QPainter *P, int Line )
+void KOffsetColumn::paintLine( TQPainter *P, int Line )
{
- const QColor &ButtonColor = View->colorGroup().button();
- P->fillRect( 0,0,width(),LineHeight, QBrush(ButtonColor,Qt::SolidPattern) );
+ const TQColor &ButtonColor = View->colorGroup().button();
+ P->fillRect( 0,0,width(),LineHeight, TQBrush(ButtonColor,Qt::SolidPattern) );
printFunction()( CodedOffset,FirstLineOffset+Delta*Line );
- P->drawText( 0, DigitBaseLine, QString().append(CodedOffset) );
+ P->drawText( 0, DigitBaseLine, TQString().append(CodedOffset) );
}
-void KOffsetColumn::paintFirstLine( QPainter *P, KPixelXs, int FirstLine )
+void KOffsetColumn::paintFirstLine( TQPainter *P, KPixelXs, int FirstLine )
{
PaintLine = FirstLine;
paintLine( P, PaintLine++ );
}
-void KOffsetColumn::paintNextLine( QPainter *P )
+void KOffsetColumn::paintNextLine( TQPainter *P )
{
paintLine( P, PaintLine++ );
}
-void KOffsetColumn::paintEmptyColumn( QPainter *P, KPixelXs Xs, KPixelYs Ys )
+void KOffsetColumn::paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys )
{
Xs.restrictTo( XSpan );
- const QColor &ButtonColor = View->colorGroup().button();
- P->fillRect( Xs.start(), Ys.start(), Xs.width(), Ys.width(), QBrush(ButtonColor,Qt::SolidPattern) );
+ const TQColor &ButtonColor = View->colorGroup().button();
+ P->fillRect( Xs.start(), Ys.start(), Xs.width(), Ys.width(), TQBrush(ButtonColor,Qt::SolidPattern) );
}
void KOffsetColumn::setFormat( KOffsetFormat::KFormat F )
diff --git a/khexedit/lib/koffsetcolumn.h b/khexedit/lib/koffsetcolumn.h
index ae182f9..497d7ef 100644
--- a/khexedit/lib/koffsetcolumn.h
+++ b/khexedit/lib/koffsetcolumn.h
@@ -36,9 +36,9 @@ class KOffsetColumn : public KColumn
virtual ~KOffsetColumn();
public: // KColumn API
- virtual void paintFirstLine( QPainter *P, KPixelXs Xs, int FirstLine );
- virtual void paintNextLine( QPainter *P );
- virtual void paintEmptyColumn( QPainter *P, KPixelXs Xs, KPixelYs Ys );
+ virtual void paintFirstLine( TQPainter *P, KPixelXs Xs, int FirstLine );
+ virtual void paintNextLine( TQPainter *P );
+ virtual void paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys );
public:
@@ -62,7 +62,7 @@ class KOffsetColumn : public KColumn
/** recalculates all x values */
void recalcX();
/** paints full line */
- void paintLine( QPainter *P, int Line );
+ void paintLine( TQPainter *P, int Line );
protected: // user settings
diff --git a/khexedit/lib/kplainbuffer.cpp b/khexedit/lib/kplainbuffer.cpp
index 63c1db7..02b9d70 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() << QString("before: Size: %1, RawSize: %2").arg(Size).arg(RawSize) << endl;
+ //kdDebug() << TQString("before: Size: %1, RawSize: %2").arg(Size).arg(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() << QString("after: Size: %1, RawSize: %2").arg(Size).arg(RawSize) << endl;
+ //kdDebug() << TQString("after: Size: %1, RawSize: %2").arg(Size).arg(RawSize) << endl;
Modified = true;
return Length;
diff --git a/khexedit/lib/kplainbuffer.h b/khexedit/lib/kplainbuffer.h
index 27bbbad..31851ae 100644
--- a/khexedit/lib/kplainbuffer.h
+++ b/khexedit/lib/kplainbuffer.h
@@ -65,7 +65,7 @@ class KPlainBuffer : public KDataBuffer
virtual int find( const char*KeyData, int Length, KSection Section ) const;
virtual int rfind( const char*, int Length, int Pos = -1 ) const;
-/* virtual int find( const QString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
+/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
public:
void setReadOnly( bool RO = true );
diff --git a/khexedit/lib/ksectionlist.h b/khexedit/lib/ksectionlist.h
index 7328e42..1acdf5c 100644
--- a/khexedit/lib/ksectionlist.h
+++ b/khexedit/lib/ksectionlist.h
@@ -19,13 +19,13 @@
#define KHE_KSECTIONLIST_H
// qt specific
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
// lib specific
#include "ksection.h"
namespace KHE {
-typedef QValueList<KSection> KSectionBasicList;
+typedef TQValueList<KSection> KSectionBasicList;
/**
@author Friedrich W. H. Kossebau
*/
diff --git a/khexedit/lib/kvaluecoltextexport.cpp b/khexedit/lib/kvaluecoltextexport.cpp
index 009ad54..190018f 100644
--- a/khexedit/lib/kvaluecoltextexport.cpp
+++ b/khexedit/lib/kvaluecoltextexport.cpp
@@ -38,7 +38,7 @@ KValueColTextExport::~KValueColTextExport()
-void KValueColTextExport::print( QString &T ) const
+void KValueColTextExport::print( TQString &T ) const
{
int p = 0;
int pEnd = NoOfBytesPerLine;
@@ -48,7 +48,7 @@ void KValueColTextExport::print( QString &T ) const
if( PrintLine == CoordRange.end().line() )
pEnd = CoordRange.end().pos()+1;
- QString E;
+ TQString E;
E.setLength( ByteCodec->encodingWidth() );
// draw individual chars
uint e = 0;
diff --git a/khexedit/lib/kvaluecoltextexport.h b/khexedit/lib/kvaluecoltextexport.h
index be6bab4..c1987de 100644
--- a/khexedit/lib/kvaluecoltextexport.h
+++ b/khexedit/lib/kvaluecoltextexport.h
@@ -35,7 +35,7 @@ class KValueColTextExport : public KBufferColTextExport
virtual ~KValueColTextExport();
protected:
- virtual void print( QString &T ) const;
+ virtual void print( TQString &T ) const;
protected:
diff --git a/khexedit/lib/kvaluecolumn.cpp b/khexedit/lib/kvaluecolumn.cpp
index 82da795..62d36c0 100644
--- a/khexedit/lib/kvaluecolumn.cpp
+++ b/khexedit/lib/kvaluecolumn.cpp
@@ -16,7 +16,7 @@
// qt specific
-#include <qpainter.h>
+#include <tqpainter.h>
// lib specific
#include "kcolumnsview.h"
#include "kbuffercursor.h"
@@ -101,26 +101,26 @@ void KValueColumn::recalcByteWidth()
// perhaps sometimes there will be a grammar
-void KValueColumn::paintEditedByte( QPainter *P, char Byte, const QString &EditBuffer )
+void KValueColumn::paintEditedByte( TQPainter *P, char Byte, const TQString &EditBuffer )
{
KHEChar B = Codec->decode( Byte );
- const QColorGroup &CG = View->colorGroup();
+ const TQColorGroup &CG = View->colorGroup();
- P->fillRect( 0,0,ByteWidth,LineHeight, QBrush(colorForChar(B),Qt::SolidPattern) );
+ P->fillRect( 0,0,ByteWidth,LineHeight, TQBrush(colorForChar(B),Qt::SolidPattern) );
drawCode( P, EditBuffer, CG.base() );
}
-void KValueColumn::drawByte( QPainter *P, char Byte, KHEChar /*B*/, const QColor &Color ) const
+void KValueColumn::drawByte( TQPainter *P, char Byte, KHEChar /*B*/, const TQColor &Color ) const
{
ByteCodec->encode( CodedByte, 0, Byte );
drawCode( P, CodedByte, Color );
}
-void KValueColumn::drawCode( QPainter *P, const QString &Code, const QColor &Color ) const
+void KValueColumn::drawCode( TQPainter *P, const TQString &Code, const TQColor &Color ) const
{
P->setPen( Color );
if( Coding == BinaryCoding )
diff --git a/khexedit/lib/kvaluecolumn.h b/khexedit/lib/kvaluecolumn.h
index cc25929..7aa287e 100644
--- a/khexedit/lib/kvaluecolumn.h
+++ b/khexedit/lib/kvaluecolumn.h
@@ -40,7 +40,7 @@ class KValueColumn : public KBufferColumn
virtual ~KValueColumn();
public:
- void paintEditedByte( QPainter *P, char Byte, const QString &EditBuffer );
+ void paintEditedByte( TQPainter *P, char Byte, const TQString &EditBuffer );
public: // modification access
/**
@@ -61,11 +61,11 @@ class KValueColumn : public KBufferColumn
protected: // KBufferColumn API
- virtual void drawByte( QPainter *P, char Byte, KHEChar B, const QColor &Color ) const;
+ virtual void drawByte( TQPainter *P, char Byte, KHEChar B, const TQColor &Color ) const;
virtual void recalcByteWidth();
protected:
- void drawCode( QPainter *P, const QString &Code, const QColor &Color ) const;
+ void drawCode( TQPainter *P, const TQString &Code, const TQColor &Color ) const;
protected: // set data
/** */
@@ -77,7 +77,7 @@ class KValueColumn : public KBufferColumn
protected: // buffered data
/** buffer to hold the formatted coding */
- mutable QString CodedByte;
+ mutable TQString CodedByte;
/** calculated: Offset in pixels of the second half of the binary */
KPixelX BinaryHalfOffset;
};