summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/designer/rbuic/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtruby/rubylib/designer/rbuic/main.cpp')
-rw-r--r--qtruby/rubylib/designer/rbuic/main.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/qtruby/rubylib/designer/rbuic/main.cpp b/qtruby/rubylib/designer/rbuic/main.cpp
index a80d8785..4bebf46c 100644
--- a/qtruby/rubylib/designer/rbuic/main.cpp
+++ b/qtruby/rubylib/designer/rbuic/main.cpp
@@ -36,19 +36,19 @@
#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>
#include <zlib.h>
#define RBUIC_VERSION "0.9"
-void getDBConnections( Uic& uic, QString& s);
+void getDBConnections( Uic& uic, TQString& s);
int main( int argc, char * argv[] )
{
@@ -56,7 +56,7 @@ int main( int argc, char * argv[] )
bool execCode = false;
bool subcl = false;
bool imagecollection = false;
- QStringList images;
+ TQStringList images;
const char *error = 0;
const char* fileName = 0;
const char* className = 0;
@@ -66,14 +66,14 @@ int main( int argc, char * argv[] )
bool nofwd = false;
bool useKDE = false;
bool fix = false;
- QApplication app(argc, argv, false);
- QString uicClass;
+ TQApplication app(argc, argv, false);
+ TQString 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) ) {
@@ -132,7 +132,7 @@ int main( int argc, char * argv[] )
error = "Missing indent";
break;
}
- tabstop = QCString(argv[++n]).toUInt(&ok);
+ tabstop = TQCString(argv[++n]).toUInt(&ok);
} else
tabstop = opt.mid(1).toUInt(&ok);
@@ -185,7 +185,7 @@ int main( int argc, char * argv[] )
Uic::setIndent(indent);
- QFile fileOut;
+ TQFile fileOut;
if ( outputFile ) {
fileOut.setName( outputFile );
if (!fileOut.open( IO_WriteOnly ) )
@@ -193,25 +193,25 @@ 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 );
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( "rbuic: Could not open file '%s' ", fileName );
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( !doc.setContent( &file, &errMsg, &errLine ) )
- qFatal( QString("rbuic: Failed to parse %s: ") + errMsg + QString (" in line %d\n"), fileName, errLine );
+ qFatal( TQString("rbuic: Failed to parse %s: ") + errMsg + TQString (" in line %d\n"), fileName, errLine );
DomTool::fixDocument( doc );
@@ -223,7 +223,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 QtRuby User Interface Compiler (rbuic)" << endl;
out << "#" << endl;
out << "# WARNING! All changes made in this file will be lost!" << endl;
@@ -244,10 +244,10 @@ int main( int argc, char * argv[] )
} else {
out << indent << "a = Qt::Application.new(ARGV)" << endl;
}
- QString s;
+ TQString s;
getDBConnections( uic, s);
out << s;
- out << indent << "w = " << (subcl? QString::fromLatin1(className) : uicClass) << ".new" << endl;
+ out << indent << "w = " << (subcl? TQString::fromLatin1(className) : uicClass) << ".new" << endl;
out << indent << "a.mainWidget = w" << endl;
out << indent << "w.show" << endl;
out << indent << "a.exec" << endl;
@@ -258,12 +258,12 @@ int main( int argc, char * argv[] )
return 0;
}
-void getDBConnections( Uic& uic, QString& s)
+void getDBConnections( Uic& uic, TQString& s)
{
int num = 0;
- for ( QStringList::Iterator it = uic.dbConnections.begin(); it != uic.dbConnections.end(); ++it ) {
+ for ( TQStringList::Iterator it = uic.dbConnections.begin(); it != uic.dbConnections.end(); ++it ) {
if ( !(*it).isEmpty()) {
- QString inc = (num ? QString::number(num+1) : QString::null);
+ TQString inc = (num ? TQString::number(num+1) : TQString::null);
s += "\n # Connection to database " + (*it) + "\n\n";
s += " DRIVER" + inc + " =\t\t'QMYSQL3'" + (inc?"":" # appropriate driver") + "\n";
s += " DATABASE" + inc + " =\t\t'foo'" + (inc?"":" # name of your database") + "\n";