def Indicate(self, header, strng, delayMs=0): if header is None and strng is None: if self.indicationtext is not None and not self.indicationtext.destroyed: self.indicationtext.Close() self.indicationtext = None self.caption.Close() self.caption = None return if self.indicationtext is None or self.indicationtext.destroyed: self.indicationtext = uicls.EveLabelMedium( parent=uicore.layer.shipui.sr.indicationContainer, name='indicationtext', text=strng, align=uiconst.TOPLEFT, width=400, state=uiconst.UI_DISABLED) self.caption = uicls.CaptionLabel( text=header, parent=uicore.layer.shipui.sr.indicationContainer, align=uiconst.CENTERTOP, state=uiconst.UI_DISABLED, top=1) else: self.indicationtext.text = strng self.caption.text = header if uicore.layer.shipui.sr.indicationContainer is None: return self.indicationtext.left = ( uicore.layer.shipui.sr.indicationContainer.width - self.indicationtext.width) / 2 self.indicationtext.top = self.caption.top + self.caption.height if delayMs: uthread.new(self._DelayShowIndicateMsg, delayMs)
def GetUnderlay(self): if self.underlay is None: for each in uicore.layer.main.children[:]: if each is not None and not each.destroyed and each.name == 'services': uicore.registry.UnregisterWindow(each) each.OnClick = None each.Minimize = None each.Maximize = None each.Close() self.underlay = uicls.Sprite(name='services', parent=uicore.layer.main, align=uiconst.TOTOP, state=uiconst.UI_HIDDEN) self.underlay.scope = 'station' self.underlay.minimized = 0 self.underlay.Minimize = self.MinimizeUnderlay self.underlay.Maximize = self.MaximizeUnderlay main = uicls.Container(name='mainparentXX', parent=self.underlay, align=uiconst.TOALL, pos=(0, 0, 0, 0)) main.OnClick = self.ClickParent main.state = uiconst.UI_NORMAL sub = uicls.Container(name='subparent', parent=main, align=uiconst.TOALL, pos=(0, 0, 0, 0)) captionparent = uicls.Container(name='captionparent', parent=main, align=uiconst.TOPLEFT, left=128, top=36, idx=0) caption = uicls.CaptionLabel(text='', parent=captionparent) self.closeBtn = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Commands/CmdClose'), self.CloseSvc, None, 81]], parent=sub) self.sr.underlay = uicls.WindowUnderlay(parent=main) self.sr.underlay.padding = (-1, -10, -1, 0) svcparent = uicls.Container(name='serviceparent', parent=sub, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.underlay.sr.main = main self.underlay.sr.svcparent = svcparent self.underlay.sr.caption = caption uicore.registry.RegisterWindow(self.underlay) return self.underlay
def GiveHint(self, hintstr, left = 80, top = 320, width = 300): self.ClearHint() if self.hint is None: par = uicls.Container(name='captionParent', parent=self.GetUnderlay().sr.main, align=uiconst.TOPLEFT, top=top, left=left, width=width, height=256, idx=0) self.hint = uicls.CaptionLabel(text='', parent=par, align=uiconst.TOALL, left=0, top=0) self.hint.parent.top = top self.hint.parent.left = left self.hint.parent.width = width self.hint.text = hintstr or ''
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.SetScope('station_inflight') self.SetCaption(localization.GetByLabel('UI/Help/EveHelp')) self.SetWndIcon('74_14') self.SetMinSize([300, 458], 1) self.LockWidth(300) self.SetTopparentHeight(64) self.MakeUnpinable() self.MouseDown = self.OnWndMouseDown self.supportLoaded = False self.tutorialsLoaded = False supportPar = uicls.Container(name='supportPar', parent=self.sr.main, left=const.defaultPadding, top=const.defaultPadding, width=const.defaultPadding, height=const.defaultPadding) tutorialsPar = uicls.Container(name='tutorialPar', parent=self.sr.main, pos=(0, 0, 0, 0)) t = [[ localization.GetByLabel('UI/Help/Support'), supportPar, self, ('support', ) ], [ localization.GetByLabel('UI/Help/Tutorials'), tutorialsPar, self, ('tutorials', ) ]] tabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=0, tabs=t, autoselecttab=0) tabs.ShowPanelByName(attributes.showPanel or localization.GetByLabel('UI/Help/Support')) self.sr.mainTabs = tabs uicls.CaptionLabel(text=localization.GetByLabel('UI/Help/EveHelp'), parent=self.sr.topParent, align=uiconst.CENTERLEFT, left=70)
def Execute(self, text, title, buttons, radioOptions, icon, suppText, customicon=None, height=None, width=None, default=None, modal=True): height = height or 230 width = width or 340 self.HideHeader() self.SetMinSize([width, height]) self.width = width self.height = height self.DefineIcons(icon, customicon) if title is None: title = localization.GetByLabel('UI/Common/Information') self.sr.main = uiutil.FindChild(self, 'main') push = uicls.Container(name='push', align=uiconst.TOLEFT, parent=self.sr.topParent, width=64) caption = uicls.CaptionLabel(text=title, align=uiconst.CENTERLEFT, parent=self.sr.topParent, left=64, width=270) self.SetTopparentHeight(max(56, caption.textheight + 16)) self.sr.radioContainer = uicls.Container(name='radioContainer', parent=self.sr.main, align=uiconst.TOBOTTOM, left=6, top=const.defaultPadding, width=const.defaultPadding, height=40) push = uicls.Container(name='push', align=uiconst.TOLEFT, parent=self.sr.radioContainer, width=4) self.sr.radioContainer2 = uicls.Container( name='radioContainer', parent=self.sr.radioContainer, align=uiconst.TOALL, pos=(6, const.defaultPadding, 6, const.defaultPadding)) self.sr.textContainer = uicls.Container( name='textContainer', parent=self.sr.main, align=uiconst.TOALL, pos=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) if text: edit = uicls.EditPlainText(parent=self.sr.textContainer, padding=const.defaultPadding, readonly=1) self.edit = edit uthread.new(self.SetText, text) h = 0 if radioOptions: self.radioboxID = 'radioButtonMessageBox_%s' % repr(title) radioSelection = settings.user.ui.Get(self.radioboxID, 'radioboxOption1Selected') for index, label in enumerate(radioOptions): checkBox = uicls.Checkbox(text=label, parent=self.sr.radioContainer, configName=self.radioboxID, retval='radioboxOption%dSelected' % (index + 1), checked='radioboxOption%dSelected' % (index + 1) == radioSelection, groupname=self.radioboxID, callback=self.OnCheckboxChange) h += checkBox.height self.sr.radioContainer.height = h if suppText: self.ShowSupp(suppText) self.DefineButtons(buttons, default=default) if modal: uicore.registry.SetFocus(self)
def Setup(self, where=None): self.isCorp = None self.where = where self.limits = sm.GetService('marketQuote').GetSkillLimits() par = uicls.Container(name='counter', parent=self, align=uiconst.TOBOTTOM, height=60, clipChildren=1) self.sr.counter = uicls.EveLabelMedium(text='', parent=par, left=const.defaultPadding + LEFTSIDEWIDTH, top=const.defaultPadding, tabs=[175, 500], state=uiconst.UI_NORMAL) self.sr.counter2 = uicls.EveLabelMedium(text='', parent=par, left=6, top=const.defaultPadding, state=uiconst.UI_NORMAL, align=uiconst.TOPRIGHT) buySellCont = uicls.Container(name='buySellCont', parent=self) self.dividerCont = uicls.DragResizeCont(name='dividerCont', settingsID='marketOrders', parent=buySellCont, align=uiconst.TOTOP_PROP, minSize=0.2, maxSize=0.8, defaultSize=0.5, clipChildren=True) sellParent = uicls.Container(name='sellParent', parent=self.dividerCont.mainCont) sellLeft = uicls.Container(name='sellLeft', parent=sellParent, align=uiconst.TOLEFT, width=LEFTSIDEWIDTH) sellingText = uicls.CaptionLabel( text=localization.GetByLabel('UI/Market/Orders/Selling'), parent=sellLeft, align=uiconst.RELATIVE, fontsize=16, left=4, top=4) scroll = uicls.Scroll(name='sellscroll', parent=sellParent) scroll.multiSelect = 0 scroll.smartSort = 1 scroll.ignoreHeaderWidths = 1 scroll.sr.id = 'ordersSellScroll' scroll.OnColumnChanged = self.OnOrderSellColumnChanged self.sr.sellScroll = scroll self.sr.sellParent = sellParent buyParent = uicls.Container(name='buyParent', parent=buySellCont) buyLeft = uicls.Container(name='buyLeft', parent=buyParent, align=uiconst.TOLEFT, width=LEFTSIDEWIDTH) buyingText = uicls.CaptionLabel( text=localization.GetByLabel('UI/Market/Orders/Buying'), parent=buyLeft, align=uiconst.RELATIVE, fontsize=16, left=4, top=4) leftsidewidth = max(LEFTSIDEWIDTH, sellingText.width + 10, buyingText.width + 10) sellLeft.width = leftsidewidth buyLeft.width = leftsidewidth self.sr.counter.left = const.defaultPadding + leftsidewidth scroll = uicls.Scroll(name='buyscroll', parent=buyParent) scroll.multiSelect = 0 scroll.smartSort = 1 scroll.ignoreHeaderWidths = 1 scroll.sr.id = 'ordersBuyScroll' scroll.OnColumnChanged = self.OnOrderBuyColumnChanged self.sr.buyScroll = scroll uicls.Button(label=localization.GetByLabel('UI/Market/Orders/Export'), align=uiconst.BOTTOMLEFT, parent=par, func=self.ExportToFile) sm.RegisterNotify(self) w, h = self.GetAbsoluteSize() self._OnSizeChange_NoBlock(w, h) self.ordersInited = 1
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.shipid = util.GetActiveShip() self.shipItem = self.GetShipItem() self.SetCaption( localization.GetByLabel('UI/Ship/ShipConfig/ShipConfig')) self.SetTopparentHeight(72) self.SetWndIcon() self.SetMinSize([300, 200]) self.sr.top = uicls.Container(name='top', align=uiconst.TOTOP, parent=self.sr.topParent, pos=(const.defaultPadding, const.defaultPadding, const.defaultPadding, 64)) icon = uicls.Icon(parent=self.sr.top, align=uiconst.TOLEFT, left=const.defaultPadding, size=64, state=uiconst.UI_NORMAL, typeID=self.shipItem.typeID) icon.GetMenu = self.ShipMenu uicls.Container(name='push', align=uiconst.TOLEFT, pos=(5, 0, 5, 0), parent=self.sr.top) uicls.EveHeaderMedium(name='label', text=cfg.evelocations.Get( self.shipItem.itemID).name, parent=self.sr.top, align=uiconst.TOTOP, bold=True, state=uiconst.UI_NORMAL) uicls.EveLabelMedium(name='label', text=cfg.invtypes.Get(self.shipItem.typeID).name, parent=self.sr.top, align=uiconst.TOTOP, state=uiconst.UI_NORMAL) self.ship = moniker.GetShipAccess() self.conf = self.ship.GetShipConfiguration(self.shipid) modules = self.GetShipModules() for module in modules: self.sr.Set( '%sPanel' % module.lower(), uicls.Container(name=module, align=uiconst.TOALL, state=uiconst.UI_HIDDEN, parent=self.sr.main, pos=(0, 0, 0, 0))) tabs = [[ name, self.sr.Get('%sPanel' % module.lower(), None), self, module ] for module, name in modules.iteritems() if self.sr.Get('%sPanel' % module.lower())] if tabs: self.sr.maintabs = uicls.TabGroup(name='tabparent', align=uiconst.TOTOP, height=18, parent=self.sr.main, idx=0, tabs=tabs, groupID='pospanel') else: uicls.CaptionLabel( text=localization.GetByLabel('UI/Ship/ShipConfig/ShipConfig'), parent=self.sr.main, size=18, uppercase=0, left=const.defaultPadding, width=const.defaultPadding, top=const.defaultPadding)
def LoadWindowOverlayPage(self, force = 0): mainpar = uiutil.FindChild(self, 'startpage_mainpar') if mainpar and not mainpar.destroyed: return if not self or self.destroyed: return kbContent, overlayPage, suppressed = self.CheckForContextHelp() if overlayPage is None or suppressed and not force: return if getattr(self, 'isToggling', 0): return if self.sr.stack: top = 0 else: headerHeight = self.GetCollapsedHeight() top = headerHeight if not force: tutorialWnd = form.TutorialWindow.GetIfOpen() if tutorialWnd: return m = 2 mainpar = uicls.Container(name='startpage', parent=self.sr.maincontainer, left=m, width=m, height=m, idx=0, top=top, clipChildren=True, state=uiconst.UI_NORMAL) par = uicls.Container(name='startpage_mainpar', parent=mainpar, state=uiconst.UI_HIDDEN) uicls.Line(parent=par, align=uiconst.TOLEFT) uicls.Line(parent=par, align=uiconst.TORIGHT) uicls.Line(parent=par, align=uiconst.TOBOTTOM) uicls.Fill(parent=par, color=(0.0, 0.0, 0.0, 0.8)) contentpar = uicls.Container(name='contentpar', parent=par, idx=0) topPar = uicls.Container(name='topPar', parent=contentpar, align=uiconst.TOTOP, height=64) icon = uicls.Icon(icon='ui_74_64_13', parent=contentpar) caption = uicls.CaptionLabel(text=overlayPage.title, parent=topPar, align=uiconst.CENTERLEFT, left=70) topPar.height = max(topPar.height, caption.textheight) bottomPar = uicls.Container(name='bottomPar', parent=contentpar, align=uiconst.TOBOTTOM) uicls.Line(parent=bottomPar, align=uiconst.TOTOP) btn = uicls.Button(parent=bottomPar, label=localization.GetByLabel('UI/Control/EveWindow/CloseWindowOverlay'), func=self.CloseWindowOverlay, idx=0, left=6, align=uiconst.CENTERRIGHT, alwaysLite=True) self.sr.wpCloseBtn = btn checkboxLabel = localization.GetByLabel('UI/Control/EveWindow/DisableThisWindowOverlay') self.sr.wpSuppress = uicls.Checkbox(text=checkboxLabel, parent=bottomPar, configName='suppress', retval=0, checked=suppressed, groupname=None, align=uiconst.TOPLEFT, pos=(6, 0, 200, 0), callback=self.DoSupress) allSuppressed = not settings.char.ui.Get('showWindowOverlays', 0) checkboxLabel = localization.GetByLabel('UI/Control/EveWindow/DisableAllWindowOverlays') self.sr.wpSuppressAll = uicls.Checkbox(text=checkboxLabel, parent=bottomPar, configName='suppressAll', retval=0, checked=allSuppressed, groupname=None, align=uiconst.TOPLEFT, pos=(6, 0, 200, 0), callback=self.DoSuppressAll) self.sr.wpSuppress.top = self.sr.wpSuppressAll.height bottomPar.height = max(self.sr.wpSuppress.height + 2 + self.sr.wpSuppressAll.height, btn.height + 6) if kbContent: uicls.Container(name='push', parent=contentpar, align=uiconst.TOBOTTOM, height=16) mainBottomPar = uicls.Container(name='mainBottomPar', parent=contentpar, align=uiconst.TOBOTTOM, height=32) kbPar = uicls.Container(name='kbPar', parent=mainBottomPar, align=uiconst.TOLEFT, width=128, left=16) uicls.Line(parent=kbPar, align=uiconst.TORIGHT) t = uicls.EveLabelMedium(text=localization.GetByLabel('UI/Control/EveWindow/KnowledgeBase'), parent=kbPar, align=uiconst.TOTOP, state=uiconst.UI_NORMAL) maxWidth = t.textwidth for each in kbContent: if not each.url: continue entryPar = uicls.Container(name='entryPar', parent=kbPar, align=uiconst.TOTOP) l = uicls.EveHeaderSmall(text='<url=%s>%s</url>' % (each.url, each.description or each.url), parent=entryPar, top=1, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL) entryPar.height = max(14, l.textheight) maxWidth = max(maxWidth, l.textwidth + 18) icon = uicls.Icon(icon='ui_38_16_125', parent=entryPar, align=uiconst.CENTERRIGHT, idx=0, state=uiconst.UI_NORMAL) icon.OnClick = (self.ClickHelp, each.url) kbPar.width = maxWidth kbHeight = sum([ each.height for each in kbPar.children ]) tutorials = sm.GetService('tutorial').GetTutorials() validTutorials = sm.GetService('tutorial').GetValidTutorials() tutorialsPar = uicls.Container(name='tutorialsPar', parent=mainBottomPar, align=uiconst.TOLEFT, width=128, left=16) uicls.Line(parent=tutorialsPar, align=uiconst.TORIGHT) t = uicls.EveLabelMedium(text=localization.GetByLabel('UI/Control/EveWindow/Tutorials'), parent=tutorialsPar, align=uiconst.TOTOP, state=uiconst.UI_NORMAL) maxWidth = t.textwidth for each in kbContent: if each.tutorialID is None: continue tutorialData = tutorials.get(each.tutorialID, None) if tutorialData and each.tutorialID in validTutorials: entryPar = uicls.Container(name='entryPar', parent=tutorialsPar, align=uiconst.TOTOP) tutorialName = localization.GetByMessageID(tutorialData.tutorialNameID) l = uicls.EveHeaderSmall(text='<url=localsvc:service=tutorial&method=OpenTutorialSequence_Check&tutorialID=%s&force=1&click=1>%s</url>' % (each.tutorialID, tutorialName), parent=entryPar, align=uiconst.CENTERLEFT, top=1, state=uiconst.UI_NORMAL) entryPar.height = max(14, l.textheight) maxWidth = max(maxWidth, l.textwidth + 18) icon = uicls.Icon(icon='ui_38_16_125', parent=entryPar, align=uiconst.CENTERRIGHT, idx=0, state=uiconst.UI_NORMAL) icon.OnClick = (self.ClickTutorial, each.tutorialID) if len(tutorialsPar.children) <= 2: tutorialsPar.Flush() tutorialsPar.width = maxWidth tutorialsHeight = sum([ each.height for each in tutorialsPar.children ]) mainBottomPar.height = max(64, kbHeight, tutorialsHeight) browser = uicls.EditPlainText(parent=contentpar, padLeft=const.defaultPadding, padRight=const.defaultPadding, readonly=1, setvalue=overlayPage.text) browser.HideBackground() browser.RemoveActiveFrame() uthread.new(self.ToggleWindowOverlay, 1)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) charID = attributes.charID self.charID = None self.corp = None self.standing2 = None self.charMgr = None self.memberinfo = None self.corporation = None self.roleGroupings = None self.myGrantableRoles = None self.myGrantableRolesAtHQ = None self.myGrantableRolesAtBase = None self.myGrantableRolesAtOther = None self.isCEOorEq = None self.userIsCEO = None self.member = None self.playerIsCEO = 0 self.playerIsDirector = 0 self.roles = 0 self.grantableRoles = 0 self.rolesAtHQ = 0 self.grantableRolesAtHQ = 0 self.rolesAtBase = 0 self.grantableRolesAtBase = 0 self.rolesAtOther = 0 self.grantableRolesAtOther = 0 self.baseID = None self.title = '' self.titleMask = 0 self.args = '' self.ddxFunction = None self.viewType = 0 self.viewRoleGroupingID = 1 self.bases = [('-', None)] self.LoadServices() self.LoadChar(charID) self.SetScope('all') if not self.member: self.Close() return self.SetTopparentHeight(70) self.SetCaption(localization.GetByLabel('UI/Corporations/EditMemberDialog/EditMemberCaption')) self.SetMinSize([310, 300]) self.sr.main = uiutil.GetChild(self, 'main') self.wndCombos = uicls.Container(name='options', parent=self.sr.main, align=uiconst.TOTOP, height=34) viewOptionsList1 = [[localization.GetByLabel('UI/Corporations/Common/Roles'), VIEW_ROLES], [localization.GetByLabel('UI/Corporations/Common/GrantableRoles'), VIEW_GRANTABLE_ROLES]] viewOptionsList2 = [] for roleGrouping in self.roleGroupings.itervalues(): viewOptionsList2.append([localization.GetByMessageID(roleGrouping.roleGroupNameID), roleGrouping.roleGroupID]) i = 0 for optlist, label, config, defval in [(viewOptionsList1, localization.GetByLabel('UI/Common/View'), 'viewtype', 1000), (viewOptionsList2, localization.GetByLabel('UI/Corporations/Common/GroupType'), 'rolegroup', None)]: combo = uicls.Combo(label=label, parent=self.wndCombos, options=optlist, name=config, callback=self.OnComboChange, width=146, pos=(const.defaultPadding + i * 152 + 1, const.defaultPadding + 12, 0, 0)) i += 1 self.sr.scroll = uicls.Scroll(parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.standardBtns = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Common/Buttons/OK'), self.OnOK, (), 81], [localization.GetByLabel('UI/Common/Buttons/Cancel'), self.OnCancel, (), 81], [localization.GetByLabel('UI/Corporations/EditMemberDialog/Apply'), self.OnApply, (), 81]]) self.sr.main.children.insert(0, self.sr.standardBtns) cap = uicls.CaptionLabel(text=cfg.eveowners.Get(self.charID).name, parent=self.sr.topParent, align=uiconst.RELATIVE, left=74, top=20) if self.member.title: uicls.EveHeaderLarge(text=self.member.title, parent=self.sr.topParent, align=uiconst.RELATIVE, left=cap.left, top=cap.top + cap.height, bold=True) if util.IsDustCharacter(charID): btns = [] else: btns = [[localization.GetByLabel('UI/Corporations/EditMemberDialog/GiveShares'), self.OnGiveShares, (), 81]] buttons = uicls.ButtonGroup(btns=btns) self.sr.main.children.insert(1, buttons) maintabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=0) maintabs.Startup([[localization.GetByLabel('UI/Generic/General'), self.sr.scroll, self, 'general', buttons], [localization.GetByLabel('UI/Corporations/Common/Roles'), self.sr.scroll, self, 'roles'], [localization.GetByLabel('UI/Corporations/Common/Titles'), self.sr.scroll, self, 'titles'], [localization.GetByLabel('UI/Corporations/EditMemberDialog/RolesSummary'), self.sr.scroll, self, 'roles_summary']], 'editmemberdialog') self.sr.maintabs = maintabs self.DisplayPhoto()
def ConstructLayout(self, *args): self.sr.fileContainer = uicls.Container(name='fileContainer', align=uiconst.TOLEFT, parent=self.sr.main, top=const.defaultPadding, width=256) self.sr.profilesContainer = uicls.Container(name='profilesContainer', align=uiconst.TOALL, parent=self.sr.main, pos=(0, 0, 0, 0)) fileTopCont = uicls.Container(name='fileTopCont', parent=self.sr.fileContainer, align=uiconst.TOTOP, height=40) fileScrollCont = uicls.Container(name='fileScrollCont', parent=self.sr.fileContainer, align=uiconst.TOALL) self.sr.fileHeader = uicls.CaptionLabel( text=localization.GetByLabel('UI/Common/Files/FileName'), parent=fileTopCont, left=const.defaultPadding, top=const.defaultPadding) self.sr.fileHeader.fontsize = 14 self.sr.fileScroll = uicls.Scroll(name='fileScroll', parent=fileScrollCont, padding=(const.defaultPadding, 0, const.defaultPadding, const.defaultPadding)) self.sr.refreshFileListBtn = uicls.ButtonGroup( btns=[[ localization.GetByLabel('UI/Commands/Refresh'), self.RefreshFileList, (), None ]], parent=self.sr.fileContainer, idx=0) profilesTopCont = uicls.Container(name='fileTopCont', parent=self.sr.profilesContainer, align=uiconst.TOTOP, height=40) profilesScrollCont = uicls.Container(name='fileScrollCont', parent=self.sr.profilesContainer, align=uiconst.TOALL) self.sr.profilesHeader = uicls.CaptionLabel( text=localization.GetByLabel('UI/Common/PleaseSelect'), parent=profilesTopCont, left=const.defaultPadding, top=const.defaultPadding) self.sr.profilesHeader.fontsize = 14 self.checkAllCB = uicls.Checkbox( text=localization.GetByLabel('UI/Shared/CheckAllOn'), parent=profilesTopCont, align=uiconst.TOBOTTOM, height=16, padLeft=const.defaultPadding, callback=self.CheckAll, checked=True) self.sr.profilesScroll = uicls.Scroll(name='profilesScroll', parent=profilesScrollCont, padding=(const.defaultPadding, 0, const.defaultPadding, const.defaultPadding)) self.sr.importProfilesBtn = uicls.ButtonGroup( btns=[[ localization.GetByLabel('UI/Commands/Import'), self.Import, (), None ]], parent=self.sr.profilesContainer, idx=0) self.sr.importProfilesBtn.state = uiconst.UI_HIDDEN self.RefreshFileList()
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) padding = 2 * const.defaultPadding self.contHeights = 30 inputLeft = 130 self.btns = None self.scope = 'station' self.SetWndIcon() self.SetTopparentHeight(64 + 2 * padding) self.SetMinSize([400, 220], 1) self.NoSeeThrough() self.MakeUnResizeable() self.MakeUncollapseable() self.topImage = uicls.Icon( parent=self.sr.topParent, pos=(padding, padding, 64, 64), texturePath='res:/UI/Texture/Icons/102_128_2.png', align=uiconst.TOPLEFT, idx=0) self.captionLabel = uicls.EveCaptionMedium(parent=self.sr.topParent, name='itemName', align=uiconst.CENTERLEFT, text='', pos=(64 + 2 * padding, 0, 320, 0)) firstCont = uicls.Container(parent=self.sr.main, name='firstCont', align=uiconst.TOTOP, pos=(0, 0, 0, self.contHeights)) self.firstLabel = uicls.EveLabelSmall(text='', parent=firstCont, name='firstLabel', align=uiconst.CENTERLEFT, left=padding, top=0) self.firstValue = uicls.EveLabelSmall(text='', parent=firstCont, name='firstValue', align=uiconst.CENTERLEFT, left=inputLeft, top=0) qtyCont = uicls.Container(parent=self.sr.main, name='secondCont', align=uiconst.TOTOP, pos=(0, 0, 0, self.contHeights)) self.qtyLabel = uicls.EveLabelSmall( text=localization.GetByLabel('UI/Common/Quantity'), parent=qtyCont, name='secondLabel', align=uiconst.CENTERLEFT, left=padding, top=0) self.qtyEdit = uicls.SinglelineEdit(name='qtyEdit', parent=qtyCont, setvalue=0, maxLength=32, pos=(inputLeft, 0, 60, 0), label='', align=uiconst.CENTERLEFT, ints=[0, 1000000]) self.qtyEdit.OnChange = self.OnChanged_quantity self.qtyAvailLabel = uicls.EveLabelSmall(text='', parent=qtyCont, name='qtyAvailLabel', align=uiconst.CENTERLEFT, left=self.qtyEdit.left + self.qtyEdit.width + padding, top=0) totalCont = uicls.Container(parent=self.sr.main, name='totalCont', align=uiconst.TOTOP, pos=(0, 0, 0, self.contHeights)) width = self.width - inputLeft - 20 self.totalLabel = uicls.EveLabelSmall(text='', parent=totalCont, name='totalLabel', align=uiconst.CENTERLEFT, left=padding, top=0) self.totalValueLabel = uicls.CaptionLabel(text='', parent=totalCont, align=uiconst.CENTERLEFT, left=inputLeft, uppercase=False, letterspace=0, width=width)