eric6/Graphics/AssociationItem.py

changeset 8291
3d79b1e5bf3c
parent 8287
30eb7bc13d63
child 8295
3f5e8b0a338e
diff -r 6970128e3d71 -r 3d79b1e5bf3c eric6/Graphics/AssociationItem.py
--- a/eric6/Graphics/AssociationItem.py	Wed May 05 17:29:41 2021 +0200
+++ b/eric6/Graphics/AssociationItem.py	Wed May 05 18:17:24 2021 +0200
@@ -602,3 +602,17 @@
                     topToBottom = Utilities.toBool(value)
         
         return src, dst, assocType, topToBottom
+    
+    def toDict(self):
+        """
+        Public method to collect data to be persisted.
+        
+        @return dictionary containing data to be persisted
+        @rtype dict
+        """
+        return {
+            "src": self.itemA.getId(),
+            "dst": self.itemB.getId(),
+            "type": self.assocType.value,
+            "topToBottom": self.topToBottom,
+        }

eric ide

mercurial