NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

historyPanel.py (1932B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\neocom\charsheet\historyPanel.py
      2 from carbonui.primitives.container import Container
      3 from carbonui.control.tabGroup import TabGroup
      4 import carbonui.const as uiconst
      5 from eve.client.script.ui.shared.neocom.charsheet import GetPanelName, PANEL_EMPLOYMENT, PANEL_SKILLS_HISTORY
      6 from eve.client.script.ui.shared.neocom.charsheet.employmentHistoryPanel import EmploymentHistoryPanel
      7 from eve.client.script.ui.shared.neocom.charsheet.skillHistoryPanel import SkillHistoryPanel
      8 
      9 class HistoryPanel(Container):
     10     default_name = 'HistoryPanel'
     11 
     12     def ApplyAttributes(self, attributes):
     13         Container.ApplyAttributes(self, attributes)
     14         self.isConstructed = False
     15 
     16     def ConstructLayout(self):
     17         if self.isConstructed:
     18             return
     19         self.isConstructed = True
     20         self.panelCont = Container(name='panelCont', parent=self, align=uiconst.TOALL, padTop=8)
     21         self.employmentHistoryPanel = EmploymentHistoryPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     22         self.skillHistoryPanel = SkillHistoryPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     23         self.tabs = TabGroup(parent=self, align=uiconst.TOTOP, padding=0, groupID='HistoryPanelTabs', autoselecttab=False, idx=0, tabs=((GetPanelName(PANEL_EMPLOYMENT),
     24           self.employmentHistoryPanel,
     25           self,
     26           PANEL_EMPLOYMENT), (GetPanelName(PANEL_SKILLS_HISTORY),
     27           self.skillHistoryPanel,
     28           self,
     29           PANEL_SKILLS_HISTORY)))
     30 
     31     def LoadPanel(self, panelID = None):
     32         self.ConstructLayout()
     33         if panelID:
     34             self.tabs.SelectByID(panelID)
     35         else:
     36             self.tabs.AutoSelect()
     37 
     38     def LoadSubPanel(self, panelID):
     39         self.ConstructLayout()
     40         self.tabs.SelectByID(panelID)
     41 
     42     def GetActivePanelID(self):
     43         return self.tabs.GetSelectedID()