summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/operation.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /umbrello/umbrello/operation.cpp
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-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/operation.cpp')
-rw-r--r--umbrello/umbrello/operation.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/umbrello/umbrello/operation.cpp b/umbrello/umbrello/operation.cpp
index 1052c469..dce9b41e 100644
--- a/umbrello/umbrello/operation.cpp
+++ b/umbrello/umbrello/operation.cpp
@@ -13,7 +13,7 @@
#include "operation.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -25,7 +25,7 @@
#include "uniqueid.h"
#include "dialogs/umloperationdialog.h"
-UMLOperation::UMLOperation(const UMLClassifier *parent, const QString& name,
+UMLOperation::UMLOperation(const UMLClassifier *parent, const TQString& name,
Uml::IDType id, Uml::Visibility s, UMLObject *rt)
: UMLClassifierListItem(parent, name, id)
{
@@ -63,7 +63,7 @@ void UMLOperation::moveParmLeft(UMLAttribute * a) {
}
kDebug() << "UMLOperation::moveParmLeft(" << a->getName() << ") called"
<< endl;
- disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
int idx;
if ( (idx=m_List.find( a )) == -1 ) {
kDebug() << "Error move parm left " << a->getName() << endl;
@@ -83,7 +83,7 @@ void UMLOperation::moveParmRight(UMLAttribute * a) {
}
kDebug() << "UMLOperation::moveParmRight(" << a->getName() << ") called"
<< endl;
- disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
int idx;
if ( (idx=m_List.find( a )) == -1 ) {
kDebug() << "Error move parm right " << a->getName() << endl;
@@ -104,7 +104,7 @@ void UMLOperation::removeParm(UMLAttribute * a, bool emitModifiedSignal /* =true
}
kDebug() << "UMLOperation::removeParm(" << a->getName() << ") called"
<< endl;
- disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
if(!m_List.remove(a))
kDebug() << "Error removing parm " << a->getName() << endl;
@@ -112,7 +112,7 @@ void UMLOperation::removeParm(UMLAttribute * a, bool emitModifiedSignal /* =true
emit modified();
}
-UMLAttribute* UMLOperation::findParm(const QString &name) {
+UMLAttribute* UMLOperation::findParm(const TQString &name) {
UMLAttribute * obj=0;
for (obj = m_List.first(); obj; obj = m_List.next()) {
if (obj->getName() == name)
@@ -121,8 +121,8 @@ UMLAttribute* UMLOperation::findParm(const QString &name) {
return 0;
}
-QString UMLOperation::toString(Uml::Signature_Type sig) {
- QString s = "";
+TQString UMLOperation::toString(Uml::Signature_Type sig) {
+ TQString s = "";
if(sig == Uml::st_ShowSig || sig == Uml::st_NoSig)
s = m_Vis.toString(true) + ' ';
@@ -151,7 +151,7 @@ QString UMLOperation::toString(Uml::Signature_Type sig) {
s.append("()");
}
UMLClassifier *ownParent = static_cast<UMLClassifier*>(parent());
- QString returnType;
+ TQString returnType;
UMLClassifier *retType = UMLClassifierListItem::getType();
if (retType) {
UMLPackage *retVisibility = retType->getUMLPackage();
@@ -178,14 +178,14 @@ void UMLOperation::addParm(UMLAttribute *parameter, int position) {
else
m_List.append( parameter );
UMLObject::emitModified();
- connect(parameter,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(parameter,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
}
-QString UMLOperation::getUniqueParameterName() {
- QString currentName = i18n("new_parameter");
- QString name = currentName;
+TQString UMLOperation::getUniqueParameterName() {
+ TQString currentName = i18n("new_parameter");
+ TQString name = currentName;
for (int number = 1; findParm(name); number++) {
- name = currentName + '_' + QString::number(number);
+ name = currentName + '_' + TQString::number(number);
}
return name;
}
@@ -239,13 +239,13 @@ bool UMLOperation::resolveRef() {
bool UMLOperation::isConstructorOperation() {
// if an operation has the stereotype constructor
// return true
- QString strConstructor ("constructor");
+ TQString strConstructor ("constructor");
if (getStereotype() == strConstructor)
return true;
UMLClassifier * c = static_cast<UMLClassifier*>(this->parent());
- QString cName = c->getName();
- QString opName = getName();
+ TQString cName = c->getName();
+ TQString opName = getName();
// It's a constructor operation if the operation name
// matches that of the parent classifier.
return (cName == opName);
@@ -256,14 +256,14 @@ bool UMLOperation::isDestructorOperation() {
return true;
UMLClassifier * c = static_cast<UMLClassifier*>(this->parent());
- QString cName = c->getName();
- QString opName = getName();
+ TQString cName = c->getName();
+ TQString opName = getName();
// Special support for C++ syntax:
// It's a destructor operation if the operation name begins
// with "~" followed by the name of the parent classifier.
if (! opName.startsWith("~"))
return false;
- opName.remove( QRegExp("^~\\s*") );
+ opName.remove( TQRegExp("^~\\s*") );
return (cName == opName);
}
@@ -279,17 +279,17 @@ bool UMLOperation::getConst() const {
return m_bConst;
}
-bool UMLOperation::showPropertiesDialog(QWidget* parent) {
+bool UMLOperation::showPropertiesDialog(TQWidget* parent) {
UMLOperationDialog dialog(parent, this);
return dialog.exec();
}
-void UMLOperation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement operationElement = UMLObject::save("UML:Operation", qDoc);
+void UMLOperation::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement operationElement = UMLObject::save("UML:Operation", qDoc);
operationElement.setAttribute( "isQuery", m_bConst ? "true" : "false" );
- QDomElement featureElement = qDoc.createElement( "UML:BehavioralFeature.parameter" );
+ TQDomElement featureElement = qDoc.createElement( "UML:BehavioralFeature.parameter" );
if (m_pSecondary) {
- QDomElement retElement = qDoc.createElement("UML:Parameter");
+ TQDomElement retElement = qDoc.createElement("UML:Parameter");
if (m_returnId == Uml::id_None) {
kDebug() << "UMLOperation::saveToXMI(" << m_Name
<< "): m_returnId is not set, setting it now." << endl;
@@ -306,7 +306,7 @@ void UMLOperation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
//save each attribute here, type different
UMLAttribute* pAtt = 0;
for( pAtt = m_List.first(); pAtt != 0; pAtt = m_List.next() ) {
- QDomElement attElement = pAtt->UMLObject::save("UML:Parameter", qDoc);
+ TQDomElement attElement = pAtt->UMLObject::save("UML:Parameter", qDoc);
UMLClassifier *attrType = pAtt->getType();
if (attrType) {
attElement.setAttribute( "type", ID2STR(attrType->getID()) );
@@ -329,32 +329,32 @@ void UMLOperation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( operationElement );
}
-bool UMLOperation::load( QDomElement & element ) {
+bool UMLOperation::load( TQDomElement & element ) {
m_SecondaryId = element.attribute( "type", "" );
- QString isQuery = element.attribute( "isQuery", "" );
+ TQString isQuery = element.attribute( "isQuery", "" );
if (!isQuery.isEmpty()) {
// We need this extra test for isEmpty() because load() might have been
// called again by the processing for BehavioralFeature.parameter (see below)
m_bConst = (isQuery == "true");
}
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
if (node.isComment())
node = node.nextSibling();
- QDomElement attElement = node.toElement();
+ TQDomElement attElement = node.toElement();
while( !attElement.isNull() ) {
- QString tag = attElement.tagName();
+ TQString tag = attElement.tagName();
if (Uml::tagEq(tag, "BehavioralFeature.parameter")) {
if (! load(attElement))
return false;
} else if (Uml::tagEq(tag, "Parameter")) {
- QString kind = attElement.attribute("kind", "");
+ TQString kind = attElement.attribute("kind", "");
if (kind.isEmpty()) {
// Perhaps the kind is stored in a child node:
- for (QDomNode n = attElement.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ for (TQDomNode n = attElement.firstChild(); !n.isNull(); n = n.nextSibling()) {
if (n.isComment())
continue;
- QDomElement tempElement = n.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = n.toElement();
+ TQString tag = tempElement.tagName();
if (!Uml::tagEq(tag, "kind"))
continue;
kind = tempElement.attribute( "xmi.value", "" );
@@ -367,20 +367,20 @@ bool UMLOperation::load( QDomElement & element ) {
}
}
if (kind == "return") {
- QString returnId = attElement.attribute("xmi.id", "");
+ TQString returnId = attElement.attribute("xmi.id", "");
if (!returnId.isEmpty())
m_returnId = STR2ID(returnId);
m_SecondaryId = attElement.attribute( "type", "" );
if (m_SecondaryId.isEmpty()) {
// Perhaps the type is stored in a child node:
- QDomNode node = attElement.firstChild();
+ TQDomNode node = attElement.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, "type")) {
node = node.nextSibling();
continue;
@@ -389,8 +389,8 @@ bool UMLOperation::load( QDomElement & element ) {
if (m_SecondaryId.isEmpty())
m_SecondaryId = tempElement.attribute( "xmi.idref", "" );
if (m_SecondaryId.isEmpty()) {
- QDomNode inner = node.firstChild();
- QDomElement tmpElem = inner.toElement();
+ TQDomNode inner = node.firstChild();
+ TQDomElement tmpElem = inner.toElement();
m_SecondaryId = tmpElem.attribute( "xmi.id", "" );
if (m_SecondaryId.isEmpty())
m_SecondaryId = tmpElem.attribute( "xmi.idref", "" );