src/eric7/Graphics/ModuleItem.py

branch
eric7
changeset 10683
779cda568acb
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
10682:47be220abdaf 10683:779cda568acb
142 self.meths = None 142 self.meths = None
143 self.model = model 143 self.model = model
144 self.__createTexts() 144 self.__createTexts()
145 self.__calculateSize() 145 self.__calculateSize()
146 146
147 def paint(self, painter, option, widget=None): # noqa: U100 147 def paint(self, painter, option, _widget=None):
148 """ 148 """
149 Public method to paint the item in local coordinates. 149 Public method to paint the item in local coordinates.
150 150
151 @param painter reference to the painter object 151 @param painter reference to the painter object
152 @type QPainter 152 @type QPainter
153 @param option style options 153 @param option style options
154 @type QStyleOptionGraphicsItem 154 @type QStyleOptionGraphicsItem
155 @param widget optional reference to the widget painted on 155 @param _widget optional reference to the widget painted on (unused)
156 @type QWidget 156 @type QWidget
157 """ 157 """
158 pen = self.pen() 158 pen = self.pen()
159 if ( 159 if (
160 option.state & QStyle.StateFlag.State_Selected 160 option.state & QStyle.StateFlag.State_Selected
176 y = self.margin + int(self.header.boundingRect().height()) 176 y = self.margin + int(self.header.boundingRect().height())
177 painter.drawLine(offsetX, offsetY + y, offsetX + w - 1, offsetY + y) 177 painter.drawLine(offsetX, offsetY + y, offsetX + w - 1, offsetY + y)
178 178
179 self.adjustAssociations() 179 self.adjustAssociations()
180 180
181 def parseItemDataString(self, version, data): # noqa: U100 181 def parseItemDataString(self, _version, data):
182 """ 182 """
183 Public method to parse the given persistence data. 183 Public method to parse the given persistence data.
184 184
185 @param version version of the data 185 @param _version version of the data (unused)
186 @type str 186 @type str
187 @param data persisted data to be parsed 187 @param data persisted data to be parsed
188 @type str 188 @type str
189 @return flag indicating success 189 @return flag indicating success
190 @rtype bool 190 @rtype bool

eric ide

mercurial