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

Method __init__

gui/builtinViewColumns/maxRange.py:33–55  ·  view source on GitHub ↗
(self, fittingView, params=None)

Source from the content-addressed store, hash-verified

31 name = "Max Range"
32
33 def __init__(self, fittingView, params=None):
34 if params is None:
35 params = {"showIcon": True, "displayName": False}
36
37 ViewColumn.__init__(self, fittingView)
38
39 sAttr = Attribute.getInstance()
40 info = sAttr.getAttributeInfo("maxRange")
41 self.info = info
42 if params["showIcon"]:
43 iconFile = info.iconID
44 if iconFile:
45 self.imageId = fittingView.imageList.GetImageIndex(iconFile, "icons")
46 self.bitmap = BitmapLoader.getBitmap(iconFile, "icons")
47 else:
48 self.imageId = -1
49 self.mask = wx.LIST_MASK_IMAGE
50 else:
51 self.imageId = -1
52
53 if params["displayName"] or self.imageId == -1:
54 self.columnText = info.displayName if info.displayName != "" else info.name
55 self.mask |= wx.LIST_MASK_TEXT
56
57 def getText(self, stuff):
58 if isinstance(stuff, Mode):

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