Graphics/UMLItem.py

changeset 2033
4b99609f6a87
parent 2030
db11a2fe9bbc
child 2034
8de0fc1f7fef
equal deleted inserted replaced
2032:704593d042fe 2033:4b99609f6a87
15 15
16 class UMLItem(QGraphicsRectItem): 16 class UMLItem(QGraphicsRectItem):
17 """ 17 """
18 Class implementing the UMLItem base class. 18 Class implementing the UMLItem base class.
19 """ 19 """
20 ItemType = "UMLItem"
21
20 def __init__(self, x=0, y=0, rounded=False, parent=None): 22 def __init__(self, x=0, y=0, rounded=False, parent=None):
21 """ 23 """
22 Constructor 24 Constructor
23 25
24 @param x x-coordinate (integer) 26 @param x x-coordinate (integer)
160 162
161 @return ID of the item (integer) 163 @return ID of the item (integer)
162 """ 164 """
163 return self.__id 165 return self.__id
164 166
167 def getItemType(self):
168 """
169 Public method to get the item's type.
170
171 @return item type (string)
172 """
173 return self.ItemType
174
165 def buildItemDataString(self): 175 def buildItemDataString(self):
166 """ 176 """
167 Public method to build a string to persist the specific item data. 177 Public method to build a string to persist the specific item data.
168 178
169 This string must start with ", " and should be built like 179 This string must start with ", " and should be built like

eric ide

mercurial