summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/codeclassfield.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/codeclassfield.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/codeclassfield.cpp')
-rw-r--r--umbrello/umbrello/codeclassfield.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/umbrello/umbrello/codeclassfield.cpp b/umbrello/umbrello/codeclassfield.cpp
index 85686a3b..0a108a18 100644
--- a/umbrello/umbrello/codeclassfield.cpp
+++ b/umbrello/umbrello/codeclassfield.cpp
@@ -52,7 +52,7 @@ CodeClassField::CodeClassField ( ClassifierCodeDocument * doc , UMLAttribute * a
CodeClassField::~CodeClassField ( ) {
- // remove methods from parent document
+ // remove methods from tqparent document
CodeAccessorMethodList list = m_methodVector;
for(CodeAccessorMethod * m = list.first(); m ; m=list.next())
{
@@ -61,7 +61,7 @@ CodeClassField::~CodeClassField ( ) {
}
list.clear();
- // clear the decl block from parent text block list too
+ // clear the decl block from tqparent text block list too
if(m_declCodeBlock)
{
getParentDocument()->removeTextBlock(m_declCodeBlock);
@@ -82,8 +82,8 @@ CodeClassField::~CodeClassField ( ) {
void CodeClassField::setParentUMLObject (UMLObject * obj) {
UMLRole *role = dynamic_cast<UMLRole*>(obj);
if(role) {
- UMLAssociation * parentAssoc = role->getParentAssociation();
- Uml::Association_Type atype = parentAssoc->getAssocType();
+ UMLAssociation * tqparentAssoc = role->getParentAssociation();
+ Uml::Association_Type atype = tqparentAssoc->getAssocType();
m_parentIsAttribute = false;
if ( atype == Uml::at_Association || atype == Uml::at_Association_Self)
@@ -103,7 +103,7 @@ void CodeClassField::setParentUMLObject (UMLObject * obj) {
TQString CodeClassField::getTypeName ( ) {
- if (parentIsAttribute())
+ if (tqparentIsAttribute())
{
UMLAttribute * at = (UMLAttribute*) getParentObject();
return at->getTypeName();
@@ -121,7 +121,7 @@ TQString CodeClassField::getTypeName ( ) {
// of objects (as per specification of associations)
TQString CodeClassField::getListObjectType() {
TQString type = TQString ("");
- if (!parentIsAttribute())
+ if (!tqparentIsAttribute())
{
UMLRole * role = dynamic_cast<UMLRole*>(getParentObject());
type = getUMLObjectName(role->getObject());
@@ -133,7 +133,7 @@ TQString CodeClassField::getListObjectType() {
* Get the value of m_isAbstract
* @return the value of m_isAbstract
*/
-bool CodeClassField::parentIsAttribute ( ) {
+bool CodeClassField::tqparentIsAttribute ( ) {
return m_parentIsAttribute;
// return (m_classFieldType == Attribute) ? true : false;
}
@@ -171,8 +171,8 @@ bool CodeClassField::addMethod ( CodeAccessorMethod * add_object ) {
if(findMethodByType(type))
return false;
/*
- // this wont work as the key for TQMap needs to inherit from QObject
- if(m_methodMap->contains(type))
+ // this wont work as the key for TQMap needs to inherit from TQObject
+ if(m_methodMap->tqcontains(type))
return false; // return false, we already have some object with this tag in the list
else
m_methodMap->insert(type, add_object);
@@ -270,10 +270,10 @@ void CodeClassField::setAttributesFromNode ( TQDomElement & root) {
// always disconnect
getParentObject()->disconnect(this);
- // superclass call.. may reset the parent object
+ // superclass call.. may reset the tqparent object
CodeParameter::setAttributesFromNode(root);
- // make AFTER super-class call. This will reconnect to the parent
+ // make AFTER super-class call. This will reconnect to the tqparent
// and re-check we have all needed child accessor methods and decl blocks
initFields( );
@@ -301,7 +301,7 @@ void CodeClassField::setAttributesFromNode ( TQDomElement & root) {
} else
if( tag == "header" ) {
- // this is treated in parent.. skip over here
+ // this is treated in tqparent.. skip over here
} else
kWarning()<<"ERROR: bad savefile? code classfield loadFromXMI got child element with unknown tag:"<<tag<<" ignoring node."<<endl;
@@ -323,7 +323,7 @@ void CodeClassField::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
}
int CodeClassField::minimumListOccurances( ) {
- if (!parentIsAttribute())
+ if (!tqparentIsAttribute())
{
UMLRole * role = dynamic_cast<UMLRole*>(getParentObject());
TQString multi = role->getMultiplicity();
@@ -331,7 +331,7 @@ int CodeClassField::minimumListOccurances( ) {
if(!multi.isEmpty())
{
TQString lowerBoundString = multi.remove(TQRegExp("\\.\\.\\d+$"));
- if(!lowerBoundString.isEmpty() &&lowerBoundString.contains(TQRegExp("^\\d+$")))
+ if(!lowerBoundString.isEmpty() &&lowerBoundString.tqcontains(TQRegExp("^\\d+$")))
return lowerBoundString.toInt();
}
@@ -340,7 +340,7 @@ int CodeClassField::minimumListOccurances( ) {
}
int CodeClassField::maximumListOccurances( ) {
- if (!parentIsAttribute())
+ if (!tqparentIsAttribute())
{
UMLRole * role = dynamic_cast<UMLRole*>(getParentObject());
TQString multi = role->getMultiplicity();
@@ -348,7 +348,7 @@ int CodeClassField::maximumListOccurances( ) {
if(!multi.isEmpty())
{
TQString upperBoundString = multi.section(TQRegExp("(\\.\\.)"),1);
- if(!upperBoundString.isEmpty() && upperBoundString.contains(TQRegExp("^\\d+$")))
+ if(!upperBoundString.isEmpty() && upperBoundString.tqcontains(TQRegExp("^\\d+$")))
return upperBoundString.toInt();
else
return -1; // unbounded
@@ -392,7 +392,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 TQObject.
- if(m_methodMap->contains(type))
+ if(m_methodMap->tqcontains(type))
return ((*m_methodMap)[type]);
CodeAccessorMethod * obj = NULL;
*/
@@ -422,7 +422,7 @@ void CodeClassField::initAccessorMethods()
{
// everything gets potential get/set method
- //if(!m_methodMap->contains(CodeAccessorMethod::GET))
+ //if(!m_methodMap->tqcontains(CodeAccessorMethod::GET))
if(!findMethodByType(CodeAccessorMethod::GET))
{
CodeAccessorMethod * method = CodeGenFactory::newCodeAccessorMethod (getParentDocument(), this, CodeAccessorMethod::GET);
@@ -444,7 +444,7 @@ void CodeClassField::initAccessorMethods()
// add in the add,remove and list methods for things which are role based.
// (and only used if the role specifies a 'list' type object
- if (!parentIsAttribute()) {
+ if (!tqparentIsAttribute()) {
if(!findMethodByType(CodeAccessorMethod::ADD))
{
@@ -482,10 +482,10 @@ void CodeClassField::updateContent()
{
// Set properties for writing out the various methods derived from UMLRoles.
- // I suppose this could be supported under individual accessor method synctoparent
+ // I suppose this could be supported under individual accessor method synctotqparent
// calls, but its going to happen again and again for many languages. Why not a catch
// all here? -b.t.
- if (parentIsAttribute())
+ if (tqparentIsAttribute())
{
for ( CodeAccessorMethod *method = m_methodVector.first(); method;
method = m_methodVector.next() )
@@ -569,14 +569,14 @@ void CodeClassField::updateContent()
}
}
-// determine whether the parent object in this classfield indicates that it is
+// determine whether the tqparent object in this classfield indicates that it is
// a single variable or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
bool CodeClassField::fieldIsSingleValue ( )
{
// For the time being, all attributes ARE single values (yes,
// I know this isnt always true, but we have to start somewhere.)
- if(parentIsAttribute())
+ if(tqparentIsAttribute())
return true;
UMLRole * role = dynamic_cast<UMLRole*>(getParentObject());
@@ -585,8 +585,8 @@ bool CodeClassField::fieldIsSingleValue ( )
TQString multi = role->getMultiplicity();
- if(multi.isEmpty() || multi.contains(TQRegExp("^(0|1)$"))
- || multi.contains(TQRegExp("^0\\.\\.1$")))
+ if(multi.isEmpty() || multi.tqcontains(TQRegExp("^(0|1)$"))
+ || multi.tqcontains(TQRegExp("^0\\.\\.1$")))
return true;
return false;