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.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/qtruby/rubylib/designer/rbuic/main.cpp b/qtruby/rubylib/designer/rbuic/main.cpp
index 7e2a4f83..b3cb6905 100644
--- a/qtruby/rubylib/designer/rbuic/main.cpp
+++ b/qtruby/rubylib/designer/rbuic/main.cpp
@@ -48,7 +48,7 @@
#include <zlib.h>
#define RBUIC_VERSION "0.9"
-void getDBConnections( Uic& uic, TTQString& 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;
- TTQStringList 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;
- TTQApplication app(argc, argv, false);
- TTQString uicClass;
+ TQApplication app(argc, argv, false);
+ TQString uicClass;
for ( int n = 1; n < argc && error == 0; n++ ) {
- TTQCString arg = argv[n];
+ TQCString arg = argv[n];
if ( arg[0] == '-' ) { // option
- TTQCString 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 = TTQCString(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);
- TTQFile 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 );
}
- TTQTextStream out( &fileOut );
+ TQTextStream out( &fileOut );
if ( imagecollection ) {
- out.setEncoding( TTQTextStream::Latin1 );
+ out.setEncoding( TQTextStream::Latin1 );
Uic::embed( out, projectName, images );
return 0;
}
- out.setEncoding( TTQTextStream::UnicodeUTF8 );
- TTQFile file( fileName );
+ out.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
qFatal( "rbuic: Could not open file '%s' ", fileName );
- TTQDomDocument doc;
- TTQString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( !doc.setContent( &file, &errMsg, &errLine ) )
- qFatal( TTQString("rbuic: Failed to parse %s: ") + errMsg + TTQString (" 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: " << TTQDateTime::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 = TQt::Application.new(ARGV)" << endl;
}
- TTQString s;
+ TQString s;
getDBConnections( uic, s);
out << s;
- out << indent << "w = " << (subcl? TTQString::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, TTQString& s)
+void getDBConnections( Uic& uic, TQString& s)
{
int num = 0;
- for ( TTQStringList::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()) {
- TTQString inc = (num ? TTQString::number(num+1) : TTQString::null);
+ TQString inc = (num ? TQString::number(num+1) : TQString::null);
s += "\n # Connection to database " + (*it) + "\n\n";
s += " DRIVER" + inc + " =\t\t'TQMYSQL3'" + (inc?"":" # appropriate driver") + "\n";
s += " DATABASE" + inc + " =\t\t'foo'" + (inc?"":" # name of your database") + "\n";