From 4ae0c208b66e0f7954e194384464fe2d0a2c56dd Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:51:49 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- umbrello/umbrello/entity.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'umbrello/umbrello/entity.cpp') diff --git a/umbrello/umbrello/entity.cpp b/umbrello/umbrello/entity.cpp index b3d842ac..31ef1513 100644 --- a/umbrello/umbrello/entity.cpp +++ b/umbrello/umbrello/entity.cpp @@ -23,7 +23,7 @@ #include "clipboard/idchangelog.h" #include "dialogs/umlentityattributedialog.h" -UMLEntity::UMLEntity(const QString& name, Uml::IDType id) : UMLClassifier(name, id) { +UMLEntity::UMLEntity(const TQString& name, Uml::IDType id) : UMLClassifier(name, id) { init(); } @@ -52,9 +52,9 @@ void UMLEntity::init() { m_BaseType = Uml::ot_Entity; } -UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObject *type /*=NULL*/) { +UMLAttribute* UMLEntity::createAttribute(const TQString &name /*=null*/, UMLObject *type /*=NULL*/) { Uml::IDType id = UniqueID::gen(); - QString currentName; + TQString currentName; if (name.isNull()) { currentName = uniqChildName(Uml::ot_EntityAttribute); } else { @@ -64,15 +64,15 @@ UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObjec Uml::Visibility scope = optionState.classState.defaultAttributeScope; UMLEntityAttribute* newAttribute = new UMLEntityAttribute(this, currentName, id, scope, type); - int button = QDialog::Accepted; + int button = TQDialog::Accepted; bool goodName = false; //check for name.isNull() stops dialog being shown //when creating attribute via list view - while (button==QDialog::Accepted && !goodName && name.isNull()) { + while (button==TQDialog::Accepted && !goodName && name.isNull()) { UMLEntityAttributeDialog attributedialog(0, newAttribute); button = attributedialog.exec(); - QString name = newAttribute->getName(); + TQString name = newAttribute->getName(); if(name.length() == 0) { KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name")); @@ -83,7 +83,7 @@ UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObjec } } - if (button != QDialog::Accepted) { + if (button != TQDialog::Accepted) { delete newAttribute; return NULL; } @@ -95,24 +95,24 @@ UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObjec return newAttribute; } -UMLObject* UMLEntity::addEntityAttribute(const QString& name, Uml::IDType id) { +UMLObject* UMLEntity::addEntityAttribute(const TQString& name, Uml::IDType id) { UMLEntityAttribute* literal = new UMLEntityAttribute(this, name, id); m_List.append(literal); emit entityAttributeAdded(literal); UMLObject::emitModified(); - connect(literal,SIGNAL(modified()),this,SIGNAL(modified())); + connect(literal,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified())); return literal; } bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, IDChangeLog* Log /* = 0*/) { - QString name = (QString)attribute->getName(); + TQString name = (TQString)attribute->getName(); if (findChildObject(name) == NULL) { attribute->parent()->removeChild(attribute); this->insertChild(attribute); m_List.append(attribute); emit entityAttributeAdded(attribute); UMLObject::emitModified(); - connect(attribute,SIGNAL(modified()),this,SIGNAL(modified())); + connect(attribute,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified())); return true; } else if (Log) { Log->removeChangeByNewID( attribute->getID() ); @@ -122,7 +122,7 @@ bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, IDChangeLog* L } bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, int position) { - QString name = (QString)attribute->getName(); + TQString name = (TQString)attribute->getName(); if (findChildObject(name) == NULL) { attribute->parent()->removeChild(attribute); this->insertChild(attribute); @@ -133,7 +133,7 @@ bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, int position) } emit entityAttributeAdded(attribute); UMLObject::emitModified(); - connect(attribute,SIGNAL(modified()),this,SIGNAL(modified())); + connect(attribute,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified())); return true; } return false; @@ -147,8 +147,8 @@ int UMLEntity::removeEntityAttribute(UMLClassifierListItem* literal) { emit entityAttributeRemoved(literal); UMLObject::emitModified(); // If we are deleting the object, then we don't need to disconnect..this is done auto-magically - // for us by QObject. -b.t. - // disconnect(a,SIGNAL(modified()),this,SIGNAL(modified())); + // for us by TQObject. -b.t. + // disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified())); delete literal; return m_List.count(); } @@ -175,8 +175,8 @@ bool UMLEntity::resolveRef() { return success; } -void UMLEntity::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) { - QDomElement entityElement = UMLObject::save("UML:Entity", qDoc); +void UMLEntity::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) { + TQDomElement entityElement = UMLObject::save("UML:Entity", qDoc); //save operations UMLClassifierListItemList entityAttributes = getFilteredList(Uml::ot_EntityAttribute); UMLClassifierListItem* pEntityAttribute = 0; @@ -187,15 +187,15 @@ void UMLEntity::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) { qElement.appendChild(entityElement); } -bool UMLEntity::load(QDomElement& element) { - QDomNode node = element.firstChild(); +bool UMLEntity::load(TQDomElement& element) { + TQDomNode node = element.firstChild(); while( !node.isNull() ) { if (node.isComment()) { node = node.nextSibling(); continue; } - QDomElement tempElement = node.toElement(); - QString tag = tempElement.tagName(); + TQDomElement tempElement = node.toElement(); + TQString tag = tempElement.tagName(); if (Uml::tagEq(tag, "EntityAttribute")) { // for backward compatibility UMLEntityAttribute* pEntityAttribute = new UMLEntityAttribute(this); if( !pEntityAttribute->loadFromXMI(tempElement) ) { -- cgit v1.2.1