Example #1
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     btns = [(GetByLabel(
         'UI/CharacterSheet/CharacterSheetWindow/DecoTabs/SaveDecorationPermissionChanges'
     ), self.SaveDecorationPermissionsChanges, (), 64),
             (GetByLabel(
                 'UI/CharacterSheet/CharacterSheetWindow/DecoTabs/SetAllDecorationPermissions'
             ), self.SetAllDecorationPermissions, (), 64)]
     self.mainAreaButtons = ContainerAutoSize(align=uiconst.TOBOTTOM,
                                              parent=self)
     ButtonGroup(btns=btns, parent=self.mainAreaButtons, line=False)
     self.decoMedalList = None
     self.decoRankList = None
     self.scroll = Scroll(parent=self, padding=(0, 4, 0, 4))
     self.mydecorationstabs = TabGroup(
         name='tabparent',
         parent=self,
         idx=0,
         tabs=
         [[
             GetByLabel(
                 'UI/CharacterSheet/CharacterSheetWindow/DecoTabs/Ranks'),
             self.scroll, self, PANEL_RANKS
         ],
          [
              GetByLabel(
                  'UI/CharacterSheet/CharacterSheetWindow/DecoTabs/Medals'),
              self.scroll, self, PANEL_MEDALS
          ],
          [
              GetByLabel(
                  'UI/CharacterSheet/CharacterSheetWindow/DecoTabs/Permissions'
              ), self.scroll, self, PANEL_PERMISSIONS
          ]],
         groupID='cs_decorations')
Example #2
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     sm.RegisterNotify(self)
     self.killentries = 25
     self.topCont = Container(name='combatlogpanel', parent=self, align=uiconst.TOTOP, padTop=const.defaultPadding)
     combatValues = ((GetByLabel('UI/Corporations/Wars/Killmails/ShowKills'), 0), (GetByLabel('UI/Corporations/Wars/Killmails/ShowLosses'), 1))
     selectedCombatType = settings.user.ui.Get('CombatLogCombo', 0)
     self.combatCombo = Combo(parent=self.topCont, name='combo', select=selectedCombatType, align=uiconst.TOPLEFT, left=1, callback=self.OnCombatChange, options=combatValues, idx=0, adjustWidth=True)
     self.sr.combatSetting = Checkbox(parent=self.topCont, align=uiconst.TOPLEFT, pos=(0,
      self.combatCombo.height + const.defaultPadding,
      300,
      14), configName='charsheet_condensedcombatlog', text=GetByLabel('UI/CharacterSheet/CharacterSheetWindow/KillsTabs/CondensedCombatLog'), checked=settings.user.ui.Get('charsheet_condensedcombatlog', 0), callback=self.CheckBoxChange)
     self.killReportQuickFilter = QuickFilterEdit(parent=self.topCont, left=const.defaultPadding, align=uiconst.TOPRIGHT, width=150)
     self.killReportQuickFilter.ReloadFunction = self.ReloadKillReports
     self.topCont.height = self.combatCombo.height + self.sr.combatSetting.height + const.defaultPadding
     self.btnContainer = Container(name='pageBtnContainer', parent=self, align=uiconst.TOBOTTOM, idx=0, padBottom=4)
     btn = GetBigButton(size=22, where=self.btnContainer, left=4, top=0)
     btn.SetAlign(uiconst.CENTERRIGHT)
     btn.hint = GetByLabel('UI/CharacterSheet/CharacterSheetWindow/KillsTabs/ViewMore')
     btn.sr.icon.LoadIcon('ui_23_64_2')
     btn = GetBigButton(size=22, where=self.btnContainer, left=4, top=0)
     btn.SetAlign(uiconst.CENTERLEFT)
     btn.hint = GetByLabel('UI/CharacterSheet/CharacterSheetWindow/KillsTabs/ViewPrevious')
     btn.sr.icon.LoadIcon('ui_23_64_1')
     self.btnContainer.height = max([ c.height for c in self.btnContainer.children ])
     self.scroll = Scroll(parent=self, padding=(0, 4, 0, 4))
Example #3
0
class AssetSafetyCont(Container):
    def ApplyAttributes(self, attributes):
        Container.ApplyAttributes(self, attributes)
        self.assetSafetyController = attributes.controller
        self.assetSafetyScroll = Scroll(name='assetSafetyScroll',
                                        id='assetSafetyScrollGUID',
                                        parent=self,
                                        align=uiconst.TOALL)
        self.updateCounter = None

    def Load(self):
        scrollList = GetAssetSafetyScrollContent(self.assetSafetyController)
        headers = AssetSafetyEntry.GetHeaders()
        self.assetSafetyScroll.sr.minColumnWidth = AssetSafetyEntry.GetMinimumColWidth(
        )
        self.assetSafetyScroll.sr.defaultColumnWidth = AssetSafetyEntry.GetDefaultColumnWidth(
        )
        self.assetSafetyScroll.Load(
            contentList=scrollList,
            headers=headers,
            noContentHint=GetByLabel('UI/Corporations/Assets/NoItemsFound'))
        self.updateCounter = AutoTimer(1000, self.UpdateCounters_thread)

    def UpdateCounters_thread(self):
        for eachEntry in self.assetSafetyScroll.GetNodes():
            panel = getattr(eachEntry, 'panel', None)
            if not panel or panel.destroyed:
                continue
            if isinstance(panel, AssetSafetyEntry):
                panel.UpdateProgress()

    def Close(self):
        Container.Close(self)
        self.updateCounter = None
Example #4
0
 def ApplyAttributes(self, attributes):
     super(RenderJobProfiler, self).ApplyAttributes(attributes)
     self.SetCaption('Render Job Profiler')
     self._renderJob = None
     self.SetTopparentHeight(0)
     parent = self.GetMainArea()
     parent.SetAlign(uiconst.TOALL)
     parent.padding = 5
     top = Container(parent=parent, align=uiconst.TOTOP, height=20)
     Label(text='Render Job', parent=top, align=uiconst.TOLEFT, padding=4)
     combo = Combo(parent=top,
                   options=[(rj.name, rj)
                            for rj in trinity.renderJobs.recurring],
                   callback=self._OnRenderJob,
                   align=uiconst.TOALL)
     bottom = Container(parent=parent,
                        align=uiconst.TOBOTTOM,
                        height=20,
                        padding=2)
     Button(parent=bottom,
            align=uiconst.CENTER,
            label='Copy',
            func=self._Copy,
            args=())
     self._scroll = Scroll(parent=parent, align=uiconst.TOALL, top=4)
     self._OnRenderJob(None, None, combo.selectedValue)
     uthread2.StartTasklet(self._UpdateTiming)
Example #5
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.itemID = attributes.itemID
     self.typeID = attributes.typeID
     self.nameFilter = None
     self.stateManager = sm.GetService('godma').GetStateManager()
     self.SetCaption('Attribute Inspector')
     self.SetWndIcon(None)
     self.SetTopparentHeight(0)
     main = Container(name='main',
                      parent=uiutil.GetChild(self, 'main'),
                      pos=(const.defaultPadding, const.defaultPadding,
                           const.defaultPadding, const.defaultPadding))
     top = Container(name='top',
                     parent=main,
                     height=20,
                     align=uiconst.TOTOP)
     Button(parent=top,
            label='Refresh',
            align=uiconst.TORIGHT,
            func=self.Refresh)
     self.input = SinglelineEdit(name='itemID',
                                 parent=top,
                                 width=-1,
                                 height=-1,
                                 align=uiconst.TOALL)
     self.input.readonly = not eve.session.role & ROLE_GMH
     self.input.OnReturn = self.Refresh
     self.input.SetValue(str(self.itemID))
     Container(name='div', parent=main, height=5, align=uiconst.TOTOP)
     self.scroll = Scroll(parent=main)
     self.Refresh()
Example #6
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     sm.RegisterNotify(self)
     self.ConstructTopCont()
     if not IsSkillInjectorBannerDismissed():
         SkillInjectorBanner(parent=self,
                             align=uiconst.TOTOP,
                             padding=(4, 4, 4, 4))
     self.scroll = Scroll(parent=self, padding=(0, 4, 0, 4))
     self.scroll.sr.id = 'charsheet_skills'
     self.skilltabs = TabGroup(
         name='tabparent',
         parent=self,
         idx=0,
         tabs=
         [[
             GetByLabel(
                 'UI/CharacterSheet/CharacterSheetWindow/SkillTabs/Skills'),
             self.scroll, self, PANEL_SKILLS_SKILLS
         ],
          [
              GetByLabel(
                  'UI/CharacterSheet/CharacterSheetWindow/CertTabs/Certificates'
              ), self.scroll, self, PANEL_SKILLS_CERTIFICATES
          ],
          [
              GetByLabel(
                  'UI/CharacterSheet/CharacterSheetWindow/SkillTabs/History'
              ), self.scroll, self, PANEL_SKILLS_HISTORY
          ]],
         groupID='cs_skills',
         UIIDPrefix='characterSheetTab')
Example #7
0
    def ApplyAttributes(self, attributes):
        Window.ApplyAttributes(self, attributes)
        self.SetTopparentHeight(0)
        optionsContainer = Container(parent=self.sr.main,
                                     align=uiconst.TOBOTTOM,
                                     height=24,
                                     padding=4)
        Label(parent=optionsContainer,
              text='<b>Threshold:</b>',
              align=uiconst.TOLEFT,
              padLeft=10,
              padTop=1)
        for text, value in OPTIONS:
            isChecked = blue.logInMemory.threshold == value
            Checkbox(parent=optionsContainer,
                     text=text,
                     groupname='threshold',
                     align=uiconst.TOLEFT,
                     width=100,
                     checked=isChecked,
                     callback=self.OnLogThresholdRadioButtons,
                     retval=value)

        ButtonGroup(parent=optionsContainer,
                    line=False,
                    btns=[['Copy', self.ExportLogInMemory, (), 51],
                          ['Attach', self.AttachToLogServer, (), 51],
                          ['Save', self.SaveLogsToFile, (), 51]])
        self.scroll = Scroll(parent=self.sr.main,
                             id='logviewerscroll',
                             align=uiconst.TOALL)
        self.logSaveHandle = None
        self.PopulateScroll()
        blue.pyos.SetLogEchoFunction(blue.logInMemory.threshold,
                                     self._log_echo)
Example #8
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.controller = attributes.controller
     self.ChangeSignalConnection(connect=True)
     self.addCont = AddGroupCont(parent=self, controller=self.controller)
     self.scroll = Scroll(name='groupListScroll', parent=self, padBottom=4)
     self.LoadGroups()
Example #9
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     sm.RegisterNotify(self)
     self.SetTopparentHeight(0)
     mainCont = Container(name='mainCont',
                          parent=self.sr.main,
                          padding=const.defaultPadding)
     buttonCont = Container(name='buttonCont',
                            parent=mainCont,
                            align=uiconst.TOBOTTOM,
                            height=26)
     scrollCont = Container(name='scrollCont', parent=mainCont)
     self.planetScroll = Scroll(name='planetsScroll', parent=scrollCont)
     self.planetScroll.multiSelect = False
     self.planetScroll.sr.id = 'planetscroll'
     self.planetScroll.OnSelectionChange = self.OnPlanetScrollSelectionChange
     self.planetClickID = None
     scrolllist, headers = self.GetPlanetScrollList()
     noCommandBuiltLabel = GetByLabel(
         'UI/ScienceAndIndustry/ScienceAndIndustryWindow/NoCommandCenterBuilt'
     )
     self.planetScroll.Load(contentList=scrolllist,
                            headers=headers,
                            noContentHint=noCommandBuiltLabel)
     viewPlanetLabel = GetByLabel(
         'UI/ScienceAndIndustry/ScienceAndIndustryWindow/ViewPlanet')
     buttons = ButtonGroup(btns=[[viewPlanetLabel, self.ViewPlanet, ()]],
                           parent=buttonCont,
                           idx=0)
     viewPlanetLabel = GetByLabel(
         'UI/ScienceAndIndustry/ScienceAndIndustryWindow/ViewPlanet')
     self.viewPlanetBtn = buttons.GetBtnByLabel(viewPlanetLabel)
     self.viewPlanetBtn.Disable()
Example #10
0
    def Load(self):
        self.Flush()
        fittingScroll = Scroll(name='fittingScroll',
                               parent=self,
                               padding=const.defaultPadding)
        turretSlotsUsed = 0
        launcherSlotsUsed = 0
        entryList = []
        inventory = self.GetShipContents()
        for slotKey, slotInfo in enumerate(FITTING_SLOT_INFO):
            modulesByType = collections.defaultdict(list)
            chargesByFlag = collections.defaultdict(list)
            for item in filter(lambda item: item.flagID in slotInfo['flags'],
                               inventory):
                if IsCharge(item):
                    chargesByFlag[item.flagID].append(item)
                else:
                    modulesByType[item.typeID].append(item)

            usedSlotCount = 0
            for typeID, items in modulesByType.iteritems():
                if HasEffect(typeID, slotInfo['effectID']):
                    usedSlotCount += len(items)
                if HasEffect(typeID, const.effectTurretFitted):
                    turretSlotsUsed += len(items)
                if HasEffect(typeID, const.effectLauncherFitted):
                    launcherSlotsUsed += len(items)
                lowestFlagID = min((item.flagID for item in items))
                sortKey = (slotKey, lowestFlagID)
                entry = self.GetFittingEntry(typeID, len(items))
                entryList.append((sortKey, entry))
                chargeQuantityByType = collections.defaultdict(int)
                for charge in itertools.chain.from_iterable(
                    (chargesByFlag[item.flagID] for item in items)):
                    chargeQuantityByType[charge.typeID] += max(
                        charge.quantity, 1)

                for chargeType, chargeQuantity in chargeQuantityByType.iteritems(
                ):
                    sortKey = (slotKey, lowestFlagID, chargeType)
                    entry = self.GetFittingEntry(chargeType,
                                                 chargeQuantity,
                                                 isCharge=True)
                    entryList.append((sortKey, entry))

            sortKey = (slotKey, )
            entry = self.GetFittingSlotEntry(slotInfo, usedSlotCount)
            entryList.append((sortKey, entry))

        sortedEntryList = sm.GetService('info').GetAttributeScrollListForItem(
            itemID=self.itemID,
            typeID=self.typeID,
            attrList=[
                const.attributeCpuOutput, const.attributePowerOutput,
                const.attributeUpgradeCapacity
            ])
        sortedEntryList.append(
            self.GetHardpointsEntry(turretSlotsUsed, launcherSlotsUsed))
        sortedEntryList.extend(uiutil.SortListOfTuples(entryList))
        fittingScroll.Load(contentList=filter(None, sortedEntryList))
Example #11
0
 def DrawMyShipsScroll(self, parentCont):
     self.myShipsScroll = Scroll(parent=parentCont, padding=(4, 4, 4, 0))
     self.myShipsScroll.sr.id = 'insurance'
     self.myShipsScroll.multiSelect = 0
     self.myShipsScroll.sr.minColumnWidth = {
         localization.GetByLabel('UI/Common/Type'): 30
     }
Example #12
0
 def DrawSplitList(self):
     myShipsCont = DragResizeCont(name='myShipsCont',
                                  parent=self.sr.main,
                                  align=uiconst.TOTOP_PROP,
                                  minSize=0.3,
                                  maxSize=0.7,
                                  defaultSize=0.45,
                                  padding=4)
     EveLabelLargeBold(parent=myShipsCont,
                       align=uiconst.TOTOP,
                       text=localization.GetByLabel(
                           'UI/Insurance/InsuranceWindow/MyShips'),
                       padTop=2,
                       padLeft=2)
     self.DrawMyShipsScroll(parentCont=myShipsCont)
     corpShipsCont = Container(parent=self.sr.main,
                               name='corpShipsCont',
                               align=uiconst.TOALL,
                               padLeft=4,
                               padRight=4)
     EveLabelLargeBold(parent=corpShipsCont,
                       align=uiconst.TOTOP,
                       text=localization.GetByLabel(
                           'UI/Insurance/InsuranceWindow/CorpShips'),
                       padTop=2,
                       padLeft=2)
     self.corpShipsScroll = Scroll(parent=corpShipsCont,
                                   padding=const.defaultPadding)
     self.corpShipsScroll.sr.id = 'corpinsurance'
     self.corpShipsScroll.multiSelect = 0
     self.corpShipsScroll.sr.minColumnWidth = {
         localization.GetByLabel('UI/Common/Type'): 30
     }
    def Load(self):
        self.Flush()
        toggleButtonCont = Container(name='btnGroupCont',
                                     parent=self,
                                     align=uiconst.TOTOP,
                                     height=45)
        btnGroup = ToggleButtonGroup(parent=toggleButtonCont,
                                     align=uiconst.CENTER,
                                     height=toggleButtonCont.height,
                                     width=330,
                                     padding=(10, 4, 10, 3),
                                     callback=self.LoadCertificateSkillsLevel)
        btns = ((1, 'res:/UI/Texture/icons/79_64_2.png'),
                (2, 'res:/UI/Texture/icons/79_64_3.png'),
                (3, 'res:/UI/Texture/icons/79_64_4.png'),
                (4, 'res:/UI/Texture/icons/79_64_5.png'),
                (5, 'res:/UI/Texture/icons/79_64_6.png'))
        for level, iconPath in btns:
            hint = localization.GetByLabel(
                'UI/InfoWindow/CertificateLevelButtonHint', level=level)
            btnGroup.AddButton(btnID=level,
                               iconPath=iconPath,
                               iconSize=32,
                               hint=hint)

        self.masteryTimeLabel = EveLabelMediumBold(name='masteryTimeLabel',
                                                   parent=self,
                                                   align=uiconst.TOTOP,
                                                   top=10,
                                                   left=10)
        self.scroll = Scroll(name='certSkillScroll',
                             parent=self,
                             padding=const.defaultPadding)
        cert = sm.GetService('certificates').GetCertificate(self.certificateID)
        btnGroup.SelectByID(max(1, cert.GetLevel()))
Example #14
0
    def Load(self):
        self.Flush()
        entries = []
        bpData = sm.GetService('blueprintSvc').GetBlueprintByProduct(
            self.typeID)
        if bpData and evetypes.IsPublished(bpData.blueprintTypeID):
            entries.append(
                listentry.Get(decoClass=listentry.Header,
                              data=KeyVal(label=localization.GetByLabel(
                                  'UI/Industry/Blueprint'))))
            entries.append(
                listentry.Get(decoClass=listentry.Item,
                              data=KeyVal(label=bpData.GetName(),
                                          typeID=bpData.blueprintTypeID,
                                          getIcon=1)))
        materials = cfg.invtypematerials.get(self.typeID)
        if materials:
            entries.append(
                listentry.Get(decoClass=listentry.Header,
                              data=KeyVal(label=localization.GetByLabel(
                                  'UI/Reprocessing/ReprocessedMaterials'))))
            for _, typeID, quantity in materials:
                entries.append(
                    listentry.Get(decoClass=listentry.Item,
                                  data=KeyVal(label=localization.GetByLabel(
                                      'UI/InfoWindow/TypeNameWithNumUnits',
                                      invType=typeID,
                                      qty=quantity),
                                              typeID=typeID,
                                              getIcon=1,
                                              quantity=quantity)))

        self.scroll = Scroll(parent=self, padding=const.defaultPadding)
        self.scroll.Load(contentList=entries)
    def Load(self):
        self.Flush()
        toggleButtonCont = Container(name='btnGroupCont',
                                     parent=self,
                                     align=uiconst.TOTOP,
                                     height=35)
        btnGroup = ToggleButtonGroup(parent=toggleButtonCont,
                                     align=uiconst.CENTER,
                                     height=toggleButtonCont.height,
                                     width=300,
                                     padding=(10, 4, 10, 3),
                                     callback=self.LoadRequiredForLevel)
        for level in xrange(1, 6):
            hint = localization.GetByLabel(
                'UI/InfoWindow/RequiredForLevelButtonHint',
                skillName=cfg.invtypes.Get(self.typeID).name,
                level=level)
            isDisabled = not bool(
                cfg.GetTypesRequiredBySkill(self.typeID).get(level, None))
            btnGroup.AddButton(btnID=level,
                               label=uiutil.IntToRoman(level),
                               hint=hint,
                               isDisabled=isDisabled)

        self.scroll = Scroll(name='scroll',
                             parent=self,
                             padding=const.defaultPadding)
        btnGroup.SelectFirst()
 def LoadPanel(self):
     if self.isInitialized:
         self.UpdateScroll()
         return
     self.topPanel = Container(name='topPanel',
                               parent=self,
                               align=uiconst.TOTOP,
                               height=20,
                               padding=(0, 6, 0, 6))
     self.profilaNameLabel = EveLabelLarge(text='',
                                           parent=self.topPanel,
                                           state=uiconst.UI_DISABLED,
                                           align=uiconst.TOPLEFT,
                                           top=2)
     self.scroll = Scroll(parent=self, id='MyStructuresScroll')
     self.scroll.sr.fixedColumns = StructureEntryMyCorp.GetFixedColumns()
     self.scroll.OnSelectionChange = self.OnScrollSelectionChange
     self.scroll.GetTabStops = self.GetTabStops
     self.filterEdit = QuickFilterEdit(
         name='searchField',
         parent=self.topPanel,
         hinttext=GetByLabel('UI/Inventory/Filter'),
         maxLength=64,
         align=uiconst.TORIGHT,
         OnClearFilter=self.OnFilterEditCleared,
         padRight=4)
     self.filterEdit.ReloadFunction = self.OnFilterEdit
     self.UpdateScroll()
     self.isInitialized = True
Example #17
0
    def Load(self):
        self.Flush()
        topCont = ContainerAutoSize(parent=self,
                                    align=uiconst.TOTOP,
                                    padding=(0, 2, 0, 2))
        btnGroup = ToggleButtonGroup(parent=topCont,
                                     align=uiconst.CENTER,
                                     height=38,
                                     width=248,
                                     callback=self.LoadActivity)
        for activityID in industry.ACTIVITIES:
            isDisabled = activityID not in self.bpData.activities
            color = industryUIConst.GetActivityColor(activityID)
            color = color[:3] + (0.5, )
            btnGroup.AddButton(
                activityID,
                iconPath=industryUIConst.ACTIVITY_ICONS_LARGE[activityID],
                iconSize=26,
                colorSelected=color,
                isDisabled=isDisabled,
                btnClass=ActivityToggleButtonGroupButton,
                activityID=activityID)

        self.activityNameLabel = EveLabelMediumBold(name='label',
                                                    parent=self,
                                                    align=uiconst.TOTOP,
                                                    padding=(6, 0, 0, 0))
        self.scroll = Scroll(parent=self, padding=const.defaultPadding)
        activityID = self.GetSelectedActivityID(activityID)
        btnGroup.SelectByID(activityID)
Example #18
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     mainArea = self.GetMainArea()
     mainArea.padding = 6
     self._selectedObject = None
     self.SetTopparentHeight(0)
     self._infoContainer = Container(parent=mainArea, align=uiconst.TOTOP, height=72)
     self.searchInput = SinglelineEdit(parent=self._infoContainer, align=uiconst.BOTTOMRIGHT, left=4, top=8, width=100, OnChange=self.OnSearchInputChange, hinttext='Search')
     self.searchInput.SetHistoryVisibility(False)
     self.searchInput.ShowClearButton()
     m = UtilMenu(menuAlign=uiconst.TOPRIGHT, parent=self._infoContainer, align=uiconst.TOPRIGHT, GetUtilMenu=self.SettingMenu)
     self._infoLabel = Label(parent=self._infoContainer, state=uiconst.UI_DISABLED, color=(1.0, 1.0, 1.0, 0.75), left=2)
     self.searchResultParent = ContainerAutoSize(parent=mainArea, align=uiconst.TOTOP_NOPUSH, padding=(26, -6, 4, 0), bgColor=(0.5, 0.5, 0.5, 1))
     self.attributeScroll = Scroll(parent=mainArea, align=uiconst.TOBOTTOM, name='attributeScroll')
     self.attributeScroll.height = min(self.height / 2, max(72, settings.user.ui.Get('uitree_attributeScroll_height', 200)))
     settings.user.ui.Set('uitree_attributeScroll_height', self.attributeScroll.height)
     self.divider = Divider(align=uiconst.TOBOTTOM, parent=mainArea, height=11, state=uiconst.UI_NORMAL)
     self.divider.OnChange_ = self.OnDividerMove
     self.divider.OnChangeStart_ = self.OnDividerMoveStart
     Fill(parent=self.divider, align=uiconst.CENTER, pos=(0, 0, 20, 1))
     self.scroll = Scroll(parent=mainArea, name='treeScroll')
     self._hiliteFrame = Fill(parent=uicore.desktop, align=uiconst.ABSOLUTE, color=(0, 1, 0, 0.3), idx=0, state=uiconst.UI_DISABLED)
     self._selectedFrame = Frame(parent=uicore.desktop, align=uiconst.ABSOLUTE, color=(0, 1, 0, 0.3), idx=0, state=uiconst.UI_DISABLED)
     self.ReloadUIRoots()
     uthread.new(self.UpdateInfo)
     self._keyDownCookie = uicore.uilib.RegisterForTriuiEvents([uiconst.UI_KEYDOWN], self.OnGlobalKeyDown)
Example #19
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.sr.main.clipChildren = True
     self.MakeUnMinimizable()
     self.HideHeader()
     descText = attributes.missingText
     self.faildToLoadInfo = attributes.faildToLoadInfo
     title = GetByLabel('UI/Common/Information')
     caption = EveCaptionLarge(text=title,
                               align=uiconst.CENTERLEFT,
                               parent=self.sr.topParent,
                               left=64,
                               width=270)
     self.SetTopparentHeight(max(56, caption.textheight + 16))
     self.SetWndIcon('res:/ui/Texture/WindowIcons/info.png')
     descLabel = EveLabelMedium(parent=self.sr.main,
                                text=descText,
                                align=uiconst.TOTOP,
                                padding=(11, 11, defaultPadding,
                                         defaultPadding))
     buttonGroup = ButtonGroup(parent=self.sr.main, unisize=1, idx=0)
     buyAllBtn = buttonGroup.AddButton(
         GetByLabel('UI/Market/MarketQuote/BuyAll'), self.BuyAll)
     closeBtn = buttonGroup.AddButton(GetByLabel('/Carbon/UI/Common/Close'),
                                      self.Close)
     if session.role & ROLE_GMH == ROLE_GMH:
         buttonGroup.AddButton('GM: Give all', self.GiveAllGM)
     self.typeScroll = Scroll(name='typeScroll',
                              parent=self.sr.main,
                              padding=(defaultPadding, 0, defaultPadding,
                                       0))
     self.LoadTypes(self.faildToLoadInfo)
Example #20
0
 def ApplyAttributes(self, attributes):
     self._ready = False
     self.detailsWindow = None
     Window.ApplyAttributes(self, attributes)
     self.SetTopparentHeight(8)
     self.settingsContainer = Container(parent=self.sr.main,
                                        align=uiconst.TOTOP,
                                        height=16,
                                        padding=8)
     self.filterEdit = SinglelineEdit(parent=self.settingsContainer,
                                      align=uiconst.TOLEFT,
                                      width=150,
                                      label='Filter:',
                                      OnReturn=self.PopulateScroll)
     Button(parent=self.settingsContainer,
            label='Reset',
            align=uiconst.TORIGHT,
            func=self.Reset,
            padRight=8)
     Button(parent=self.settingsContainer,
            label='Refresh',
            align=uiconst.TORIGHT,
            func=self.PopulateScroll,
            padRight=8)
     self.scroll = Scroll(parent=self.sr.main,
                          id='pythonobjectscroll',
                          align=uiconst.TOALL)
     self.Reset()
     self._ready = True
Example #21
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.assetSafetyController = attributes.controller
     self.assetSafetyScroll = Scroll(name='assetSafetyScroll',
                                     id='assetSafetyScrollGUID',
                                     parent=self,
                                     align=uiconst.TOALL)
     self.updateCounter = None
 def ApplyAttributes(self, attributes):
     self.currentGroupID = None
     self.groupMemberEntries = {}
     self.controller = attributes.controller
     self.ChangeSignalConnection(connect=True)
     Container.ApplyAttributes(self, attributes)
     self.scroll = Scroll(name='memberScroll', parent=self)
     self.scroll.sr.content.OnDropData = self.OnDropDataInScroll
Example #23
0
class AttributesPanel(Container):
    default_name = 'AttributesPanel'
    __notifyevents__ = ['OnAttribute', 'OnAttributes', 'OnRespecInfoUpdated']

    def ApplyAttributes(self, attributes):
        Container.ApplyAttributes(self, attributes)
        sm.RegisterNotify(self)
        self.scroll = Scroll(parent=self, padding=(0, 4, 0, 4))
        self.scroll.sr.id = 'charsheet_myattributes'

    def LoadPanel(self, *args):
        scrollList = sm.GetService('info').GetAttributeScrollListForItem(
            itemID=session.charid,
            typeID=const.typeCharacterAmarr,
            attrList=[
                const.attributePerception, const.attributeMemory,
                const.attributeWillpower, const.attributeIntelligence,
                const.attributeCharisma
            ])
        respecInfo = sm.GetService('skills').GetRespecInfo()
        self.respecEntry = entries.Get(
            'AttributeRespec',
            data=KeyVal(nextTimedRespec=respecInfo['nextTimedRespec'],
                        freeRespecs=respecInfo['freeRespecs']))
        scrollList.append(self.respecEntry)
        self.scroll.Load(
            fixedEntryHeight=32,
            contentList=scrollList,
            noContentHint=GetByLabel(
                'UI/CharacterSheet/CharacterSheetWindow/Attributes/NoAttributesFound'
            ))

    def UpdateInline(self, attributeID, value):
        for entry in self.scroll.GetNodes():
            if entry.attributeID == attributeID:
                entry.text = GetByLabel(
                    'UI/CharacterSheet/CharacterSheetWindow/Attributes/Points',
                    skillPoints=int(value))
                if entry.panel:
                    entry.panel.sr.text.text = entry.text
                    entry.panel.hint = entry.text.replace('<t>', '  ')

    def OnAttribute(self, attributeName, item, value):
        if not self.display:
            return
        if attributeName in ('memory', 'intelligence', 'willpower',
                             'perception', 'charisma'):
            self.UpdateInline(
                LookupConstValue('attribute%s' % attributeName.capitalize(),
                                 0), value)

    def OnAttributes(self, changes):
        for attributeName, item, value in changes:
            self.OnAttribute(attributeName, item, value)

    def OnRespecInfoUpdated(self):
        if self.display:
            self.LoadPanel()
Example #24
0
 def Load(self):
     if self.isInitialized:
         return
     self.scroll = Scroll(name='scroll',
                          parent=self,
                          padding=const.defaultPadding)
     scrolllist = self.GetScrollList(self.typeID)
     self.scroll.Load(fixedEntryHeight=27, contentList=scrolllist)
     self.isInitialized = True
Example #25
0
class SecurityStatusPanel(Container):
    default_name = 'SecurityStatusPanel'
    __notifyevents__ = []

    def ApplyAttributes(self, attributes):
        Container.ApplyAttributes(self, attributes)
        sm.RegisterNotify(self)
        self.scroll = Scroll(parent=self, padding=(0, 4, 0, 4))
        self.scroll.sr.id = 'charsheet_securitystatus'

    def LoadPanel(self, *args):
        crimewatchSvc = sm.GetService('crimewatchSvc')
        data = crimewatchSvc.GetSecurityStatusTransactions()
        self.scroll.Clear()
        scrolllist = []
        for transaction in data:
            if transaction.eventTypeID == logConst.eventSecStatusGmModification:
                subject = GetByLabel('UI/Generic/FormatStandingTransactions/subjectSetBySlashCmd')
                body = GetByLabel('UI/Generic/FormatStandingTransactions/messageResetBySlashCmd')
            elif transaction.eventTypeID == logConst.eventSecStatusGmRollback:
                subject = GetByLabel('UI/Generic/FormatStandingTransactions/subjectSetBySlashCmd')
                body = GetByLabel('UI/Generic/FormatStandingTransactions/messageResetBySlashCmd')
            elif transaction.eventTypeID == logConst.eventSecStatusIllegalAggression:
                cfg.eveowners.Prime([transaction.otherOwnerID])
                cfg.evelocations.Prime([transaction.locationID])
                subject = GetByLabel('UI/Generic/FormatStandingTransactions/subjectCombatAgression')
                body = GetByLabel('UI/Generic/FormatStandingTransactions/messageCombatAgression', locationID=transaction.locationID, ownerName=cfg.eveowners.Get(transaction.otherOwnerID).name, typeID=transaction.otherTypeID)
            elif transaction.eventTypeID == logConst.eventSecStatusKillPirateNpc:
                subject = GetByLabel('UI/Generic/FormatStandingTransactions/subjectLawEnforcmentGain')
                body = GetByLabel('UI/Generic/FormatStandingTransactions/messageLawEnforcmentGain', name=cfg.eveowners.Get(transaction.otherOwnerID).name)
            elif transaction.eventTypeID == logConst.eventSecStatusHandInTags:
                subject = GetByLabel('UI/Generic/FormatStandingTransactions/subjectHandInTags')
                body = GetByLabel('UI/Generic/FormatStandingTransactions/messageHandInTags')
            if transaction.modification is not None:
                modification = GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SecurityStatusScroll/Persentage', value=transaction.modification * 100.0, decimalPlaces=4)
            else:
                modification = ''
            text = '%s<t>%s<t><right>%s</right><t>%s' % (FmtDate(transaction.eventDate, 'ls'),
             modification,
             localization.formatters.FormatNumeric(transaction.newValue, decimalPlaces=2),
             subject)
            hint = '%s<br>%s' % (localization.formatters.FormatNumeric(transaction.newValue, decimalPlaces=4), subject)
            scrolllist.append(entries.Get('StandingTransaction', {'sort_%s' % GetByLabel('UI/Common/Date'): transaction.eventDate,
             'sort_%s' % GetByLabel('UI/Common/Change'): transaction.modification,
             'line': 1,
             'text': text,
             'hint': hint,
             'details': body,
             'isNPC': True}))

        headers = [GetByLabel('UI/Common/Date'),
         GetByLabel('UI/Common/Change'),
         GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SecurityStatus'),
         GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SecurityStatusScroll/Subject')]
        noChangesHint = GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SecurityStatusScroll/NoSecurityStatusChanges')
        self.scroll.Load(contentList=scrolllist, headers=headers, noContentHint=noChangesHint)
Example #26
0
 def ApplyAttributes(self, attributes):
     self._ready = False
     Window.ApplyAttributes(self, attributes)
     self.SetTopparentHeight(8)
     self.settingsContainer = Container(parent=self.sr.main, align=uiconst.TOTOP, height=16, padding=8)
     self.filterEdit = SinglelineEdit(parent=self.settingsContainer, align=uiconst.TOLEFT, width=150, label='Filter:')
     Button(parent=self.settingsContainer, label='Reset', align=uiconst.TORIGHT, func=self.Reset, padRight=8)
     self.scroll = Scroll(parent=self.sr.main, id='livecountscroll', align=uiconst.TOALL)
     self.Reset()
     self._ready = True
     uthread2.StartTasklet(self.Refresh)
Example #27
0
 def _AddOfficePanel(self):
     self.officesPanel = Container(name=OFFICESPANEL,
                                   parent=self.sr.main,
                                   padding=const.defaultPadding)
     self.officesButtons = FlowContainer(name='officesButtons',
                                         align=uiconst.TOTOP,
                                         parent=self.officesPanel,
                                         contentSpacing=(4, 4),
                                         centerContent=True)
     self.officesScroll = Scroll(parent=self.officesPanel,
                                 padTop=const.defaultPadding)
Example #28
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.typeID = attributes.typeID
     self.skillTimeLabel = EveLabelMediumBold(name='skillTimeLabel',
                                              parent=self,
                                              align=uiconst.TOTOP,
                                              padding=(8, 4, 0, 0))
     self.scroll = Scroll(name='scroll',
                          parent=self,
                          padding=const.defaultPadding)
     self.scroll.ignoreTabTrimming = True
    def Load(self):
        self.Flush()
        self.scroll = Scroll(name='sovScroll',
                             parent=self,
                             padding=const.defaultPadding)
        systemsList = []
        for solarSystemID in self.mapSvc.GetLocationChildren(
                self.constellationID):
            systemsList.extend(self.GetSolarSystemInfo(solarSystemID))

        self.scroll.Load(contentList=systemsList)
Example #30
0
 def _AddAgentPanel(self):
     self.agentsPanel = Container(name=AGENTSPANEL,
                                  parent=self.sr.main,
                                  padding=const.defaultPadding)
     self.agentFinderBtn = Button(
         label=GetByLabel('UI/AgentFinder/AgentFinder'),
         parent=self.agentsPanel,
         align=uiconst.CENTERTOP,
         func=uicore.cmd.OpenAgentFinder)
     self.agentScroll = Scroll(parent=self.agentsPanel,
                               padTop=const.defaultPadding +
                               self.agentFinderBtn.height)
Example #31
0
 def __init__(self, materialData, callback, tooltipPanel):
     tooltipPanel.margin = 8
     self.materialData = materialData
     self.callback = callback
     self.tooltipPanel = tooltipPanel
     if materialData.IsSelectable():
         text = localization.GetByLabel('UI/Industry/SelectInputMaterial')
     else:
         text = localization.GetByLabel('UI/Industry/SelectOptionalMaterial')
     label = EveLabelMedium(align=uiconst.TOTOP, text=text, padBottom=3)
     tooltipPanel.AddCell(label)
     scroll = Scroll(align=uiconst.TOPLEFT, width=250)
     scroll.OnSelectionChange = self.OnScrollSelectionChange
     scrollList = self.GetScrollContent()
     scroll.Load(contentList=scrollList)
     scroll.ScrollToSelectedNode()
     scroll.height = min(len(scrollList) * 29 + 2, 200)
     scroll.Confirm = self.Confirm
     tooltipPanel.AddCell(scroll)
 def __init__(self, jobData, tooltipPanel):
     self.jobData = jobData
     self.tooltipPanel = tooltipPanel
     tooltipPanel.state = uiconst.UI_NORMAL
     tooltipPanel.margin = MARGIN
     tooltipPanel.columns = 2
     if self.jobData.IsProductSelectable() and not self.jobData.IsInstalled():
         AddDescriptionRow(self.tooltipPanel, GetByLabel('UI/Industry/SelectOutcome'))
         scroll = Scroll(align=uiconst.TOPLEFT, width=250)
         scroll.OnSelectionChange = self.OnScrollSelectionChange
         scrollList = self.GetScrollContent()
         scroll.Load(contentList=scrollList)
         scroll.ScrollToSelectedNode()
         scroll.height = min(len(scrollList) * 29 + 2, 200)
         scroll.Confirm = self.Confirm
         self.tooltipPanel.AddCell(scroll, colSpan=3, cellPadding=PADBOTTOM)
     else:
         AddOutcomeRow(self.tooltipPanel, self.jobData.product)
         price = self.jobData.product.GetEstimatedUnitPrice() * self.jobData.product.quantity
         AddPriceRow(self.tooltipPanel, price)