[Uml-devel] kdesdk/umbrello/umbrello

Brian Thomas thomas at mail630.gsfc.nasa.gov
Sat Oct 25 15:58:07 UTC 2003


CVS commit by thomas: 

added setAttributesFromObject method to hierarchcodeblock/CodeGenObjectWithTextBlocks


  M +11 -0     codegenobjectwithtextblocks.cpp   1.7
  M +2 -0      codegenobjectwithtextblocks.h   1.5
  M +1 -2      hierarchicalcodeblock.cpp   1.12


--- kdesdk/umbrello/umbrello/codegenobjectwithtextblocks.cpp  #1.6:1.7
@@ -221,4 +221,15 @@ void CodeGenObjectWithTextBlocks::resetT
 }
 
+
+void CodeGenObjectWithTextBlocks::setAttributesFromObject (CodeGenObjectWithTextBlocks * obj) 
+{
+        QPtrList<TextBlock> * list = obj->getTextBlockList();
+        for (TextBlock * tb = list->first(); tb; tb=list->next())
+        {
+                // FIX : we need some functionality like
+                // loadChildTextBlocksFromObject(obj) here
+        }
+}
+
 void CodeGenObjectWithTextBlocks::setAttributesOnNode (QDomDocument & doc, QDomElement & root) {
 

--- kdesdk/umbrello/umbrello/codegenobjectwithtextblocks.h  #1.4:1.5
@@ -165,4 +165,6 @@ protected:
         virtual void setAttributesFromNode ( QDomElement & element);
 
+        virtual void setAttributesFromObject (CodeGenObjectWithTextBlocks * obj);
+
        /**
          * in this vanilla version, we only load comments and codeblocks

--- kdesdk/umbrello/umbrello/hierarchicalcodeblock.cpp  #1.11:1.12
@@ -345,6 +345,5 @@ void HierarchicalCodeBlock::setAttribute
                 setStartText(hb->getStartText());
                 setEndText(hb->getEndText());
-
-                // FIX? copy all of the child text blocks? ugh, lets NOT do this for now.
+                CodeGenObjectWithTextBlocks::setAttributesFromObject((CodeGenObjectWithTextBlocks*)obj);
         }
 






More information about the umbrello-devel mailing list