summaryrefslogtreecommitdiffstats
path: root/pyuic3
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-14 21:12:44 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-14 21:12:44 -0600
commite87fff3247e64b4e9509be991a8f2d6bd4ccfacc (patch)
tree71a3198fc141420d65eefa7036159af85894cf7d /pyuic3
parent06500cd8e9be747a323920c9475fba0e6618d2de (diff)
downloadpytqt-e87fff3247e64b4e9509be991a8f2d6bd4ccfacc.tar.gz
pytqt-e87fff3247e64b4e9509be991a8f2d6bd4ccfacc.zip
Update various qt function definitions and static methods for tqt3
Diffstat (limited to 'pyuic3')
-rw-r--r--pyuic3/embed.cpp8
-rw-r--r--pyuic3/form.cpp10
-rw-r--r--pyuic3/main.cpp6
-rw-r--r--pyuic3/uic.cpp10
-rw-r--r--pyuic3/uic.h4
5 files changed, 19 insertions, 19 deletions
diff --git a/pyuic3/embed.cpp b/pyuic3/embed.cpp
index 3e54d83..17efd0d 100644
--- a/pyuic3/embed.cpp
+++ b/pyuic3/embed.cpp
@@ -32,7 +32,7 @@
// on embedded, we do not compress image data. Rationale: by mapping
// the ready-only data directly into memory we are both faster and
// more memory efficient
-#if (QT_VERSION < 0x030100 || defined(Q_WS_QWS)) && !defined(QT_NO_IMAGE_COLLECTION_COMPRESSION)
+#if (TQT_VERSION < 0x030100 || defined(Q_WS_QWS)) && !defined(QT_NO_IMAGE_COLLECTION_COMPRESSION)
#define QT_NO_IMAGE_COLLECTION_COMPRESSION
#endif
@@ -129,7 +129,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima
out << "# " << *it << "\n";
out << "#\n";
out << "# Created: " << TQDateTime::currentDateTime().toString() << "\n";
- out << "# by: The PyTQt User Interface Compiler (pyuic) " << PYQT_VERSION << "\n";
+ out << "# by: The PyTQt User Interface Compiler (pyuic) " << PYTQT_VERSION << "\n";
out << "#\n";
out << "# WARNING! All changes made in this file will be lost!\n";
@@ -137,7 +137,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima
out << "\n";
out << "from qt import TQImage, TQMimeSourceFactory";
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
- out << ", qUncompress";
+ out << ", tqUncompress";
#endif
out << "\n";
out << "\n";
@@ -228,7 +228,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima
++indent;
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
// Keep the data object alive until we have a deep copy of the image.
- out << indent << "data = qUncompress(data).data()\n";
+ out << indent << "data = tqUncompress(data).data()\n";
#endif
out << indent << "img = TQImage(data,w,h,depth,colTab,nrCol,TQImage.BigEndian).copy()\n";
out << "\n";
diff --git a/pyuic3/form.cpp b/pyuic3/form.cpp
index 6aa5aa5..1e5a81e 100644
--- a/pyuic3/form.cpp
+++ b/pyuic3/form.cpp
@@ -30,13 +30,13 @@
#define NO_STATIC_COLORS
#include <globaldefs.h>
-#if QT_VERSION < 0x030100
+#if TQT_VERSION < 0x030100
#include <zlib.h>
#endif
static TQByteArray unzipXPM( TQString data, ulong& length )
{
-#if QT_VERSION >= 0x030100
+#if TQT_VERSION >= 0x030100
const int lengthOffset = 4;
int baSize = data.length() / 2 + lengthOffset;
uchar *ba = new uchar[ baSize ];
@@ -55,13 +55,13 @@ static TQByteArray unzipXPM( TQString data, ulong& length )
r += l - 'a' + 10;
ba[ i ] = r;
}
- // qUncompress() expects the first 4 bytes to be the expected length of the
+ // tqUncompress() expects the first 4 bytes to be the expected length of the
// uncompressed data
ba[0] = ( length & 0xff000000 ) >> 24;
ba[1] = ( length & 0x00ff0000 ) >> 16;
ba[2] = ( length & 0x0000ff00 ) >> 8;
ba[3] = ( length & 0x000000ff );
- TQByteArray baunzip = qUncompress( ba, baSize );
+ TQByteArray baunzip = tqUncompress( ba, baSize );
delete[] ba;
return baunzip;
#else
@@ -395,7 +395,7 @@ void Uic::createFormImpl( const TQDomElement &e )
}
out << endl;
} else if ( externPixmaps ) {
-#if QT_VERSION >= 0x030100
+#if TQT_VERSION >= 0x030100
pixmapLoaderFunction = "TQPixmap.fromMimeSource";
#else
out << indent << "def uic_load_pixmap_" << objName << "(name):" << endl;
diff --git a/pyuic3/main.cpp b/pyuic3/main.cpp
index 6049a70..c38980d 100644
--- a/pyuic3/main.cpp
+++ b/pyuic3/main.cpp
@@ -92,7 +92,7 @@ int main( int argc, char * argv[] )
} else if ( opt == "version" ) {
fprintf( stderr,
"Python User Interface Compiler %s for TQt version %s\n",
- PYQT_VERSION, QT_VERSION_STR );
+ PYTQT_VERSION, TQT_VERSION_STR );
return 1;
} else if ( opt == "help" ) {
break;
@@ -193,7 +193,7 @@ int main( int argc, char * argv[] )
TQDomElement e = doc.firstChild().toElement();
if ( e.hasAttribute("version") && e.attribute("version").toDouble() > 3.3 ) {
qWarning( TQString("pyuic: File generated with too recent version of TQt Designer (%s vs. %s)"),
- e.attribute("version").latin1(), QT_VERSION_STR );
+ e.attribute("version").latin1(), TQT_VERSION_STR );
return 1;
}
@@ -210,7 +210,7 @@ int main( int argc, char * argv[] )
out << "# Form implementation generated from reading ui file '" << fileName << "'" << endl;
out << "#" << endl;
out << "# Created: " << TQDateTime::currentDateTime().toString() << endl;
- out << "# by: The PyTQt User Interface Compiler (pyuic) " << PYQT_VERSION << endl;
+ out << "# by: The PyTQt User Interface Compiler (pyuic) " << PYTQT_VERSION << endl;
out << "#" << endl;
out << "# WARNING! All changes made in this file will be lost!" << endl;
out << endl;
diff --git a/pyuic3/uic.cpp b/pyuic3/uic.cpp
index 6189639..16c027e 100644
--- a/pyuic3/uic.cpp
+++ b/pyuic3/uic.cpp
@@ -80,7 +80,7 @@ bool Uic::toBool( const TQString& s )
TQString Uic::fixString( const TQString &str, bool encode )
{
-#if QT_VERSION >= 0x030100
+#if TQT_VERSION >= 0x030100
TQString s;
if ( !encode ) {
s = str;
@@ -182,7 +182,7 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream,
pixmapLoaderFunction = getPixmapLoaderFunction( doc.firstChild().toElement() );
nameOfClass = getFormClassName( doc.firstChild().toElement() );
-#if QT_VERSION >= 0x030300
+#if TQT_VERSION >= 0x030300
uiFileVersion = doc.firstChild().toElement().attribute("version");
#endif
stdsetdef = toBool( doc.firstChild().toElement().attribute("stdsetdef") );
@@ -402,7 +402,7 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent )
else
continue;
bool subActionsDone = FALSE;
-#if QT_VERSION >= 0x030300
+#if TQT_VERSION >= 0x030300
bool hasMenuText = FALSE;
TQString actionText;
#endif
@@ -424,7 +424,7 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent )
else
call += "setProperty(\"" + prop + "\",TQVariant(" + value + "))";
-#if QT_VERSION >= 0x030300
+#if TQT_VERSION >= 0x030300
if (prop == "menuText")
hasMenuText = TRUE;
else if (prop == "text")
@@ -441,7 +441,7 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent )
subActionsDone = TRUE;
}
}
-#if QT_VERSION >= 0x030300
+#if TQT_VERSION >= 0x030300
// workaround for loading pre-3.3 files expecting bogus TQAction behavior
if (!hasMenuText && !actionText.isEmpty() && uiFileVersion < "3.3")
trout << indent << "self." << objName << ".setMenuText(" << actionText << ")" << endl;
diff --git a/pyuic3/uic.h b/pyuic3/uic.h
index 12f704a..1cda66b 100644
--- a/pyuic3/uic.h
+++ b/pyuic3/uic.h
@@ -30,7 +30,7 @@
#include <tqvariant.h>
-#define PYQT_VERSION "3.18.1"
+#define PYTQT_VERSION "3.18.1"
class PyIndent
@@ -143,7 +143,7 @@ private:
uint stdsetdef : 1;
uint externPixmaps : 1;
-#if QT_VERSION >= 0x030300
+#if TQT_VERSION >= 0x030300
TQString uiFileVersion;
#endif
TQString nameOfClass;