Graphics/ModuleItem.py

changeset 2032
704593d042fe
parent 2030
db11a2fe9bbc
child 2033
4b99609f6a87
equal deleted inserted replaced
2031:c36c2eb62a75 2032:704593d042fe
53 53
54 class ModuleItem(UMLItem): 54 class ModuleItem(UMLItem):
55 """ 55 """
56 Class implementing a module item. 56 Class implementing a module item.
57 """ 57 """
58 ItemType = "module"
59
58 def __init__(self, model=None, x=0, y=0, rounded=False, 60 def __init__(self, model=None, x=0, y=0, rounded=False,
59 parent=None, scene=None): 61 parent=None, scene=None):
60 """ 62 """
61 Constructor 63 Constructor
62 64
171 or newlines. 173 or newlines.
172 174
173 @return persistence data (string) 175 @return persistence data (string)
174 """ 176 """
175 entries = [ 177 entries = [
176 "item_type=module", 178 "item_type={0}".format(ModuleItem.ItemType),
177 "name={0}".format(self.model.getName()), 179 "name={0}".format(self.model.getName()),
178 ] 180 ]
179 classes = self.model.getClasses() 181 classes = self.model.getClasses()
180 if classes: 182 if classes:
181 entries.append("classes={0}".format("||".join(classes))) 183 entries.append("classes={0}".format("||".join(classes)))

eric ide

mercurial