diff options
Diffstat (limited to 'umbrello/umbrello/codeclassfield.cpp')
-rw-r--r-- | umbrello/umbrello/codeclassfield.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/umbrello/umbrello/codeclassfield.cpp b/umbrello/umbrello/codeclassfield.cpp index a19e664d..85686a3b 100644 --- a/umbrello/umbrello/codeclassfield.cpp +++ b/umbrello/umbrello/codeclassfield.cpp @@ -17,7 +17,7 @@ // own header #include "codeclassfield.h" // qt/kde includes -#include <qregexp.h> +#include <tqregexp.h> #include <kdebug.h> // app includes #include "association.h" @@ -101,7 +101,7 @@ void CodeClassField::setParentUMLObject (UMLObject * obj) { // Public attribute accessor methods // -QString CodeClassField::getTypeName ( ) { +TQString CodeClassField::getTypeName ( ) { if (parentIsAttribute()) { @@ -119,8 +119,8 @@ QString CodeClassField::getTypeName ( ) { // get the type of object that will be added/removed from lists // of objects (as per specification of associations) -QString CodeClassField::getListObjectType() { - QString type = QString (""); +TQString CodeClassField::getListObjectType() { + TQString type = TQString (""); if (!parentIsAttribute()) { UMLRole * role = dynamic_cast<UMLRole*>(getParentObject()); @@ -156,9 +156,9 @@ CodeClassFieldDialog * CodeClassField::getDialog ( ) { */ // methods like this _shouldn't_ be needed IF we properly did things thruought the code. -QString CodeClassField::getUMLObjectName(UMLObject *obj) +TQString CodeClassField::getUMLObjectName(UMLObject *obj) { - return (obj!=0)?obj->getName():QString("NULL"); + return (obj!=0)?obj->getName():TQString("NULL"); } /** @@ -171,7 +171,7 @@ bool CodeClassField::addMethod ( CodeAccessorMethod * add_object ) { if(findMethodByType(type)) return false; /* - // this wont work as the key for QMap needs to inherit from QObject + // this wont work as the key for TQMap needs to inherit from QObject if(m_methodMap->contains(type)) return false; // return false, we already have some object with this tag in the list else @@ -194,7 +194,7 @@ bool CodeClassField::removeMethod ( CodeAccessorMethod * remove_object ) { /** * Get the list of Method objects held by m_methodVector - * @return QPtrList<CodeMethodBlock *> list of Method objects held by + * @return TQPtrList<CodeMethodBlock *> list of Method objects held by * m_methodVector */ CodeAccessorMethodList CodeClassField::getMethodList() { @@ -231,14 +231,14 @@ CodeClassFieldDeclarationBlock * CodeClassField::getDeclarationCodeBlock( ) /** * load params from the appropriate XMI element node. */ -void CodeClassField::loadFromXMI ( QDomElement & root ) { +void CodeClassField::loadFromXMI ( TQDomElement & root ) { setAttributesFromNode(root); } /** set attributes of the node that represents this class * in the XMI document. */ -void CodeClassField::setAttributesOnNode ( QDomDocument & doc, QDomElement & cfElem) +void CodeClassField::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & cfElem) { // super class @@ -265,7 +265,7 @@ void CodeClassField::setAttributesOnNode ( QDomDocument & doc, QDomElement & cfE /** set the class attributes of this object from * the passed element node. */ -void CodeClassField::setAttributesFromNode ( QDomElement & root) { +void CodeClassField::setAttributesFromNode ( TQDomElement & root) { // always disconnect getParentObject()->disconnect(this); @@ -283,10 +283,10 @@ void CodeClassField::setAttributesFromNode ( QDomElement & root) { // load accessor methods now // by looking for our particular child element - QDomNode node = root.firstChild(); - QDomElement element = node.toElement(); + TQDomNode node = root.firstChild(); + TQDomElement element = node.toElement(); while( !element.isNull() ) { - QString tag = element.tagName(); + TQString tag = element.tagName(); if( tag == "ccfdeclarationcodeblock" ) { m_declCodeBlock->loadFromXMI(element); } else @@ -314,8 +314,8 @@ void CodeClassField::setAttributesFromNode ( QDomElement & root) { /** * Save the XMI representation of this object */ -void CodeClassField::saveToXMI ( QDomDocument & doc, QDomElement & root ) { - QDomElement docElement = doc.createElement( "codeclassfield" ); +void CodeClassField::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) { + TQDomElement docElement = doc.createElement( "codeclassfield" ); setAttributesOnNode(doc, docElement); @@ -326,12 +326,12 @@ int CodeClassField::minimumListOccurances( ) { if (!parentIsAttribute()) { UMLRole * role = dynamic_cast<UMLRole*>(getParentObject()); - QString multi = role->getMultiplicity(); + TQString multi = role->getMultiplicity(); // ush. IF we had a multiplicty object, this would be much easier. if(!multi.isEmpty()) { - QString lowerBoundString = multi.remove(QRegExp("\\.\\.\\d+$")); - if(!lowerBoundString.isEmpty() &&lowerBoundString.contains(QRegExp("^\\d+$"))) + TQString lowerBoundString = multi.remove(TQRegExp("\\.\\.\\d+$")); + if(!lowerBoundString.isEmpty() &&lowerBoundString.contains(TQRegExp("^\\d+$"))) return lowerBoundString.toInt(); } @@ -343,12 +343,12 @@ int CodeClassField::maximumListOccurances( ) { if (!parentIsAttribute()) { UMLRole * role = dynamic_cast<UMLRole*>(getParentObject()); - QString multi = role->getMultiplicity(); + TQString multi = role->getMultiplicity(); // ush. IF we had a multiplicty object, this would be much easier. if(!multi.isEmpty()) { - QString upperBoundString = multi.section(QRegExp("(\\.\\.)"),1); - if(!upperBoundString.isEmpty() && upperBoundString.contains(QRegExp("^\\d+$"))) + TQString upperBoundString = multi.section(TQRegExp("(\\.\\.)"),1); + if(!upperBoundString.isEmpty() && upperBoundString.contains(TQRegExp("^\\d+$"))) return upperBoundString.toInt(); else return -1; // unbounded @@ -359,13 +359,13 @@ int CodeClassField::maximumListOccurances( ) { return 1; } -QString CodeClassField::cleanName ( const QString &name ) { +TQString CodeClassField::cleanName ( const TQString &name ) { return getParentDocument()->cleanName(name); } -QString CodeClassField::fixInitialStringDeclValue(const QString& val, const QString &type) +TQString CodeClassField::fixInitialStringDeclValue(const TQString& val, const TQString &type) { - QString value = val; + TQString value = val; // check for strings only<F2>String value = val; if (!value.isEmpty() && type == "String") { if (!value.startsWith("\"")) @@ -391,7 +391,7 @@ CodeAccessorMethod * CodeClassField::findMethodByType ( CodeAccessorMethod::Acce { //if we already know to which file this class was written/should be written, just return it. /* - // argh. this wont work because "accessorType' doesn't inherit from QObject. + // argh. this wont work because "accessorType' doesn't inherit from TQObject. if(m_methodMap->contains(type)) return ((*m_methodMap)[type]); CodeAccessorMethod * obj = NULL; @@ -583,10 +583,10 @@ bool CodeClassField::fieldIsSingleValue ( ) if(!role) return true; // its really an attribute - QString multi = role->getMultiplicity(); + TQString multi = role->getMultiplicity(); - if(multi.isEmpty() || multi.contains(QRegExp("^(0|1)$")) - || multi.contains(QRegExp("^0\\.\\.1$"))) + if(multi.isEmpty() || multi.contains(TQRegExp("^(0|1)$")) + || multi.contains(TQRegExp("^0\\.\\.1$"))) return true; return false; @@ -595,11 +595,11 @@ bool CodeClassField::fieldIsSingleValue ( ) void CodeClassField::initFields(bool inConstructor) { m_writeOutMethods = false; - m_listClassName = QString (""); + m_listClassName = TQString (""); m_declCodeBlock = NULL; m_methodVector.setAutoDelete(false); - // m_methodMap = new QMap<CodeAccessorMethod::AccessorType, CodeAccessorMethod *>; + // m_methodMap = new TQMap<CodeAccessorMethod::AccessorType, CodeAccessorMethod *>; if (!inConstructor) finishInitialization(); @@ -610,7 +610,7 @@ void CodeClassField::finishInitialization() { initAccessorMethods(); updateContent(); - connect(getParentObject(),SIGNAL(modified()),this,SIGNAL(modified())); // child objects will trigger off this signal + connect(getParentObject(),TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified())); // child objects will trigger off this signal } |