[Uml-devel] KDE/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Mon Jul 2 06:00:01 UTC 2007


SVN commit 682224 by okellogg:

umbrellify(PetalNode*, const QString&, UMLListViewItem*): Implement Class with stereotype Actor.


 M  +12 -1     petaltree2uml.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/petaltree2uml.cpp #682223:682224
@@ -23,6 +23,7 @@
 #include "operation.h"
 #include "association.h"
 #include "umlrole.h"
+#include "actor.h"
 #include "usecase.h"
 #include "component.h"
 #include "node.h"
@@ -489,7 +490,7 @@
  */
 bool umbrellify(PetalNode *node, const QString& modelsName, UMLListViewItem *parent) {
     if (node == NULL) {
-        kError() << "umbrellify: node is NULL" << endl;
+        kError() << "umbrellify(" << modelsName << "): node is NULL" << endl;
         return false;
     }
     QStringList args = node->initialArgs();
@@ -502,6 +503,16 @@
     if (objType == "Class_Category") {
         Uml::ListView_Type lvType = folderType(parent);
         item = new UMLListViewItem( parent, name, lvType, id );
+    } else if (objType == "Class") {
+        QString stereotype = node->findAttribute("stereotype").string;
+        if (stereotype == "Actor") {
+            UMLActor *act = new UMLActor(name, id);
+            item = new UMLListViewItem(parent, name, Uml::lvt_Actor, act);
+            obj = act;
+        } else {
+            kDebug() << "umbrellify(" << name << "): handling of Class stereotype "
+                << stereotype << " is not yet implemented" << endl;
+        }
     } else if (objType == "UseCase") {
         UMLUseCase *uc = new UMLUseCase(name, id);
         item = new UMLListViewItem(parent, name, Uml::lvt_UseCase, uc);




More information about the umbrello-devel mailing list