summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/classifiercodedocument.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /umbrello/umbrello/classifiercodedocument.cpp
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/classifiercodedocument.cpp')
-rw-r--r--umbrello/umbrello/classifiercodedocument.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/umbrello/umbrello/classifiercodedocument.cpp b/umbrello/umbrello/classifiercodedocument.cpp
index 29e4bd88..4f92dede 100644
--- a/umbrello/umbrello/classifiercodedocument.cpp
+++ b/umbrello/umbrello/classifiercodedocument.cpp
@@ -38,9 +38,9 @@
// Constructors/Destructors
//
-ClassifierCodeDocument::ClassifierCodeDocument ( UMLClassifier * parent )
+ClassifierCodeDocument::ClassifierCodeDocument ( UMLClassifier * tqparent )
{
- init (parent);
+ init (tqparent);
}
ClassifierCodeDocument::~ClassifierCodeDocument ( )
@@ -131,8 +131,8 @@ bool ClassifierCodeDocument::hasObjectVectorClassFields() {
UMLRole * role = dynamic_cast<UMLRole*>(cf->getParentObject());
TQString multi = role->getMultiplicity();
if (
- multi.contains(TQRegExp("[23456789\\*]")) ||
- multi.contains(TQRegExp("1\\d"))
+ multi.tqcontains(TQRegExp("[23456789\\*]")) ||
+ multi.tqcontains(TQRegExp("1\\d"))
)
return true;
}
@@ -170,7 +170,7 @@ bool ClassifierCodeDocument::hasAttributeClassFields() {
// the codegenerator writer the liberty to organize their document as they desire.
bool ClassifierCodeDocument::addCodeClassField ( CodeClassField * add_object ) {
UMLObject * umlobj = add_object->getParentObject();
- if(!(m_classFieldMap.contains(umlobj)))
+ if(!(m_classFieldMap.tqcontains(umlobj)))
{
m_classfieldVector.append(add_object);
m_classFieldMap.insert(umlobj,add_object);
@@ -194,7 +194,7 @@ void ClassifierCodeDocument::addAttributeClassField (UMLClassifierListItem *obj,
*/
bool ClassifierCodeDocument::removeCodeClassField ( CodeClassField * remove_object ) {
UMLObject * umlobj = remove_object->getParentObject();
- if(m_classFieldMap.contains(umlobj))
+ if(m_classFieldMap.tqcontains(umlobj))
{
if (m_classfieldVector.removeRef(remove_object))
{
@@ -344,7 +344,7 @@ void ClassifierCodeDocument::addCodeClassFieldMethods(CodeClassFieldList &list )
// add declaration blocks for the passed classfields
void ClassifierCodeDocument::declareClassFields (CodeClassFieldList & list ,
- CodeGenObjectWithTextBlocks * parent )
+ CodeGenObjectWithTextBlocks * tqparent )
{
for (CodeClassFieldListIt ccflit(list); ccflit.current(); ++ccflit)
@@ -356,27 +356,27 @@ void ClassifierCodeDocument::declareClassFields (CodeClassFieldList & list ,
// if it has a tag, check
if(!declBlock->getTag().isEmpty())
{
- // In C++, because we may shift the declaration to a different parent
+ // In C++, because we may shift the declaration to a different tqparent
// block for a change in scope, we need to track down any pre-existing
- // location, and remove FIRST before adding to new parent
+ // location, and remove FIRST before adding to new tqparent
CodeGenObjectWithTextBlocks * oldParent = findParentObjectForTaggedTextBlock (declBlock->getTag());
if(oldParent) {
- if(oldParent != parent)
+ if(oldParent != tqparent)
oldParent->removeTextBlock(declBlock);
}
}
*/
- parent->addTextBlock(declBlock); // wont add it IF its already present. Will give it a tag if missing
+ tqparent->addTextBlock(declBlock); // wont add it IF its already present. Will give it a tag if missing
}
}
-bool ClassifierCodeDocument::parentIsClass() {
+bool ClassifierCodeDocument::tqparentIsClass() {
return (m_parentclassifier->getBaseType() == Uml::ot_Class);
}
-bool ClassifierCodeDocument::parentIsInterface() {
+bool ClassifierCodeDocument::tqparentIsInterface() {
return (m_parentclassifier->getBaseType() == Uml::ot_Interface);
}
@@ -396,7 +396,7 @@ void ClassifierCodeDocument::init (UMLClassifier * c )
// initCodeClassFields(); // cant call here?..newCodeClassField is pure virtual
// slots
- if (parentIsClass()) {
+ if (tqparentIsClass()) {
connect(c,TQT_SIGNAL(attributeAdded(UMLClassifierListItem*)),this,TQT_SLOT(addAttributeClassField(UMLClassifierListItem*)));
connect(c,TQT_SIGNAL(attributeRemoved(UMLClassifierListItem*)),this,TQT_SLOT(removeAttributeClassField(UMLClassifierListItem*)));
}
@@ -494,7 +494,7 @@ void ClassifierCodeDocument::initCodeClassFields ( ) {
UMLClassifier * c = getParentClassifier();
// first, do the code classifields that arise from attributes
- if (parentIsClass()) {
+ if (tqparentIsClass()) {
UMLAttributeList alist = c->getAttributeList();
for(UMLAttribute * at = alist.first(); at; at = alist.next())
{
@@ -542,7 +542,7 @@ void ClassifierCodeDocument::addAssociationClassField (UMLAssociation * a, bool
{
UMLRole * role = a->getUMLRole(Uml::B);
- if(!m_classFieldMap.contains((UMLObject*)role))
+ if(!m_classFieldMap.tqcontains((UMLObject*)role))
{
CodeClassField * classfield = CodeGenFactory::newCodeClassField(this, role);
if( addCodeClassField(classfield))
@@ -554,7 +554,7 @@ void ClassifierCodeDocument::addAssociationClassField (UMLAssociation * a, bool
if (printRoleA)
{
UMLRole * role = a->getUMLRole(Uml::A);
- if(!m_classFieldMap.contains((UMLObject*)role))
+ if(!m_classFieldMap.tqcontains((UMLObject*)role))
{
CodeClassField * classfield = CodeGenFactory::newCodeClassField(this, role);
if( addCodeClassField(classfield))
@@ -573,8 +573,8 @@ void ClassifierCodeDocument::addAssociationClassField (UMLAssociation * a, bool
void ClassifierCodeDocument::setAttributesFromNode ( TQDomElement & elem )
{
- // NOTE: we DON'T set the parent here as we ONLY get to this point
- // IF the parent codegenerator could find a matching parent classifier
+ // NOTE: we DON'T set the tqparent here as we ONLY get to this point
+ // IF the tqparent codegenerator could find a matching tqparent classifier
// that already has a code document.
// We FIRST set code class field stuff..check re-linnking with
@@ -599,7 +599,7 @@ void ClassifierCodeDocument::setAttributesFromNode ( TQDomElement & elem )
}
// look at all classfields currently in document.. match up
-// by parent object ID and Role ID (needed for self-association CF's)
+// by tqparent object ID and Role ID (needed for self-association CF's)
CodeClassField *
ClassifierCodeDocument::findCodeClassFieldFromParentID (Uml::IDType id,
int role_id)
@@ -619,7 +619,7 @@ ClassifierCodeDocument::findCodeClassFieldFromParentID (Uml::IDType id,
}
// shouldn't happen..
- kError() << "Failed to find codeclassfield for parent uml id:"
+ kError() << "Failed to find codeclassfield for tqparent uml id:"
<< ID2STR(id) << " (role id:" << role_id
<< ") Do you have a corrupt classifier code document?"
<< endl;
@@ -635,12 +635,12 @@ void ClassifierCodeDocument::loadClassFieldsFromXMI( TQDomElement & elem) {
TQString nodeName = childElem.tagName();
if( nodeName == "codeclassfield")
{
- TQString id = childElem.attribute("parent_id","-1");
+ TQString id = childElem.attribute("tqparent_id","-1");
int role_id = childElem.attribute("role_id","-1").toInt();
CodeClassField * cf = findCodeClassFieldFromParentID(STR2ID(id), role_id);
if(cf)
{
- // Because we just may change the parent object here,
+ // Because we just may change the tqparent object here,
// we need to yank it from the map of umlobjects
m_classFieldMap.remove(cf->getParentObject());
@@ -651,7 +651,7 @@ void ClassifierCodeDocument::loadClassFieldsFromXMI( TQDomElement & elem) {
m_classFieldMap.insert(cf->getParentObject(),cf);
} else
- kError()<<" LoadFromXMI: can't load classfield parent_id:"<<id<<" do you have a corrupt savefile?"<<endl;
+ kError()<<" LoadFromXMI: can't load classfield tqparent_id:"<<id<<" do you have a corrupt savefile?"<<endl;
}
node = childElem.nextSibling();
childElem= node.toElement();
@@ -702,7 +702,7 @@ void ClassifierCodeDocument::setAttributesOnNode ( TQDomDocument & doc, TQDomEle
CodeDocument::setAttributesOnNode(doc, docElement);
// cache local attributes/fields
- docElement.setAttribute("parent_class", ID2STR(getParentClassifier()->getID()));
+ docElement.setAttribute("tqparent_class", ID2STR(getParentClassifier()->getID()));
// (code) class fields
// which we will store in its own separate child node block