ledgerWnd.py (2290B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\ledger\ledgerWnd.py 2 from carbonui.primitives.container import Container 3 from carbonui.control.window import Window 4 from eve.client.script.ui.control.infoIcon import MoreInfoIcon 5 from carbonui.control.tabGroup import TabGroup 6 from eve.client.script.ui.shared.ledger.ledgerPanel import LedgerPanelPersonal, LedgerPanelCorp 7 from eve.common.lib.appConst import corpRoleAccountant 8 from localization import GetByLabel 9 import carbonui.const as uiconst 10 11 class LedgerWindow(Window): 12 __guid__ = 'LedgerWindow' 13 __notifyevents__ = [] 14 default_width = 800 15 default_height = 600 16 default_minSize = (650, 600) 17 default_windowID = 'ledger' 18 default_captionLabelPath = 'UI/Ledger/LedgerWnd' 19 default_descriptionLabelPath = 'Tooltips/Neocom/Ledger_desciption' 20 default_iconNum = 'res:/ui/Texture/WindowIcons/miningLedger.png' 21 22 def ApplyAttributes(self, attributes): 23 Window.ApplyAttributes(self, attributes) 24 shouldShowCorpLedger = bool(session.corprole & corpRoleAccountant) 25 self.ledgerCont = Container(name='ledgerCont', parent=self.sr.main, padding=4) 26 self.ledgerPanelPersonal = LedgerPanelPersonal(parent=self.ledgerCont, padding=4, addInfoIcon=not shouldShowCorpLedger) 27 if shouldShowCorpLedger: 28 self.ledgerPanelCorp = LedgerPanelCorp(parent=self.ledgerCont, padTop=4) 29 tabs = ((GetByLabel('UI/Ledger/LedgerPersonal'), 30 self.ledgerPanelPersonal, 31 None, 32 'personalLedger', 33 None, 34 GetByLabel('UI/Ledger/LedgerPersonalTabHint')), (GetByLabel('UI/Ledger/LedgerCorp'), 35 self.ledgerPanelCorp, 36 None, 37 'corpLedger', 38 None, 39 GetByLabel('UI/Ledger/LedgerCorpTabHint'))) 40 self.tabs = TabGroup(parent=self.ledgerCont, tabs=tabs, height=26, labelPadding=12, idx=0, padLeft=0, groupID='StructureBrowser') 41 moreinfoicon = MoreInfoIcon(left=2, top=-1, parent=self.tabs, idx=0, align=uiconst.CENTERRIGHT, state=uiconst.UI_NORMAL) 42 moreinfoicon.hint = GetByLabel('UI/Ledger/LedgerCacheHint') 43 else: 44 self.ledgerPanelPersonal.ReloadContent()