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

Class ImplantSetEditorView

gui/setEditor.py:88–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86
87
88class ImplantSetEditorView(BaseImplantEditorView):
89
90 def __init__(self, parent):
91 BaseImplantEditorView.__init__(self, parent)
92 if 'wxMSW' in wx.PlatformInfo:
93 self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE))
94
95 def bindContext(self):
96 self.Parent.entityEditor.Bind(wx.EVT_CHOICE, self.contextChanged)
97
98 def getImplantsFromContext(self):
99 sIS = ImplantSets.getInstance()
100 set_ = self.Parent.entityEditor.getActiveEntity()
101 if set_:
102 return sIS.getImplants(set_.ID)
103 return []
104
105 def addImplantToContext(self, item):
106 sIS = ImplantSets.getInstance()
107 set_ = self.Parent.entityEditor.getActiveEntity()
108
109 sIS.addImplants(set_.ID, item.ID)
110
111 def removeImplantFromContext(self, implant):
112 sIS = ImplantSets.getInstance()
113 set_ = self.Parent.entityEditor.getActiveEntity()
114
115 sIS.removeImplant(set_.ID, implant)
116
117
118class ImplantSetEditor(AuxiliaryFrame):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected