From 479f5f799523bffbcc83dff581a2299c047c6fff Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:44:01 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- python/pyqt/pyuic3/embed.cpp | 64 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'python/pyqt/pyuic3/embed.cpp') diff --git a/python/pyqt/pyuic3/embed.cpp b/python/pyqt/pyuic3/embed.cpp index 04f6494c..da1c1d5c 100644 --- a/python/pyqt/pyuic3/embed.cpp +++ b/python/pyqt/pyuic3/embed.cpp @@ -21,11 +21,11 @@ **********************************************************************/ #include "uic.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -42,17 +42,17 @@ struct EmbedImage int width, height, depth; int numColors; QRgb* colorTable; - QString name; - QString cname; + TQString name; + TQString cname; bool alpha; #ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION ulong compressed; #endif }; -static QString convertToCIdentifier( const char *s ) +static TQString convertToCIdentifier( const char *s ) { - QString r = s; + TQString r = s; int len = r.length(); if ( len > 0 && !isalpha( (char)r[0].latin1() ) ) r[0] = '_'; @@ -64,16 +64,16 @@ static QString convertToCIdentifier( const char *s ) } -static ulong embedData( QTextStream& out, const uchar* input, int nbytes ) +static ulong embedData( TQTextStream& out, const uchar* input, int nbytes ) { #ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION - QByteArray bazip( qCompress( input, nbytes ) ); + TQByteArray bazip( qCompress( input, nbytes ) ); uint len = bazip.size(); #else uint len = (uint)nbytes; #endif static const char hexdigits[] = "0123456789abcdef"; - QString s; + TQString s; for ( uint i=0; i list_image; + TQPtrList list_image; list_image.setAutoDelete( TRUE ); int image_count = 0; for ( it = images.begin(); it != images.end(); ++it ) { - QImage img; + TQImage img; if ( !img.load( *it ) ) { fprintf( stderr, "pyuic: cannot load image file %s\n", (*it).latin1() ); continue; @@ -161,14 +161,14 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image e->colorTable = new QRgb[e->numColors]; e->alpha = img.hasAlphaBuffer(); memcpy(e->colorTable, img.colorTable(), e->numColors*sizeof(QRgb)); - QFileInfo fi( *it ); + TQFileInfo fi( *it ); e->name = fi.fileName(); - e->cname = QString("image_%1").arg( image_count++); + e->cname = TQString("image_%1").arg( image_count++); list_image.append( e ); out << "# " << *it << "\n"; - QString s; + TQString s; if ( e->depth == 1 ) - img = img.convertBitOrder(QImage::BigEndian); + img = img.convertBitOrder(TQImage::BigEndian); out << s.sprintf( "%s_data =", (const char *)e->cname ); #ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION @@ -230,7 +230,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image // Keep the data object alive until we have a deep copy of the image. out << indent << "data = qUncompress(data).data()\n"; #endif - out << indent << "img = QImage(data,w,h,depth,colTab,nrCol,QImage.BigEndian).copy()\n"; + out << indent << "img = TQImage(data,w,h,depth,colTab,nrCol,TQImage.BigEndian).copy()\n"; out << "\n"; out << indent << "if alpha:\n"; ++indent; @@ -241,21 +241,21 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image --indent; --indent; out << endl; - out << indent << "return QImage()\n"; + out << indent << "return TQImage()\n"; --indent; out << "\n"; out << "\n"; - out << indent << "class MimeSourceFactory_" << cProject << "(QMimeSourceFactory):\n"; + out << indent << "class MimeSourceFactory_" << cProject << "(TQMimeSourceFactory):\n"; ++indent; out << indent << "def __init__(self):\n"; ++indent; - out << indent << "QMimeSourceFactory.__init__(self)\n"; + out << indent << "TQMimeSourceFactory.__init__(self)\n"; out << "\n"; --indent; out << indent << "def data(self,abs_name):\n"; ++indent; - out << indent << "d = QMimeSourceFactory.data(self,abs_name)\n"; + out << indent << "d = TQMimeSourceFactory.data(self,abs_name)\n"; out << indent << "if d or abs_name.isNull():\n"; ++indent; out << indent << "return d\n"; @@ -267,7 +267,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image out << indent << "self.setImage(abs_name,img)\n"; --indent; out << "\n"; - out << indent << "return QMimeSourceFactory.data(self,abs_name)\n"; + out << indent << "return TQMimeSourceFactory.data(self,abs_name)\n"; --indent; --indent; out << "\n"; @@ -283,7 +283,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image out << indent << "if factory is None:\n"; ++indent; out << indent << "factory = MimeSourceFactory_" << cProject << "()\n"; - out << indent << "QMimeSourceFactory.defaultFactory().addFactory(factory)\n"; + out << indent << "TQMimeSourceFactory.defaultFactory().addFactory(factory)\n"; --indent; --indent; out << "\n"; @@ -295,7 +295,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image out << "\n"; out << indent << "if factory is not None:\n"; ++indent; - out << indent << "QMimeSourceFactory.defaultFactory().removeFactory(factory)\n"; + out << indent << "TQMimeSourceFactory.defaultFactory().removeFactory(factory)\n"; out << indent << "factory = None\n"; --indent; --indent; -- cgit v1.2.3