MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / getTabExtraText

Method getTabExtraText

gui/builtinAdditionPanes/implantView.py:110–128  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

108 fitID=fitID, source=ImplantLocation.FIT if self.rbFit.GetValue() else ImplantLocation.CHARACTER))
109
110 def getTabExtraText(self):
111 fitID = self.mainFrame.getActiveFit()
112 if fitID is None:
113 return None
114 sFit = Fit.getInstance()
115 fit = sFit.getFit(fitID)
116 if fit is None:
117 return None
118 opt = sFit.serviceFittingOptions["additionsLabels"]
119 # Amount of active implants
120 if opt == 1:
121 amount = len([i for i in fit.appliedImplants if i.active])
122 return ' ({})'.format(amount) if amount else None
123 # Total amount of implants
124 elif opt == 2:
125 amount = len(fit.appliedImplants)
126 return ' ({})'.format(amount) if amount else None
127 else:
128 return None
129
130class ImplantDisplay(d.Display):
131

Callers

nothing calls this directly

Calls 3

getFitMethod · 0.80
getActiveFitMethod · 0.45
getInstanceMethod · 0.45

Tested by

no test coverage detected