src/eric7/Graphics/UMLItem.py

branch
eric7
changeset 10683
779cda568acb
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
10682:47be220abdaf 10683:779cda568acb
200 value.setY(min(rect.bottom(), max(value.y(), rect.top()))) 200 value.setY(min(rect.bottom(), max(value.y(), rect.top())))
201 return value 201 return value
202 202
203 return QGraphicsItem.itemChange(self, change, value) 203 return QGraphicsItem.itemChange(self, change, value)
204 204
205 def paint(self, painter, option, widget=None): # noqa: U100 205 def paint(self, painter, option, _widget=None):
206 """ 206 """
207 Public method to paint the item in local coordinates. 207 Public method to paint the item in local coordinates.
208 208
209 @param painter reference to the painter object 209 @param painter reference to the painter object
210 @type QPainter 210 @type QPainter
211 @param option style options 211 @param option style options
212 @type QStyleOptionGraphicsItem 212 @type QStyleOptionGraphicsItem
213 @param widget optional reference to the widget painted on 213 @param _widget optional reference to the widget painted on (unused)
214 @type QWidget 214 @type QWidget
215 """ 215 """
216 pen = self.pen() 216 pen = self.pen()
217 if ( 217 if (
218 option.state & QStyle.StateFlag.State_Selected 218 option.state & QStyle.StateFlag.State_Selected
251 @return item type 251 @return item type
252 @rtype str 252 @rtype str
253 """ 253 """
254 return self.ItemType 254 return self.ItemType
255 255
256 def parseItemDataString(self, version, data): # noqa: U100 256 def parseItemDataString(self, _version, _data):
257 """ 257 """
258 Public method to parse the given persistence data. 258 Public method to parse the given persistence data.
259 259
260 @param version version of the data 260 @param _version version of the data (unused)
261 @type str 261 @type str
262 @param data persisted data to be parsed 262 @param _data persisted data to be parsed (unused)
263 @type str 263 @type str
264 @return flag indicating success 264 @return flag indicating success
265 @rtype bool 265 @rtype bool
266 """ 266 """
267 return True 267 return True

eric ide

mercurial