[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sat May 22 16:20:03 UTC 2004
CVS commit by okellogg:
findChildObjectByIdStr(): New.
init(): Experimentally remove strange signal/slot connections.
M +11 -0 class.cpp 1.34
M +11 -0 class.h 1.27
M +12 -1 classifier.cpp 1.41
M +11 -0 classifier.h 1.30
--- kdesdk/umbrello/umbrello/class.cpp #1.33:1.34
@@ -260,4 +260,13 @@ UMLObject* UMLClass::findChildObject(int
return UMLClassifier::findChildObject(id);
}
+
+UMLObject* UMLClass::findChildObjectByIdStr(QString idStr) {
+ UMLClassifierListItem *a = NULL;
+ for (a = m_AttsList.first(); a; a = m_AttsList.next()) {
+ if (a->getAuxId() == idStr)
+ return a;
+ }
+ return UMLClassifier::findChildObjectByIdStr(idStr);
+}
////////////////////////////////////////////////////////////////////////////////////////////////////
bool UMLClass::isEnumeration() {
@@ -279,7 +288,9 @@ void UMLClass::init() {
m_TemplateList.setAutoDelete(false);
+/* CHECK: Can we remove this code:
UMLDoc * parent = UMLApp::app()->getDocument();
connect(this,SIGNAL(attributeAdded(UMLObject*)),parent,SLOT(addUMLObject(UMLObject*)));
connect(this,SIGNAL(attributeRemoved(UMLObject*)),parent,SLOT(slotRemoveUMLObject(UMLObject*)));
+ */
}
--- kdesdk/umbrello/umbrello/class.h #1.26:1.27
@@ -234,4 +234,15 @@ public:
/**
+ * Find the object of the given (non-numeric) auxiliary ID in
+ * the lists of contained objects. The auxiliary ID is the ID
+ * returned by UMLObject::getAuxId() and is currently only used
+ * for loading foreign XMI files.
+ *
+ * @param idStr The ID to seek.
+ * @return Pointer to the UMLObject found or NULL if not found.
+ */
+ UMLObject* findChildObjectByIdStr(QString idStr);
+
+ /**
* Return true if this class has an enumeration stereotype.
* Notice that since Umbrello now has a proper Enum construct,
--- kdesdk/umbrello/umbrello/classifier.cpp #1.40:1.41
@@ -191,4 +191,13 @@ UMLObject* UMLClassifier::findChildObjec
return UMLCanvasObject::findChildObject(id);
}
+
+UMLObject* UMLClassifier::findChildObjectByIdStr(QString idStr) {
+ UMLClassifierListItem *o = NULL;
+ for (o = m_OpsList.first(); o; o = m_OpsList.next()) {
+ if (o->getAuxId() == idStr)
+ return o;
+ }
+ return NULL;
+}
////////////////////////////////////////////////////////////////////////////////////////////////////
UMLClassifierList UMLClassifier::findSubClassConcepts (ClassifierType type) {
@@ -342,4 +351,6 @@ void UMLClassifier::init() {
// make connections so that parent document is updated of list of uml objects
+
+/* CHECK: Can we remove this code:
#ifdef __GNUC__
#warning "Cheap add/removeOperation fix for slot add/RemoveUMLObject calls. Need long-term solution"
@@ -348,5 +359,5 @@ void UMLClassifier::init() {
connect(this,SIGNAL(childObjectAdded(UMLObject *)),parent,SLOT(addUMLObject(UMLObject*)));
connect(this,SIGNAL(childObjectRemoved(UMLObject *)),parent,SLOT(slotRemoveUMLObject(UMLObject*)));
-
+ */
}
--- kdesdk/umbrello/umbrello/classifier.h #1.29:1.30
@@ -222,4 +222,15 @@ public:
/**
+ * Find the object of the given (non-numeric) auxiliary ID
+ * in m_OpsList. The auxiliary ID is the ID returned by
+ * UMLObject::getAuxId() and is currently only used for
+ * loading foreign XMI files.
+ *
+ * @param idStr The ID to seek.
+ * @return Pointer to the UMLObject found or NULL if not found.
+ */
+ UMLObject* findChildObjectByIdStr(QString idStr);
+
+ /**
* Returns a list of concepts which this concept inherits from.
*
More information about the umbrello-devel
mailing list