Graphics/UMLClassDiagramBuilder.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3057
10516539f238
parent 3035
36e9f388958b
child 3145
a9de05d4a22f
equal deleted inserted replaced
3058:0a02c433f52d 3060:5883ce99ee12
105 self.allClasses[className] = cw 105 self.allClasses[className] = cw
106 if className not in self.allModules[self.file]: 106 if className not in self.allModules[self.file]:
107 self.allModules[self.file].append(className) 107 self.allModules[self.file].append(className)
108 if cw and cw.noAttrs != self.noAttrs: 108 if cw and cw.noAttrs != self.noAttrs:
109 cw = None 109 cw = None
110 if cw and not (cw.external and \ 110 if cw and not (cw.external and
111 (className in module.classes or 111 (className in module.classes or
112 className in module.modules) 112 className in module.modules)):
113 ):
114 if cw.scene() != self.scene: 113 if cw.scene() != self.scene:
115 self.scene.addItem(cw) 114 self.scene.addItem(cw)
116 cw.setPos(10, 10) 115 cw.setPos(10, 10)
117 if className not in nodes: 116 if className not in nodes:
118 nodes.append(className) 117 nodes.append(className)
277 """ 276 """
278 from .AssociationItem import AssociationItem, Generalisation 277 from .AssociationItem import AssociationItem, Generalisation
279 for route in routes: 278 for route in routes:
280 if len(route) > 1: 279 if len(route) > 1:
281 assoc = AssociationItem( 280 assoc = AssociationItem(
282 self.__getCurrentShape(route[1]), 281 self.__getCurrentShape(route[1]),
283 self.__getCurrentShape(route[0]), 282 self.__getCurrentShape(route[0]),
284 Generalisation, 283 Generalisation,
285 topToBottom=True) 284 topToBottom=True)
286 self.scene.addItem(assoc) 285 self.scene.addItem(assoc)
287 286
288 def getPersistenceData(self): 287 def getPersistenceData(self):
289 """ 288 """
290 Public method to get a string for data to be persisted. 289 Public method to get a string for data to be persisted.

eric ide

mercurial