summaryrefslogtreecommitdiffstats
path: root/libkdepim/kxface.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkdepim/kxface.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/kxface.cpp')
-rw-r--r--libkdepim/kxface.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/libkdepim/kxface.cpp b/libkdepim/kxface.cpp
index 574a0aa9..ecd24bc2 100644
--- a/libkdepim/kxface.cpp
+++ b/libkdepim/kxface.cpp
@@ -27,12 +27,12 @@
#include <kdebug.h>
-#include <qbuffer.h>
-#include <qcstring.h>
-#include <qimage.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qpainter.h>
+#include <tqbuffer.h>
+#include <tqcstring.h>
+#include <tqimage.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqpainter.h>
#include <stdlib.h>
#include <string.h>
@@ -83,17 +83,17 @@ KXFace::~KXFace()
{
}
-QString KXFace::fromImage( const QImage &image )
+TQString KXFace::fromImage( const TQImage &image )
{
if( image.isNull() )
- return QString::null;
+ return TQString::null;
- QImage scaledImg = image.smoothScale( 48, 48 );
- QByteArray ba;
- QBuffer buffer( ba );
+ TQImage scaledImg = image.smoothScale( 48, 48 );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
scaledImg.save( &buffer, "XBM" );
- QString xbm( ba );
+ TQString xbm( ba );
xbm.remove( 0, xbm.find( "{" ) + 1 );
xbm.truncate( xbm.find( "}" ) );
xbm.remove( " " );
@@ -101,7 +101,7 @@ QString KXFace::fromImage( const QImage &image )
xbm.remove( "0x" );
xbm.remove( "\n" );
xbm.truncate( 576 );
- QCString tmp = QCString( xbm.latin1() );
+ TQCString tmp = TQCString( xbm.latin1() );
uint len = tmp.length();
for( uint i=0; i<len; ++i )
{
@@ -132,8 +132,8 @@ QString KXFace::fromImage( const QImage &image )
tmp[i-1] = t;
}
}
- tmp.replace( QRegExp( "(\\w{12})" ), "\\1\n" );
- tmp.replace( QRegExp( "(\\w{4})" ), "0x\\1," );
+ tmp.replace( TQRegExp( "(\\w{12})" ), "\\1\n" );
+ tmp.replace( TQRegExp( "(\\w{4})" ), "0x\\1," );
len = tmp.length();
char *fbuf = (char *)malloc( len + 1 );
strncpy( fbuf, (const char *)tmp, len );
@@ -144,21 +144,21 @@ QString KXFace::fromImage( const QImage &image )
GenFace();
CompAll( fbuf );
}
- QString ret( fbuf );
+ TQString ret( fbuf );
free( fbuf );
return ret;
}
-QImage KXFace::toImage(const QString &xface)
+TQImage KXFace::toImage(const TQString &xface)
{
if ( xface.length() > MAX_XFACE_LENGTH )
- return QImage();
+ return TQImage();
char *fbuf = (char *)malloc( MAX_XFACE_LENGTH );
memset( fbuf, '\0', MAX_XFACE_LENGTH );
strncpy( fbuf, xface.latin1(), xface.length() );
- QCString img;
+ TQCString img;
if ( !( status = setjmp( comp_env ) ) )
{
UnCompAll( fbuf );/* compress otherwise */
@@ -166,7 +166,7 @@ QImage KXFace::toImage(const QString &xface)
img = WriteFace();
}
free( fbuf );
- QImage p;
+ TQImage p;
p.loadFromData( img, "XBM" );
return p;
@@ -327,13 +327,13 @@ void KXFace::BigClear()
B.b_words = 0;
}
-QCString KXFace::WriteFace()
+TQCString KXFace::WriteFace()
{
register char *s;
register int i, j, bits, digits, words;
int digsperword = DIGSPERWORD;
int wordsperline = WORDSPERLINE;
- QCString t( "#define noname_width 48\n#define noname_height 48\nstatic char noname_bits[] = {\n " );
+ TQCString t( "#define noname_width 48\n#define noname_height 48\nstatic char noname_bits[] = {\n " );
j = t.length() - 1;
s = F;