diff options
Diffstat (limited to 'puic/subclassing.cpp')
-rw-r--r-- | puic/subclassing.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/puic/subclassing.cpp b/puic/subclassing.cpp index 51a5e55..f49dd27 100644 --- a/puic/subclassing.cpp +++ b/puic/subclassing.cpp @@ -1,7 +1,7 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** -** This file is part of Qt Designer. +** This file is part of TQt Designer. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -38,19 +38,19 @@ \sa createSubDecl() */ -void Uic::createSubImpl( const QDomElement &e, const QString& subClass ) +void Uic::createSubImpl( const TQDomElement &e, const TQString& subClass ) { - QDomElement n; - QDomNodeList nl; + TQDomElement n; + TQDomNodeList nl; int i; - QString objClass = getClassName( e ); + TQString objClass = getClassName( e ); if ( objClass.isEmpty() ) return; out << indent << "package " << subClass << ";" << endl; - out << indent << "use Qt;" << endl; + out << indent << "use TQt;" << endl; out << indent << "use " << nameOfClass << ";" << endl; - out << indent << "use Qt::isa qw("<< nameOfClass << ");" << endl; + out << indent << "use TQt::isa qw("<< nameOfClass << ");" << endl; out << endl; @@ -58,11 +58,11 @@ void Uic::createSubImpl( const QDomElement &e, const QString& subClass ) out << indent << "sub NEW" << endl; out << indent << "{" << endl; ++indent; - if ( objClass == "Qt::Dialog" || objClass == "Qt::Wizard" ) { + if ( objClass == "TQt::Dialog" || objClass == "TQt::Wizard" ) { out << indent << "shift->SUPER::NEW(@_[0..3]);" << endl; - } else if ( objClass == "Qt::Widget") { + } else if ( objClass == "TQt::Widget") { out << indent << "shift->SUPER::NEW(@_[0..2]);" << endl; - } else if ( objClass == "Qt::MainWindow" ) { + } else if ( objClass == "TQt::MainWindow" ) { out << indent << "shift->SUPER::NEW(@_[0..2]);" << endl; out << indent << "statusBar();" << endl; isMainWindow = TRUE; @@ -74,12 +74,12 @@ void Uic::createSubImpl( const QDomElement &e, const QString& subClass ) out << endl; // find additional functions - QStringList publicSlots, protectedSlots, privateSlots; - QStringList publicSlotTypes, protectedSlotTypes, privateSlotTypes; - QStringList publicSlotSpecifier, protectedSlotSpecifier, privateSlotSpecifier; - QStringList publicFuncts, protectedFuncts, privateFuncts; - QStringList publicFunctRetTyp, protectedFunctRetTyp, privateFunctRetTyp; - QStringList publicFunctSpec, protectedFunctSpec, privateFunctSpec; + TQStringList publicSlots, protectedSlots, privateSlots; + TQStringList publicSlotTypes, protectedSlotTypes, privateSlotTypes; + TQStringList publicSlotSpecifier, protectedSlotSpecifier, privateSlotSpecifier; + TQStringList publicFuncts, protectedFuncts, privateFuncts; + TQStringList publicFunctRetTyp, protectedFunctRetTyp, privateFunctRetTyp; + TQStringList publicFunctSpec, protectedFunctSpec, privateFunctSpec; nl = e.parentNode().toElement().elementsByTagName( "slot" ); @@ -88,15 +88,15 @@ void Uic::createSubImpl( const QDomElement &e, const QString& subClass ) if ( n.parentNode().toElement().tagName() != "slots" && n.parentNode().toElement().tagName() != "connections" ) continue; - QString l = n.attribute( "language", "C++" ); + TQString l = n.attribute( "language", "C++" ); if ( l != "C++" && l != "Perl" ) //- mmh continue; - QString returnType = n.attribute( "returnType", "void" ); - QString functionName = n.firstChild().toText().data().stripWhiteSpace(); + TQString returnType = n.attribute( "returnType", "void" ); + TQString functionName = n.firstChild().toText().data().stripWhiteSpace(); if ( functionName.endsWith( ";" ) ) functionName = functionName.left( functionName.length() - 1 ); - QString specifier = n.attribute( "specifier" ); - QString access = n.attribute( "access" ); + TQString specifier = n.attribute( "specifier" ); + TQString access = n.attribute( "access" ); if ( access == "protected" ) { protectedSlots += functionName; protectedSlotTypes += returnType; @@ -115,19 +115,19 @@ void Uic::createSubImpl( const QDomElement &e, const QString& subClass ) nl = e.parentNode().toElement().elementsByTagName( "function" ); for ( i = 0; i < (int) nl.length(); i++ ) { n = nl.item(i).toElement(); - QString fname = n.attribute( "name" ); + TQString fname = n.attribute( "name" ); fname = Parser::cleanArgs( fname ); if ( n.parentNode().toElement().tagName() != "functions" ) continue; - QString l = n.attribute( "language", "C++" ); + TQString l = n.attribute( "language", "C++" ); if ( l != "C++" && l != "Perl" ) //- mmh continue; - QString returnType = n.attribute( "returnType", "void" ); - QString functionName = n.firstChild().toText().data().stripWhiteSpace(); + TQString returnType = n.attribute( "returnType", "void" ); + TQString functionName = n.firstChild().toText().data().stripWhiteSpace(); if ( functionName.endsWith( ";" ) ) functionName = functionName.left( functionName.length() - 1 ); - QString specifier = n.attribute( "specifier" ); - QString access = n.attribute( "access" ); + TQString specifier = n.attribute( "specifier" ); + TQString access = n.attribute( "access" ); if ( access == "protected" ) { protectedFuncts += functionName; protectedFunctRetTyp += returnType; @@ -143,7 +143,7 @@ void Uic::createSubImpl( const QDomElement &e, const QString& subClass ) } } - // FIXME PerlQt: distinguishing public/protected/private slots does not make any sense in the forseable future + // FIXME PerlTQt: distinguishing public/protected/private slots does not make any sense in the forseable future // but nevermind, never forget somewhere far beyond the sky, Ashley Winters is furbishing *Plan 42* ! :) if ( !publicFuncts.isEmpty() ) @@ -167,13 +167,13 @@ void Uic::createSubImpl( const QDomElement &e, const QString& subClass ) out << "1;" << endl; } -void Uic::writeFunctionsSubImpl( const QStringList &fuLst, const QStringList &typLst, const QStringList &specLst, - const QString &subClass, const QString &descr ) +void Uic::writeFunctionsSubImpl( const TQStringList &fuLst, const TQStringList &typLst, const TQStringList &specLst, + const TQString &subClass, const TQString &descr ) { - QValueListConstIterator<QString> it, it2, it3; + TQValueListConstIterator<TQString> it, it2, it3; for ( it = fuLst.begin(), it2 = typLst.begin(), it3 = specLst.begin(); it != fuLst.end(); ++it, ++it2, ++it3 ) { - QString type = *it2; + TQString type = *it2; if ( type.isEmpty() ) type = "void"; if ( *it3 == "non virtual" ) |