eric7/Graphics/AssociationItem.py

branch
eric7
changeset 8348
f4775ae8f441
parent 8318
962bce857696
child 8366
2a9f5153c438
--- a/eric7/Graphics/AssociationItem.py	Fri May 21 17:54:15 2021 +0200
+++ b/eric7/Graphics/AssociationItem.py	Fri May 21 18:01:11 2021 +0200
@@ -12,7 +12,7 @@
 from PyQt6.QtCore import QPointF, QRectF, QLineF
 from PyQt6.QtWidgets import QGraphicsItem
 
-from E5Graphics.E5ArrowItem import E5ArrowItem, E5ArrowType
+from EricGraphics.EricArrowItem import EricArrowItem, EricArrowType
 
 import Utilities
 
@@ -42,7 +42,7 @@
     CENTER = 9
 
 
-class AssociationItem(E5ArrowItem):
+class AssociationItem(EricArrowItem):
     """
     Class implementing a graphics item for an association between two items.
     
@@ -69,13 +69,13 @@
         @type QGraphicsItem
         """
         if assocType in (AssociationType.NORMAL, AssociationType.IMPORTS):
-            arrowType = E5ArrowType.NORMAL
+            arrowType = EricArrowType.NORMAL
             arrowFilled = True
         elif assocType == AssociationType.GENERALISATION:
-            arrowType = E5ArrowType.WIDE
+            arrowType = EricArrowType.WIDE
             arrowFilled = False
         
-        E5ArrowItem.__init__(self, QPointF(0, 0), QPointF(100, 100),
+        EricArrowItem.__init__(self, QPointF(0, 0), QPointF(100, 100),
                              arrowFilled, arrowType, colors, parent)
         
         self.setFlag(QGraphicsItem.GraphicsItemFlag.ItemIsMovable, False)
@@ -555,24 +555,6 @@
         self.itemA.removeAssociation(self)
         self.itemB.removeAssociation(self)
     
-    def buildAssociationItemDataString(self):
-        """
-        Public method to build a string to persist the specific item data.
-        
-        This string should be built like "attribute=value" with pairs separated
-        by ", ". value must not contain ", " or newlines.
-        
-        @return persistence data
-        @rtype str
-        """
-        entries = [
-            "src={0}".format(self.itemA.getId()),
-            "dst={0}".format(self.itemB.getId()),
-            "type={0}".format(self.assocType.value),
-            "topToBottom={0}".format(self.topToBottom)
-        ]
-        return ", ".join(entries)
-    
     @classmethod
     def parseAssociationItemDataString(cls, data):
         """

eric ide

mercurial