Graphics/UMLClassDiagramBuilder.py

changeset 2033
4b99609f6a87
parent 2031
c36c2eb62a75
child 2034
8de0fc1f7fef
diff -r 704593d042fe -r 4b99609f6a87 Graphics/UMLClassDiagramBuilder.py
--- a/Graphics/UMLClassDiagramBuilder.py	Sun Sep 09 17:46:32 2012 +0200
+++ b/Graphics/UMLClassDiagramBuilder.py	Sun Sep 09 19:38:07 2012 +0200
@@ -39,13 +39,15 @@
         
         self.file = file
         self.noAttrs = noAttrs
-        
-        self.umlView.setPersistenceData("file={0}".format(file))
-        
+    
+    def initialize(self):
+        """
+        Public method to initialize the object.
+        """
         pname = self.project.getProjectName()
         if pname and self.project.isProjectSource(self.file):
             name = self.trUtf8("Class Diagram {0}: {1}").format(
-                pname, project.getRelativePath(self.file))
+                pname, self.project.getRelativePath(self.file))
         else:
             name = self.trUtf8("Class Diagram: {0}").format(self.file)
         self.umlView.setDiagramName(name)
@@ -264,3 +266,20 @@
                         Generalisation,
                         topToBottom=True)
                 self.scene.addItem(assoc)
+    
+    def getPersistenceData(self):
+        """
+        Public method to get a string for data to be persisted.
+        
+        @return persisted data string (string)
+        """
+        return "file={0}, no_attributes={1}".format(self.file, self.noAttrs)
+    
+    def parsePersistenceData(self, data):
+        """
+        Public method to parse persisted data.
+        
+        @param dat persisted data to be parsed (string)
+        """
+        # TODO: implement this
+        return

eric ide

mercurial