MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / AddAttribute

Method AddAttribute

gui/builtinItemStatsViews/itemAttributes.py:197–218  ·  view source on GitHub ↗
(self, parent, attr)

Source from the content-addressed store, hash-verified

195 self.paramList.AssignImageList(self.imageList)
196
197 def AddAttribute(self, parent, attr):
198 display = None
199
200 if isinstance(attr, tuple):
201 display = attr[1]
202 attr = attr[0]
203
204 if attr in self.attrValues and attr not in self.processed_attribs:
205
206 data = self.GetData(attr, display)
207 if data is None:
208 return
209
210 attrIcon, attrName, currentVal, baseVal = data
211 attr_item = self.paramList.AppendItem(parent, attrName)
212 self.paramList.SetItemTextColour(attr_item, wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
213
214 self.paramList.SetItemText(attr_item, currentVal, 1)
215 if self.stuff is not None:
216 self.paramList.SetItemText(attr_item, baseVal, 2)
217 self.paramList.SetItemImage(attr_item, attrIcon, which=wx.TreeItemIcon_Normal)
218 self.processed_attribs.add(attr)
219
220 def ExpandOrDelete(self, item):
221 if self.paramList.GetChildrenCount(item) == 0:

Callers 1

PopulateListMethod · 0.95

Calls 1

GetDataMethod · 0.95

Tested by

no test coverage detected