eric6/Graphics/ImportsDiagramBuilder.py

changeset 7529
2b8a0d8ba12a
parent 7360
9190402e4505
child 7637
c878e8255972
equal deleted inserted replaced
7528:0345f54d3959 7529:2b8a0d8ba12a
239 @return reference to the imports item (ModuleItem) 239 @return reference to the imports item (ModuleItem)
240 """ 240 """
241 from .ModuleItem import ModuleItem, ModuleModel 241 from .ModuleItem import ModuleItem, ModuleModel
242 classes.sort() 242 classes.sort()
243 impM = ModuleModel(name, classes) 243 impM = ModuleModel(name, classes)
244 impW = ModuleItem(impM, x, y, scene=self.scene) 244 impW = ModuleItem(impM, x, y, scene=self.scene,
245 colors=self.umlView.getDrawingColors())
245 impW.setId(self.umlView.getItemId()) 246 impW.setId(self.umlView.getItemId())
246 return impW 247 return impW
247 248
248 def __createAssociations(self, shapes): 249 def __createAssociations(self, shapes):
249 """ 250 """
254 from .AssociationItem import AssociationItem, Imports 255 from .AssociationItem import AssociationItem, Imports
255 for module in list(shapes.keys()): 256 for module in list(shapes.keys()):
256 for rel in shapes[module][1]: 257 for rel in shapes[module][1]:
257 assoc = AssociationItem( 258 assoc = AssociationItem(
258 shapes[module][0], shapes[rel][0], 259 shapes[module][0], shapes[rel][0],
259 Imports) 260 Imports,
261 colors=self.umlView.getDrawingColors())
260 self.scene.addItem(assoc) 262 self.scene.addItem(assoc)
261 263
262 def getPersistenceData(self): 264 def getPersistenceData(self):
263 """ 265 """
264 Public method to get a string for data to be persisted. 266 Public method to get a string for data to be persisted.

eric ide

mercurial