diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
commit | 4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch) | |
tree | b0a7cd1c184f0003c0292eb416ed27f674f9cc43 /umbrello/umbrello/codegenerators/phpwriter.cpp | |
parent | 1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff) | |
download | tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/codegenerators/phpwriter.cpp')
-rw-r--r-- | umbrello/umbrello/codegenerators/phpwriter.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/umbrello/umbrello/codegenerators/phpwriter.cpp b/umbrello/umbrello/codegenerators/phpwriter.cpp index 6d71c102..e9dba103 100644 --- a/umbrello/umbrello/codegenerators/phpwriter.cpp +++ b/umbrello/umbrello/codegenerators/phpwriter.cpp @@ -17,8 +17,8 @@ #include "phpwriter.h" #include <kdebug.h> -#include <qregexp.h> -#include <qtextstream.h> +#include <tqregexp.h> +#include <tqtextstream.h> #include "../umldoc.h" #include "../classifier.h" @@ -2996,20 +2996,20 @@ void PhpWriter::writeClass(UMLClassifier *c) { return; } - QString classname = cleanName(c->getName()); + TQString classname = cleanName(c->getName()); //find an appropriate name for our file - QString fileName = findFileName(c, ".php"); + TQString fileName = findFileName(c, ".php"); if (fileName.isEmpty()) { emit codeGenerated(c, false); return; } - QFile filephp; + TQFile filephp; if(!openFile(filephp, fileName)) { emit codeGenerated(c, false); return; } - QTextStream php(&filephp); + TQTextStream php(&filephp); ////////////////////////////// //Start generating the code!! @@ -3017,11 +3017,11 @@ void PhpWriter::writeClass(UMLClassifier *c) { //try to find a heading file (license, coments, etc) - QString str; + TQString str; str = getHeadingFile(".php"); if(!str.isEmpty()) { - str.replace(QRegExp("%filename%"),fileName); - str.replace(QRegExp("%filepath%"),filephp.name()); + str.replace(TQRegExp("%filename%"),fileName); + str.replace(TQRegExp("%filepath%"),filephp.name()); php<<str<<m_endl; } @@ -3031,7 +3031,7 @@ void PhpWriter::writeClass(UMLClassifier *c) { findObjectsRelated(c,includes); UMLPackage *conc; for(conc = includes.first(); conc ;conc = includes.next()) { - QString headerName = findFileName(conc, ".php"); + TQString headerName = findFileName(conc, ".php"); if (headerName.isEmpty()) { php << "include '" << headerName << "';" << m_endl; } @@ -3075,7 +3075,7 @@ void PhpWriter::writeClass(UMLClassifier *c) { //maybe we should parse the string here and take multiplicity into account to decide //which container to use. UMLObject *o = a->getObject(Uml::A); - QString typeName = cleanName(o->getName()); + TQString typeName = cleanName(o->getName()); if (a->getMulti(Uml::A).isEmpty()) { php << m_indentation << "var $m_" << ";" << m_endl; } else { @@ -3089,7 +3089,7 @@ void PhpWriter::writeClass(UMLClassifier *c) { for (a = compositions.first(); a ; a = compositions.next()) { // see comment on Aggregation about multiplicity... UMLObject *o = a->getObject(Uml::A); - QString typeName = cleanName(o->getName()); + TQString typeName = cleanName(o->getName()); if (a->getMulti(Uml::A).isEmpty()) { php << m_indentation << "var $m_" << ";" << m_endl; } else { @@ -3112,7 +3112,7 @@ void PhpWriter::writeClass(UMLClassifier *c) { php << m_endl; php << m_indentation << "/**" << m_endl; - QString temp = "initAttributes sets all " + classname + " attributes to its default value." + TQString temp = "initAttributes sets all " + classname + " attributes to its default value." " Make sure to call this method within your class constructor"; php << formatDoc(temp,m_indentation + " * "); php << m_indentation << " */" << m_endl; @@ -3141,7 +3141,7 @@ void PhpWriter::writeClass(UMLClassifier *c) { //////////////////////////////////////////////////////////////////////////////////// // Helper Methods -void PhpWriter::writeOperations(UMLClassifier *c, QTextStream &php) { +void PhpWriter::writeOperations(UMLClassifier *c, TQTextStream &php) { //Lists to store operations sorted by scope UMLOperationList oppub,opprot,oppriv; @@ -3168,7 +3168,7 @@ void PhpWriter::writeOperations(UMLClassifier *c, QTextStream &php) { } } - QString classname(cleanName(c->getName())); + TQString classname(cleanName(c->getName())); //write operations to file if(forceSections() || !oppub.isEmpty()) { @@ -3187,7 +3187,7 @@ void PhpWriter::writeOperations(UMLClassifier *c, QTextStream &php) { } } -void PhpWriter::writeOperations(QString /* classname */, UMLOperationList &opList, QTextStream &php) { +void PhpWriter::writeOperations(TQString /* classname */, UMLOperationList &opList, TQTextStream &php) { UMLOperation *op; UMLAttribute *at; @@ -3236,8 +3236,8 @@ void PhpWriter::writeOperations(QString /* classname */, UMLOperationList &opLis for (at = atl.first(); at; at = atl.next(), j++) { php << " $" << cleanName(at->getName()) << (!(at->getInitialValue().isEmpty()) ? - (QString(" = ")+at->getInitialValue()) : - QString("")) + (TQString(" = ")+at->getInitialValue()) : + TQString("")) << ((j < i-1)?", ":""); } php <<" )" << m_endl << m_indentation << "{" << m_endl << m_indentation << m_indentation << m_endl << m_indentation << "} // end of member function " + cleanName(op->getName()) + m_endl; @@ -3245,7 +3245,7 @@ void PhpWriter::writeOperations(QString /* classname */, UMLOperationList &opLis }//end for } -void PhpWriter::writeAttributes(UMLClassifier *c, QTextStream &php) { +void PhpWriter::writeAttributes(UMLClassifier *c, TQTextStream &php) { UMLAttributeList atpub, atprot, atpriv, atdefval; atpub.setAutoDelete(false); atprot.setAutoDelete(false); @@ -3290,7 +3290,7 @@ void PhpWriter::writeAttributes(UMLClassifier *c, QTextStream &php) { } -void PhpWriter::writeAttributes(UMLAttributeList &atList, QTextStream &php) { +void PhpWriter::writeAttributes(UMLAttributeList &atList, TQTextStream &php) { for (UMLAttribute *at = atList.first(); at ; at = atList.next()) { if (forceDoc() || !at->getDoc().isEmpty()) { php << m_indentation << "/**" << m_endl << formatDoc(at->getDoc(), m_indentation + " * "); @@ -3323,9 +3323,9 @@ Uml::Programming_Language PhpWriter::getLanguage() { return Uml::pl_PHP; } -const QStringList PhpWriter::reservedKeywords() const { +const TQStringList PhpWriter::reservedKeywords() const { - static QStringList keywords; + static TQStringList keywords; if (keywords.isEmpty()) { for (int i = 0; words[i]; i++) |