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

Method __init__

gui/builtinViewColumns/droneRegen.py:37–53  ·  view source on GitHub ↗
(self, fittingView, params=None)

Source from the content-addressed store, hash-verified

35 name = "Drone Regen"
36
37 def __init__(self, fittingView, params=None):
38 self.mainFrame = gui.mainFrame.MainFrame.getInstance()
39 if params is None:
40 params = {"showIcon": True, "displayName": False}
41
42 ViewColumn.__init__(self, fittingView)
43
44 if params["showIcon"]:
45 self.imageId = fittingView.imageList.GetImageIndex("shieldPassive_small", "gui")
46 self.bitmap = BitmapLoader.getBitmap("shieldPassive_small", "gui")
47 self.mask = wx.LIST_MASK_IMAGE
48 else:
49 self.imageId = -1
50
51 if params["displayName"] or self.imageId == -1:
52 self.columnText = _("Misc data")
53 self.mask |= wx.LIST_MASK_TEXT
54
55 def getText(self, stuff):
56 if not isinstance(stuff, (Drone, Fighter)):

Callers

nothing calls this directly

Calls 3

GetImageIndexMethod · 0.80
getInstanceMethod · 0.45
getBitmapMethod · 0.45

Tested by

no test coverage detected