def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.SetTopparentHeight(0) self.SetCaption(localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/WindowCaption')) self.SetWndIcon('ui_17_128_4') self.SetMinSize([525, 400]) self.ownerID = session.charid self.fitting = None self.wordFilter = None self.exportButton = None self.fittingSvc = sm.GetService('fittingSvc') self.DrawLeftSide() divider = xtriui.Divider(name='divider', align=uiconst.TOLEFT, width=const.defaultPadding, parent=self.sr.main, state=uiconst.UI_NORMAL) divider.Startup(self.sr.leftside, 'width', 'x', 256, 350) uicls.Line(parent=divider, align=uiconst.TORIGHT, top=const.defaultPadding) uicls.Line(parent=divider, align=uiconst.TOLEFT) self.DrawRightSide() self.HideRightPanel()
def DrawDivider(self): divPar = uicls.Container(name='divPar', align=uiconst.TOBOTTOM, pos=(0, 0, 0, const.defaultPadding), parent=self.sr.stationsoutpostsResults, idx=0) divider = xtriui.Divider(name='divider', align=uiconst.TOALL, pos=(0, 0, 0, 0), parent=divPar, state=uiconst.UI_NORMAL, idx=0) divider.Startup(self.sr.stationsoutpostsResults, 'height', 'y', 57, 800) divider.OnSizeChanged = self._OnContentSizeChanged divider.OnSizeChangeStarting = self._OnContentSizeChangeStarting divider.OnSizeChanging = self._OnContentSizeChanging l = uicls.Line(parent=divider, align=uiconst.CENTER, width=6, height=1) self.sr.divider = divider
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.SetCaption(localization.GetByLabel('UI/Notepad/Notepad')) self.SetWndIcon('ui_49_64_2') self.SetTopparentHeight(0) self.SetMinSize((256, 128)) self.HideMainIcon() self.sr.main.padding = const.defaultPadding self.sr.nav = uicls.Container(name='nav', align=uiconst.TOLEFT, width=settings.user.ui.Get('notepadscrollistwidth', 128), parent=self.sr.main, idx=0) divider = xtriui.Divider(name='divider', align=uiconst.TOLEFT, idx=1, width=const.defaultPadding, parent=self.sr.main, state=uiconst.UI_NORMAL) divider.Startup(self.sr.nav, 'width', 'x', 100, 256) self.sr.navbuttons = uicls.Container(name='navbuttons', align=uiconst.TOBOTTOM, parent=self.sr.nav, height=38) self.sr.newfolder = uicls.Button(parent=self.sr.navbuttons, label=localization.GetByLabel('UI/Notepad/NewFolder'), padTop=4, align=uiconst.TOTOP, func=self.NewFolderClick) self.sr.newnote = uicls.Button(parent=self.sr.navbuttons, label=localization.GetByLabel('UI/Notepad/NewNote'), padTop=4, align=uiconst.TOTOP, func=self.NewNote, args=(0,)) self.sr.navbuttons.height = sum([ each.height + each.padTop + each.padBottom for each in self.sr.navbuttons.children ]) + 4 self.sr.senderlist = uicls.Scroll(name='senderlist', parent=self.sr.nav) self.sr.senderlist.OnDelete = self.OnDelete self.sr.senderlist.multiSelect = 0 self.sr.note = uicls.Container(name='notecontainer', align=uiconst.TOALL, parent=self.sr.main, pos=(0, 0, 0, 0)) self.sr.titlecont = uicls.Container(name='titlecontainer', align=uiconst.TOTOP, height=48, parent=self.sr.note) uicls.Frame(parent=self.sr.titlecont, padBottom=const.defaultPadding) uicls.Container(name='push', align=uiconst.TORIGHT, width=7, parent=self.sr.titlecont) uicls.Container(name='push', align=uiconst.TOTOP, height=9, parent=self.sr.titlecont) self.sr.icon = uicls.Icon(parent=self.sr.titlecont, pos=(7, 7, 32, 32)) self.sr.titletext = uicls.EveLabelMedium(text='', parent=self.sr.titlecont, align=uiconst.TOALL, padLeft=46) self.sr.browser = uicls.EditPlainText(parent=self.sr.note, showattributepanel=1, counterMax=3900, countWithTags=True) self.sr.browser.sr.window = self self.sr.browser.allowPrivateDrops = 1 self.OnScale_ = self._OnResize divider.OnSizeChanging = self.OnDividerMove self.starting = 1 import log log.LogInfo('Starting Notepad') self.bms = None self.folders = {} self.notes = {} self.bookmarknotes = {} self.charnotes = {} self.settings = {} self.settingStrs = {} self.notedata = {} self.lastid = 0 uthread.new(self.LoadNotesData)
def DrawStuff(self, *args): btns = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Mail/Notifications/MarkAllAsRead'), self.MarkAllRead, None, 81], [localization.GetByLabel('UI/Mail/Notifications/DeleteAll'), self.DeleteAll, None, 81]], parent=self, idx=0, line=1) leftContWidth = settings.user.ui.Get('notifications_leftContWidth', 200) self.sr.leftCont = uicls.Container(name='leftCont', parent=self, align=uiconst.TOLEFT, pos=(const.defaultPadding, 0, leftContWidth, 0)) self.sr.leftScroll = uicls.Scroll(name='leftScroll', parent=self.sr.leftCont, padding=(0, const.defaultPadding, 0, const.defaultPadding)) self.sr.leftScroll.multiSelect = 0 divider = xtriui.Divider(name='divider', align=uiconst.TOLEFT, width=const.defaultPadding, parent=self, state=uiconst.UI_NORMAL) divider.Startup(self.sr.leftCont, 'width', 'x', 180, 250) self.sr.rightCont = uicls.Container(name='rightCont', parent=self, align=uiconst.TOALL, pos=(0, 0, const.defaultPadding, const.defaultPadding)) dividerCont = uicls.DragResizeCont(name='dividerCont', settingsID='notificationsSplitSize', parent=self.sr.rightCont, align=uiconst.TOTOP_PROP, minSize=0.1, maxSize=0.9, defaultSize=0.7, clipChildren=True) self.sr.readingPaneCont = uicls.Container(name='readingPaneCont', parent=self.sr.rightCont, align=uiconst.TOALL) self.sr.readingPane = uicls.EditPlainText(setvalue='', parent=self.sr.readingPaneCont, align=uiconst.TOALL, readonly=1) self.sr.msgCont = uicls.Container(name='msgCont', parent=dividerCont) self.sr.msgScroll = uicls.Scroll(name='msgScroll', parent=self.sr.msgCont, padding=(0, const.defaultPadding, 0, 0)) self.sr.msgScroll.sr.id = 'notifications_msgs' self.sr.msgScroll.sr.fixedColumns = {localization.GetByLabel('UI/Mail/Status'): 52} self.sr.msgScroll.OnSelectionChange = self.MsgScrollSelectionChange self.sr.msgScroll.OnDelete = self.DeleteFromKeyboard self.inited = True
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) items = attributes.get('items', []) outputOwner = attributes.outputOwner outputFlag = attributes.outputFlag self.items = {} self.quotes = {} self.invCookie = None self.invReady = 0 self.crits = {} self.closing = False self.outputOwnerAndFlag = [None, None] self.inputOwnerAndFlag = [None, None] self.selectedItemIDs = {} self.comboLocationOutput = None self.comboLocationInput = None self.reprocessing = 0 self.scrollWidth = MINSCROLLWIDTH office = sm.GetService('corp').GetOffice() if office is None and (outputOwner is not None or outputFlag is not None): outputOwner = eve.session.charid outputFlag = const.flagHangar self.outputOwnerAndFlag = [outputOwner, outputFlag] self.SetScope('station') self.Confirm = self.ValidateOK self._OnClose = self.OnCloseReprocessing self.SetCaption( localization.GetByLabel( 'UI/Reprocessing/ReprocessingWindow/WindowLabel')) self.SetWndIcon('ui_17_128_1') self.SetMinSize([385, 270]) if self is None or self.destroyed: return self.sr.msgparent = uicls.EveLabelSmall(parent=self.sr.topParent, left=6, width=164, tabs=[110, 164], idx=0, align=uiconst.CENTERRIGHT, state=uiconst.UI_NORMAL) self.SetTopparentHeight(64) self.sr.textContainer = uicls.Container(name='textContainer', align=uiconst.TOBOTTOM, parent=self.sr.main, height=14, left=const.defaultPadding, top=const.defaultPadding, state=uiconst.UI_HIDDEN) self.sr.statusText = uicls.EveLabelMedium(text=localization.GetByLabel( 'UI/Reprocessing/ReprocessingWindow/InProgressMessage'), parent=self.sr.textContainer, state=uiconst.UI_DISABLED, align=uiconst.CENTERTOP) self.sr.mainContainer = uicls.Container( name='mainContainer', align=uiconst.TOALL, parent=self.sr.main, pos=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.firstContainer = uicls.Container(name='firstContainer', parent=self.sr.mainContainer, align=uiconst.TOLEFT, width=286) divider = xtriui.Divider(name='divider', align=uiconst.TOLEFT, width=const.defaultPadding, parent=self.sr.mainContainer, state=uiconst.UI_NORMAL) divider.Startup(self.sr.firstContainer, 'width', 'x', MINSCROLLWIDTH, self.scrollWidth) divider.OnSizeChanged = self.OnVerticalDividerSizeChanged self.sr.divider = divider self.sr.itemscroll = uicls.Scroll(name='itemscroll', parent=self.sr.firstContainer) self.sr.itemscroll.sr.id = 'reprocess' self.sr.itemscroll.Load(contentList=[]) self.sr.itemscroll.multiSelect = 0 self.sr.itemscroll.sr.minColumnWidth = { localization.GetByLabel('UI/Common/Name'): 66 } self.sr.itemscroll.OnNewHeaders = self.OnNewHeadersSet self.sr.itemscroll.allowFilterColumns = 1 self.sr.itemscroll.SetColumnsHiddenByDefault( uix.GetInvItemDefaultHiddenHeaders()) self.sr.quotescroll = uicls.Scroll(name='quotescroll', parent=self.sr.mainContainer) self.sr.quotescroll.sr.id = 'reprocessing_quotes' self.sr.quotescroll.Load(contentList=[]) self.sr.standardBtns = uicls.ButtonGroup(btns=[ [ 'reprocessingServiceGetQuotesBtn', localization.GetByLabel( 'UI/Reprocessing/ReprocessingWindow/GetQuoteButton'), self.OnGetQoutes, (), 81 ], [ 'reprocessingServiceReprocessBtn', localization.GetByLabel( 'UI/Reprocessing/ReprocessingWindow/ReprocessButton'), self.OnOK, (), 81 ], [ 'reprocessingServiceCancelBtn', localization.GetByLabel('UI/Common/Buttons/Cancel'), self.OnCancel, (), 81 ] ], forcedButtonNames=True, parent=self.sr.main, idx=0) self.sr.reprocessBtn = uiutil.GetChild( self.sr.standardBtns, 'reprocessingServiceReprocessBtn') self.sr.quotesBtn = uiutil.GetChild(self.sr.standardBtns, 'reprocessingServiceGetQuotesBtn') items = self.DoSelectItems(items) self.showAllItems = False if len(items) == 0: self.showAllItems = True items = self.DrawLocationSelector(items, outputOwner, outputFlag, office) self.Register() self.LoadItems(items) self._OnResize() self.isready = 1 self.reprocessingInfo = None self.UpdateButtons() uthread.new(self.OnGetQoutes)
def LoadCompare(self): if not self.compareinited: subpanel = uicls.Container(name='subpanel', parent=self.sr.panel, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.sr.subpanel = subpanel bottomclear = uicls.Container(name='typecompare_bottomclear', parent=self.sr.subpanel, height=60, align=uiconst.TOBOTTOM) uicls.EveLabelMedium(text=localization.GetByLabel( 'UI/Compare/CompareTypeAttributeLimit', attributeLimit=self.attributeLimit, typeLimit=self.typeLimit), parent=bottomclear, align=uiconst.TOALL, width=const.defaultPadding, height=const.defaultPadding, state=uiconst.UI_NORMAL) attributescroll = uicls.Container( name='typecompare_attributescroll', parent=self.sr.subpanel, align=uiconst.TOLEFT, left=0, width=settings.user.ui.Get('charsheetleftwidth', 125), idx=0) self.sr.attributescroll = uicls.Scroll( name='attributescroll', parent=attributescroll, padding=(0, const.defaultPadding, 0, const.defaultPadding)) self.sr.attributescroll.sr.id = 'typecompare_attributescroll' self.sr.attributescroll.hiliteSorted = 0 self.sr.attributescroll.ShowHint( localization.GetByLabel('UI/Compare/NothingToCompare')) typescroll = uicls.Container(name='typecompare_typescroll', parent=self.sr.subpanel, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.sr.typescroll = uicls.Scroll(name='typescroll', parent=typescroll, left=0, top=const.defaultPadding, width=2, height=const.defaultPadding) self.sr.typescroll.ShowHint( localization.GetByLabel('UI/Compare/CompareToolHint')) divider = xtriui.Divider(name='divider', align=uiconst.TOLEFT, idx=1, width=const.defaultPadding, parent=self.sr.subpanel, state=uiconst.UI_NORMAL) divider.Startup(attributescroll, 'width', 'x', 160, 200) self.sr.typescroll.sr.id = 'typecompare_typescroll' btns = uicls.ButtonGroup( btns=[[ localization.GetByLabel('UI/Commands/UncheckAll'), self.SelectAll, (0, ), None ], [ localization.GetByLabel('UI/Commands/ResetAll'), self.RemoveAllEntries, (), None ]], parent=self.sr.bottomparent, idx=0, unisize=0) self.sr.typescroll.sr.content.OnDropData = self.OnDropData self.compareinited = 1