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

Method __init__

gui/builtinViewColumns/droneEhp.py:38–61  ·  view source on GitHub ↗
(self, fittingView, params=None)

Source from the content-addressed store, hash-verified

36 name = "Drone HP"
37
38 def __init__(self, fittingView, params=None):
39 self.mainFrame = gui.mainFrame.MainFrame.getInstance()
40 if params is None:
41 params = {"showIcon": True, "displayName": False}
42
43 ViewColumn.__init__(self, fittingView)
44
45 sAttr = Attribute.getInstance()
46 info = sAttr.getAttributeInfo("shieldCapacity")
47 self.info = info
48 if params["showIcon"]:
49 iconFile = info.iconID
50 if iconFile:
51 self.imageId = fittingView.imageList.GetImageIndex(iconFile, "icons")
52 self.bitmap = BitmapLoader.getBitmap(iconFile, "icons")
53 else:
54 self.imageId = -1
55 self.mask = wx.LIST_MASK_IMAGE
56 else:
57 self.imageId = -1
58
59 if params["displayName"] or self.imageId == -1:
60 self.columnText = info.displayName if info.displayName != "" else info.name
61 self.mask |= wx.LIST_MASK_TEXT
62
63 def getText(self, stuff):
64 if not isinstance(stuff, (Drone, Fighter)):

Callers

nothing calls this directly

Calls 4

getAttributeInfoMethod · 0.80
GetImageIndexMethod · 0.80
getInstanceMethod · 0.45
getBitmapMethod · 0.45

Tested by

no test coverage detected