src/eric7/Graphics/PackageItem.py

branch
eric7
changeset 10683
779cda568acb
parent 10439
21c28b0f9e41
child 10806
2f6df822e3b9
equal deleted inserted replaced
10682:47be220abdaf 10683:779cda568acb
172 self.modules = None 172 self.modules = None
173 self.model = model 173 self.model = model
174 self.__createTexts() 174 self.__createTexts()
175 self.__calculateSize() 175 self.__calculateSize()
176 176
177 def paint(self, painter, option, widget=None): # noqa: U100 177 def paint(self, painter, option, _widget=None):
178 """ 178 """
179 Public method to paint the item in local coordinates. 179 Public method to paint the item in local coordinates.
180 180
181 @param painter reference to the painter object 181 @param painter reference to the painter object
182 @type QPainter 182 @type QPainter
183 @param option style options 183 @param option style options
184 @type QStyleOptionGraphicsItem 184 @type QStyleOptionGraphicsItem
185 @param widget optional reference to the widget painted on 185 @param _widget optional reference to the widget painted on (unused)
186 @type QWidget 186 @type QWidget
187 """ 187 """
188 pen = self.pen() 188 pen = self.pen()
189 if ( 189 if (
190 option.state & QStyle.StateFlag.State_Selected 190 option.state & QStyle.StateFlag.State_Selected
209 y = int(self.margin + self.header.boundingRect().height() + latchH) 209 y = int(self.margin + self.header.boundingRect().height() + latchH)
210 painter.drawLine(offsetX, offsetY + y, offsetX + w - 1, offsetY + y) 210 painter.drawLine(offsetX, offsetY + y, offsetX + w - 1, offsetY + y)
211 211
212 self.adjustAssociations() 212 self.adjustAssociations()
213 213
214 def parseItemDataString(self, version, data): # noqa: U100 214 def parseItemDataString(self, _version, data):
215 """ 215 """
216 Public method to parse the given persistence data. 216 Public method to parse the given persistence data.
217 217
218 @param version version of the data 218 @param _version version of the data (unused)
219 @type str 219 @type str
220 @param data persisted data to be parsed 220 @param data persisted data to be parsed
221 @type str 221 @type str
222 @return flag indicating success 222 @return flag indicating success
223 @rtype bool 223 @rtype bool

eric ide

mercurial