summaryrefslogtreecommitdiffstats
path: root/python/pyqt/pyuic3/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'python/pyqt/pyuic3/main.cpp')
-rw-r--r--python/pyqt/pyuic3/main.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/python/pyqt/pyuic3/main.cpp b/python/pyqt/pyuic3/main.cpp
index 265a536c..fa93b9e3 100644
--- a/python/pyqt/pyuic3/main.cpp
+++ b/python/pyqt/pyuic3/main.cpp
@@ -23,13 +23,13 @@
#include "parser.h"
#include "widgetdatabase.h"
#include "domtool.h"
-#include <qapplication.h>
-#include <qfile.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#define NO_STATIC_COLORS
#include <globaldefs.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <stdio.h>
#include <stdlib.h>
@@ -39,20 +39,20 @@ int main( int argc, char * argv[] )
bool testCode = FALSE, execCode = FALSE;
bool subcl = FALSE;
bool imagecollection = FALSE;
- QStringList images;
+ TQStringList images;
const char *error = 0;
const char* fileName = 0;
- QCString outputFile;
+ TQCString outputFile;
const char* projectName = 0;
const char* trmacro = 0;
bool fix = FALSE;
- QApplication app(argc, argv, FALSE);
- QString className, uicClass;
+ TQApplication app(argc, argv, FALSE);
+ TQString className, uicClass;
for ( int n = 1; n < argc && error == 0; n++ ) {
- QCString arg = argv[n];
+ TQCString arg = argv[n];
if ( arg[0] == '-' ) { // option
- QCString opt = &arg[1];
+ TQCString opt = &arg[1];
if ( opt[0] == 'o' ) { // output redirection
if ( opt[1] == '\0' ) {
if ( !(n < argc-1) ) {
@@ -107,7 +107,7 @@ int main( int argc, char * argv[] )
error = "Missing Python indent";
break;
}
- tabstop = QCString(argv[++n]).toUInt(&ok);
+ tabstop = TQCString(argv[++n]).toUInt(&ok);
} else
tabstop = opt.mid(1).toUInt(&ok);
@@ -150,7 +150,7 @@ int main( int argc, char * argv[] )
"Options:\n"
"\t-o file\t\tWrite output to file rather than stdout\n"
"\t-p indent\tSet the Python indent in spaces (0 to use a tab)\n"
- "\t-tr func\tUse func() rather than QApplication.translate() for i18n\n"
+ "\t-tr func\tUse func() rather than TQApplication.translate() for i18n\n"
"\t-x\t\tGenerate extra code to test and display the class\n"
"\t-test\t\tGenerate extra code to test but not display the class\n"
"\t-version\tDisplay version of pyuic\n"
@@ -161,7 +161,7 @@ int main( int argc, char * argv[] )
Uic::setIndent(indent);
- QFile fileOut;
+ TQFile fileOut;
if ( !outputFile.isEmpty() ) {
fileOut.setName( outputFile );
if (!fileOut.open( IO_WriteOnly ) )
@@ -169,30 +169,30 @@ int main( int argc, char * argv[] )
} else {
fileOut.open( IO_WriteOnly, stdout );
}
- QTextStream out( &fileOut );
+ TQTextStream out( &fileOut );
if ( imagecollection ) {
- out.setEncoding( QTextStream::Latin1 );
+ out.setEncoding( TQTextStream::Latin1 );
out << "# -*- coding: latin-1 -*-\n\n";
Uic::embed( out, projectName, images );
return 0;
}
- out.setEncoding( QTextStream::UnicodeUTF8 );
- QFile file( fileName );
+ out.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
qFatal( "pyuic: Could not open file '%s' ", fileName );
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( !doc.setContent( &file, &errMsg, &errLine ) )
- qFatal( QString("pyuic: Failed to parse %s: ") + errMsg + QString (" in line %d\n"), fileName, errLine );
+ qFatal( TQString("pyuic: Failed to parse %s: ") + errMsg + TQString (" in line %d\n"), fileName, errLine );
- QDomElement e = doc.firstChild().toElement();
+ TQDomElement e = doc.firstChild().toElement();
if ( e.hasAttribute("version") && e.attribute("version").toDouble() > 3.3 ) {
- qWarning( QString("pyuic: File generated with too recent version of Qt Designer (%s vs. %s)"),
+ qWarning( TQString("pyuic: File generated with too recent version of Qt Designer (%s vs. %s)"),
e.attribute("version").latin1(), QT_VERSION_STR );
return 1;
}
@@ -209,7 +209,7 @@ int main( int argc, char * argv[] )
if ( !subcl ) {
out << "# Form implementation generated from reading ui file '" << fileName << "'" << endl;
out << "#" << endl;
- out << "# Created: " << QDateTime::currentDateTime().toString() << endl;
+ out << "# Created: " << TQDateTime::currentDateTime().toString() << endl;
out << "# by: The PyQt User Interface Compiler (pyuic) " << PYQT_VERSION << endl;
out << "#" << endl;
out << "# WARNING! All changes made in this file will be lost!" << endl;
@@ -228,8 +228,8 @@ int main( int argc, char * argv[] )
out << endl;
out << indent << "if __name__ == \"__main__\":" << endl;
++indent;
- out << indent << "a = QApplication(sys.argv)" << endl;
- out << indent << "QObject.connect(a,SIGNAL(\"lastWindowClosed()\"),a,SLOT(\"quit()\"))" << endl;
+ out << indent << "a = TQApplication(sys.argv)" << endl;
+ out << indent << "TQObject.connect(a,TQT_SIGNAL(\"lastWindowClosed()\"),a,TQT_SLOT(\"quit()\"))" << endl;
out << indent << "w = " << (subcl ? className : uicClass) << "()" << endl;
out << indent << "a.setMainWidget(w)" << endl;