예제 #1
0
 def ApplyAttributes(self, attributes):
     ProbeTooltipButtonBase.ApplyAttributes(self, attributes)
     self.checkBox = Checkbox(groupname=attributes.groupName,
                              align=uiconst.CENTER,
                              checked=attributes.checked,
                              retval=attributes.retval,
                              wrapLabel=True,
                              prefstype=None,
                              width=16,
                              height=16,
                              state=uiconst.UI_DISABLED)
     self.AddCell(self.checkBox, cellPadding=(5, 1, 4, 1))
     self.deleteFunction = attributes.deleteFunc
     self.editFunction = attributes.editFunc
     self.label = EveLabelSmall(text=attributes.text,
                                bold=True,
                                align=uiconst.CENTERLEFT,
                                autoFitToText=True,
                                width=128)
     self.AddCell(self.label,
                  colSpan=1 if attributes.filterIndex is not None else 2,
                  cellPadding=(0, 2, 6, 2))
     if attributes.filterIndex is not None:
         shortcutObj = ShortcutHint(text=str(attributes.filterIndex))
         self.AddCell(shortcutObj, cellPadding=(2, 2, 2, 0))
         return shortcutObj
 def AddCheckbox(self, cbName, parent, groupname=None):
     setting = Bunch(settings.user.ui.Get('assetRenderState', {}))
     cb = Checkbox(parent=parent,
                   text=cbName,
                   checked=bool(setting.Get(cbName, None)),
                   callback=self.CBChange,
                   groupname=groupname)
     cb.name = cbName
     return cb
예제 #3
0
 def AddColCheckBox(self, columnName, subColumns):
     col = self.AddColumnContainer(width=CHECKBOX_COL_WIDTH, padRight=0)
     isDirector = any([ role.roleID == const.corpRoleDirector for subColumnName, role in subColumns ])
     if isDirector:
         checkbox = Checkbox(parent=col, align=uiconst.CENTER, checkedTexture='res:/UI/Texture/Shared/checkboxHalfChecked.png')
     else:
         checkbox = TriCheckbox(parent=col, align=uiconst.CENTER, pos=(-2, 0, 16, 16))
     checkbox.LoadTooltipPanel = self.LoadCBTooltip
     self.SetCheckboxAttributes(checkbox, subColumns)
     self.checkboxes.append(checkbox)
 def AddColCheckBox(self, columnName, subColumns):
     col = self.AddColumnContainer(width=CHECKBOX_COL_WIDTH, padRight=0)
     isDirector = any([ role.roleID == const.corpRoleDirector for subColumnName, role in subColumns ])
     if isDirector:
         checkbox = Checkbox(parent=col, align=uiconst.CENTER, checkedTexture='res:/UI/Texture/Shared/checkboxHalfChecked.png')
     else:
         checkbox = TriCheckbox(parent=col, align=uiconst.CENTER, pos=(-2, 0, 16, 16))
     checkbox.LoadTooltipPanel = self.LoadCBTooltip
     self.SetCheckboxAttributes(checkbox, subColumns)
     self.checkboxes.append(checkbox)
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.title = attributes.title
     self.channelID = attributes.channelID
     self.channelName = attributes.channelName
     self.displayName = attributes.displayName
     self.SetMinSize([250, 250])
     self.SetCaption(localization.GetByLabel('UI/Menusvc/PasswordRequired'))
     self.SetTopparentHeight(0)
     self.tries = 0
     settings.user.ui.Set('%sPassword' % self.channelName, '')
     parentGrid = LayoutGrid(parent=self.sr.main,
                             columns=1,
                             state=uiconst.UI_PICKCHILDREN,
                             align=uiconst.TOPLEFT,
                             left=10,
                             top=4)
     topLabel = EveLabelMedium(text=attributes.title,
                               state=uiconst.UI_DISABLED,
                               align=uiconst.TOPLEFT,
                               width=300)
     parentGrid.AddCell(cellObject=topLabel)
     passwordLabel = localization.GetByLabel(
         'UI/Menusvc/PleaseEnterPassword')
     self.passwordLabel = EveLabelMedium(text=passwordLabel,
                                         state=uiconst.UI_DISABLED,
                                         align=uiconst.TOPLEFT,
                                         padTop=10)
     parentGrid.AddCell(cellObject=self.passwordLabel)
     self.passwordEdit = SinglelineEdit(name='passwordEdit',
                                        align=uiconst.TOTOP,
                                        passwordCharacter=u'\u2022',
                                        top=4)
     parentGrid.AddCell(cellObject=self.passwordEdit)
     savePasswordLabel = localization.GetByLabel('UI/Chat/SavePassword')
     self.rememberPwdCb = Checkbox(text=savePasswordLabel,
                                   configName='rememberPwdCb',
                                   retval=1,
                                   checked=0,
                                   groupname=None,
                                   align=uiconst.TOTOP)
     parentGrid.AddCell(cellObject=self.rememberPwdCb)
     parentGrid.RefreshGridLayout()
     self.btnGroup = ButtonGroup(parent=self.sr.main, idx=0)
     self.btnGroup.AddButton(
         localization.GetByLabel('UI/Chat/ChannelWindow/JoinChannel'),
         self.TryPassword, ())
     self.btnGroup.AddButton(localization.GetByLabel('UI/Common/Cancel'),
                             self.Close, ())
     self.height = self.btnGroup.height + parentGrid.height + self.sr.headerParent.height + parentGrid.top + 10
     self.width = parentGrid.width + 2 * parentGrid.left
     self.MakeUnResizeable()
     self.MakeUnMinimizable()
     self.MakeUncollapseable()
예제 #6
0
 def ApplyAttributes(self, attributes):
     SettingSectionHeaderBase.ApplyAttributes(self, attributes)
     self.sgController = attributes.sgController
     checked = bool(self.sgController.GetValue())
     left = SECTION_LABEL_LEFT - 20 - 2
     self.checkbox = Checkbox(parent=self,
                              align=uiconst.CENTERLEFT,
                              text='',
                              checked=checked,
                              callback=self.CheckBoxChange,
                              pos=(4, 0, 0, 20))
 def _SetupPopupArea(self):
     self.popupSettingsContainer = ContainerAutoSize(name='PopupSettings', align=uiconst.TOTOP, parent=self.rightContainer, padding=(self.basePadLeft,
      5,
      10,
      0))
     EveLabelMediumBold(name='PopupHeader', align=uiconst.TOTOP, parent=self.popupSettingsContainer, text=localization.GetByLabel('Notifications/NotificationSettings/PopupsHeader'))
     self._MakeSeperationLine(self.popupSettingsContainer)
     Checkbox(name='UsepopupNotifications', text=localization.GetByLabel('Notifications/NotificationSettings/UsePopupNotifications'), parent=self.popupSettingsContainer, align=uiconst.TOTOP, checked=self.notificationSettingHandler.GetPopupsEnabled(), callback=self.OnShowPopupNotificationToggle)
     if self.dev_soundSettingsEnabled:
         Checkbox(name='Play sound checkbox', text=localization.GetByLabel('Notifications/NotificationSettings/PlaySound'), parent=self.popupSettingsContainer, align=uiconst.TOTOP, checked=self.notificationSettingHandler.GetNotificationSoundEnabled(), callback=self.OnPlaySoundToggle)
     self.MakeSliderTextRow(label=localization.GetByLabel('Notifications/NotificationSettings/FadeDelay'), minValue=0, maxValue=10.0, startValue=self.notificationSettingHandler.GetFadeTime(), stepping=0.5, endSliderFunc=self.OnFadeDelaySet)
     self.MakeSliderTextRow(label=localization.GetByLabel('Notifications/NotificationSettings/StackSize'), minValue=1, maxValue=10, startValue=self.notificationSettingHandler.GetStackSize(), stepping=1, endSliderFunc=self.OnStackSizeSet)
 def DrawCheckboxes(self):
     for typeConst in ACCESS_TYPES:
         c = Container(parent=self.myGridCont,
                       padding=1,
                       state=uiconst.UI_NORMAL)
         cbName = 'cb_%i' % typeConst
         cb = Checkbox(name=cbName,
                       parent=c,
                       checked=False,
                       align=uiconst.CENTER)
         cb.sr.diode.left = 3
         cb.LoadTooltipPanel = self.LoadCBTooltip
         self.checkBoxes.append(cb)
예제 #9
0
 def ApplyAttributes(self, attributes):
     BaseListEntryCustomColumns.ApplyAttributes(self, attributes)
     self.AddColumnText('    ' + attributes.node.label)
     self.node = attributes.node
     visibilityChecked = self.node.get(self.VISIBILITY_CHECKED_KEY)
     popupChecked = self.node.get(self.POPUP_CHECKED_KEY)
     self.visibilityCallBack = self.node.get(self.VISIBILITY_CHANGED_CALLBACK_KEY)
     self.popupChangedCallback = self.node.get(self.POPUP_CHANGED_CALLBACK_KEY)
     self.getMenuCallBack = self.node.get(self.GETMENU_CALLBACK)
     visibiltyColumn = self.AddColumnContainer()
     self.visibilityCheckbox = Checkbox(name='visibiltyCheckbox', parent=visibiltyColumn, text='', checked=visibilityChecked, callback=self.OnVisibiltyCheckbox)
     containerColumn = self.AddColumnContainer()
     self.popupCheckBox = Checkbox(name='showPopupCheckBox', parent=containerColumn, text='', checked=popupChecked, callback=self.OnPopupChangedCheckbox)
예제 #10
0
 def ApplyAttributes(self, attributes):
     TreeViewEntry.ApplyAttributes(self, attributes)
     if hasattr(self.data, 'settings'):
         self.settings = self.data.settings
         if self.settings:
             self.GetMenuCallback = self.settings[NotificationSettingEntityDeco.GETMENU_CALLBACK]
             visibilityChecked = self.settings[NotificationSettingEntityDeco.VISIBILITY_CHECKED_KEY]
             showPopupChecked = self.settings[NotificationSettingEntityDeco.POPUP_CHECKED_KEY]
             self.visibilityCallBack = self.settings[NotificationSettingEntityDeco.VISIBILITY_CHANGED_CALLBACK_KEY]
             self.showPopupCallBack = self.settings[NotificationSettingEntityDeco.POPUP_CHANGED_CALLBACK_KEY]
             self.popupCheckBox = Checkbox(name='UsepopupNotifications', text='', parent=self.topRightCont, align=uiconst.TORIGHT, checked=showPopupChecked, callback=self.OnPopupNotificationToggle, hint=localization.GetByLabel('Notifications/NotificationSettings/PopupVisibilityCheckboxTooltip'))
             self.visibilityChckbox = Checkbox(name='visibilityNotification', text='', parent=self.topRightCont, align=uiconst.TORIGHT, checked=visibilityChecked, callback=self.OnVisibiltyToggle, hint=localization.GetByLabel('Notifications/NotificationSettings/HistoryVisibilityCheckboxTooltip'))
             self.isGroup = self.settings['isGroup']
             self.id = self.settings['id']
예제 #11
0
 def MakeRigCbUI(self):
     checked = settings.user.ui.Get('fitting_rigCB', True)
     text = GetByLabel('UI/Fitting/FittingWindow/FittingManagement/FitRigs')
     self.rigCB = Checkbox(name='rigCB',
                           text=text,
                           OnChange=self.OnCbChanged,
                           left=LEFT_EDGE,
                           checked=checked,
                           prefstype=('user', 'ui'),
                           configName='fitting_rigCB')
     self.rigCB.hint = GetByLabel(
         'UI/Fitting/FittingWindow/FittingManagement/FitRigsHint')
     self.layoutGrid.AddCell(cellObject=self.rigCB,
                             colSpan=self.layoutGrid.columns)
예제 #12
0
    def LoadTooltipPanel(self, tooltipPanel, *args):
        if uicore.uilib.leftbtn:
            return
        tooltipPanel.columns = 2
        tooltipPanel.AddLabelSmall(
            text=localization.GetByLabel('UI/Map/Layout'),
            bold=True,
            cellPadding=(8, 4, 4, 2),
            colSpan=tooltipPanel.columns)
        for settingsGroupKey in self.settingGroupKeys:
            if len(tooltipPanel.children):
                divider = LineThemeColored(align=uiconst.TOTOP,
                                           height=1,
                                           padding=(1, 1, 1, 0),
                                           opacity=0.3)
                tooltipPanel.AddCell(cellObject=divider,
                                     colSpan=tooltipPanel.columns)
            if settingsGroupKey in MV_GROUPS_BY_ID:
                for settingsID in MV_GROUPS_BY_ID[settingsGroupKey]:
                    checked = settingsID == GetMapViewSetting(
                        settingsGroupKey, self.mapViewID)
                    checkBox = Checkbox(align=uiconst.TOPLEFT,
                                        text=LABEL_MAP_BY_ID[settingsID],
                                        groupname=settingsGroupKey,
                                        checked=checked,
                                        wrapLabel=False,
                                        callback=self.OnCheckBoxChange,
                                        configName=settingsGroupKey,
                                        retval=settingsID,
                                        prefstype=None)
                    tooltipPanel.AddCell(cellObject=checkBox,
                                         colSpan=tooltipPanel.columns,
                                         cellPadding=(5, 0, 5, 0))

            else:
                checked = bool(
                    GetMapViewSetting(settingsGroupKey, self.mapViewID))
                checkBox = Checkbox(align=uiconst.TOPLEFT,
                                    text=LABEL_MAP_BY_ID[settingsGroupKey],
                                    checked=checked,
                                    wrapLabel=False,
                                    callback=self.OnCheckBoxChange,
                                    configName=settingsGroupKey,
                                    prefstype=None)
                tooltipPanel.AddCell(cellObject=checkBox,
                                     colSpan=tooltipPanel.columns,
                                     cellPadding=(5, 0, 5, 0))

        tooltipPanel.state = uiconst.UI_NORMAL
예제 #13
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     settingCont = Container(parent=self.sr.main, name='settingCont', align=uiconst.TOTOP, height=60)
     isCharacterListening = sm.RemoteSvc('achievementTrackerMgr').IsCharacterIsListening(session.charid)
     if isCharacterListening:
         text = 'This character is listening for broadcasted opportunity changes'
     else:
         text = 'This character is <color=red><b>NOT</b></color> listening for broadcasted opportunity changes'
     listendingLabel = EveLabelMedium(parent=settingCont, name='listendingLabel', text=text, align=uiconst.TOTOP, padLeft=10)
     showOpportunities = settings.user.ui.Get('opportunities_showTemp', False)
     cb = Checkbox(text='Show in info panel', parent=settingCont, configName='opportunities_showTemp', checked=showOpportunities, callback=self.CheckBoxChange, prefstype=('user', 'ui'), align=uiconst.TOTOP, padding=(9, 4, 0, 0))
     self.mainContainer = AchievementMainContainer(align=uiconst.TOALL, parent=self.sr.main)
     self.conditionsCont = ConditionsContainer(align=uiconst.TOALL, parent=self.sr.main)
     self.groupCont = GroupContainer(align=uiconst.TOALL, parent=self.sr.main)
     tabs = [['Achievements',
       None,
       self,
       'achievements',
       self.mainContainer], ['Conditions',
       None,
       self,
       'conditions',
       self.conditionsCont], ['AchievementGroup',
       None,
       self,
       'groups',
       self.groupCont]]
     maintabs = TabGroup(name='tabparent', align=uiconst.TOTOP, height=18, parent=self.sr.main, idx=1, tabs=tabs, groupID='achievements', autoselecttab=True)
     self.initData()
예제 #14
0
class NotificationSettingEntityDeco(BaseListEntryCustomColumns):
    default_name = 'NotificationSettingEntry'
    VISIBILITY_CHECKED_KEY = 'visibilityChecked'
    VISIBILITY_CHANGED_CALLBACK_KEY = 'onVisibilityChanged'
    POPUP_CHECKED_KEY = 'popupChecked'
    POPUP_CHANGED_CALLBACK_KEY = 'onPopupChanged'
    GETMENU_CALLBACK = 'menuCallBack'

    def ApplyAttributes(self, attributes):
        BaseListEntryCustomColumns.ApplyAttributes(self, attributes)
        self.AddColumnText('    ' + attributes.node.label)
        self.node = attributes.node
        visibilityChecked = self.node.get(self.VISIBILITY_CHECKED_KEY)
        popupChecked = self.node.get(self.POPUP_CHECKED_KEY)
        self.visibilityCallBack = self.node.get(self.VISIBILITY_CHANGED_CALLBACK_KEY)
        self.popupChangedCallback = self.node.get(self.POPUP_CHANGED_CALLBACK_KEY)
        self.getMenuCallBack = self.node.get(self.GETMENU_CALLBACK)
        visibiltyColumn = self.AddColumnContainer()
        self.visibilityCheckbox = Checkbox(name='visibiltyCheckbox', parent=visibiltyColumn, text='', checked=visibilityChecked, callback=self.OnVisibiltyCheckbox)
        containerColumn = self.AddColumnContainer()
        self.popupCheckBox = Checkbox(name='showPopupCheckBox', parent=containerColumn, text='', checked=popupChecked, callback=self.OnPopupChangedCheckbox)

    def forceSetPopupState(self, status):
        if not self.destroyed:
            self.popupCheckBox.SetChecked(status, report=False)

    def OnPopupChangedCheckbox(self, *args):
        self.popupChangedCallback(self.node)

    def OnVisibiltyCheckbox(self, *args):
        self.visibilityCallBack(self.node)

    def GetMenu(self):
        return self.getMenuCallBack(self.node)
예제 #15
0
    def LoadDScanTooltipPanel(self, tooltipPanel, *args):
        if uicore.uilib.leftbtn:
            return
        tooltipPanel.columns = 2
        tooltipPanel.AddLabelSmall(text=localization.GetByLabel(
            'UI/Inflight/Scanner/DirectionalScan'),
                                   bold=True,
                                   cellPadding=(8, 4, 4, 2),
                                   colSpan=tooltipPanel.columns)
        divider = LineThemeColored(align=uiconst.TOTOP,
                                   state=uiconst.UI_DISABLED,
                                   height=1,
                                   padding=(1, 1, 1, 0),
                                   opacity=0.3)
        tooltipPanel.AddCell(divider,
                             cellPadding=(0, 0, 0, 2),
                             colSpan=tooltipPanel.columns)
        for optionName, optionID, checked in (
            (localization.GetByLabel('UI/Inflight/Scanner/ShowScanCone'),
             'showScanCone', GetScanConeDisplayState() == True),
            (localization.GetByLabel('UI/Inflight/Scanner/AlignWithCamera'),
             'cameraAligned', GetActiveScanMode() == SCANMODE_CAMERA)):
            checkBox = Checkbox(align=uiconst.TOPLEFT,
                                text=optionName,
                                checked=checked,
                                wrapLabel=False,
                                callback=self.OnSettingButtonCheckBoxChange,
                                retval=optionID,
                                prefstype=None)
            tooltipPanel.AddCell(cellObject=checkBox,
                                 colSpan=tooltipPanel.columns,
                                 cellPadding=(5, 0, 5, 0))

        tooltipPanel.AddSpacer(width=2, height=2, colSpan=tooltipPanel.columns)
        tooltipPanel.state = uiconst.UI_NORMAL
예제 #16
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)
예제 #17
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))
예제 #18
0
class TreeViewSettingsItem(TreeViewEntry):
    default_name = 'TreeViewEntrySettings'

    def ApplyAttributes(self, attributes):
        TreeViewEntry.ApplyAttributes(self, attributes)
        if hasattr(self.data, 'settings'):
            self.settings = self.data.settings
            if self.settings:
                self.GetMenuCallback = self.settings[NotificationSettingEntityDeco.GETMENU_CALLBACK]
                visibilityChecked = self.settings[NotificationSettingEntityDeco.VISIBILITY_CHECKED_KEY]
                showPopupChecked = self.settings[NotificationSettingEntityDeco.POPUP_CHECKED_KEY]
                self.visibilityCallBack = self.settings[NotificationSettingEntityDeco.VISIBILITY_CHANGED_CALLBACK_KEY]
                self.showPopupCallBack = self.settings[NotificationSettingEntityDeco.POPUP_CHANGED_CALLBACK_KEY]
                self.popupCheckBox = Checkbox(name='UsepopupNotifications', text='', parent=self.topRightCont, align=uiconst.TORIGHT, checked=showPopupChecked, callback=self.OnPopupNotificationToggle, hint=localization.GetByLabel('Notifications/NotificationSettings/PopupVisibilityCheckboxTooltip'))
                self.visibilityChckbox = Checkbox(name='visibilityNotification', text='', parent=self.topRightCont, align=uiconst.TORIGHT, checked=visibilityChecked, callback=self.OnVisibiltyToggle, hint=localization.GetByLabel('Notifications/NotificationSettings/HistoryVisibilityCheckboxTooltip'))
                self.isGroup = self.settings['isGroup']
                self.id = self.settings['id']

    def OnPopupNotificationToggle(self, checkbox):
        if self.isGroup:
            for child in self.childCont.children:
                child.UpdatePopupCheckBox(checkbox._checked, report=True)

        self.showPopupCallBack(self.isGroup, self.id, checkbox._checked)

    def OnVisibiltyToggle(self, checkbox):
        if self.isGroup:
            for child in self.childCont.children:
                child.UpdateVisibilitySetting(checkbox._checked, report=True)

        self.visibilityCallBack(self.isGroup, self.id, checkbox._checked)

    def OnOneClick(self, *args):
        print 'click'

    def GetMenu(self):
        return self.GetMenuCallback(self.isGroup, self.id)

    def GetTreeViewEntryClassByTreeData(self, treeData):
        return TreeViewSettingsItem

    def UpdateVisibilitySetting(self, on, report = False):
        self.visibilityChckbox.SetChecked(onoff=on, report=report)

    def UpdatePopupCheckBox(self, on, report = False):
        self.popupCheckBox.SetChecked(onoff=on, report=report)
예제 #19
0
 def CreateShipSelector(self):
     cont = Container(parent=self.sr.main,
                      name='ship_options',
                      align=uiconst.TOTOP,
                      height=20)
     self.spawnShipCheckbox = Checkbox(parent=cont,
                                       align=uiconst.TOLEFT,
                                       text='Spawn new ship',
                                       checked=False,
                                       padLeft=8,
                                       callback=self.OnChangeSpawnShip,
                                       width=150)
     Container(parent=cont, width=16, align=uiconst.TOLEFT)
     EveLabelSmall(parent=cont, text='DNA', align=uiconst.TOLEFT, padding=4)
     self.dnaEdit = SinglelineEdit(parent=cont,
                                   setvalue='DNA:593:2528:20197',
                                   align=uiconst.TOLEFT,
                                   width=200)
예제 #20
0
 def DrawCheckBox(self, corpAcctName):
     useCorpWallet = settings.user.ui.Get('sellUseCorp', False)
     self.useCorp = Checkbox(text=GetByLabel(
         'UI/Market/MarketQuote/UseCorpAccount', accountName=corpAcctName),
                             parent=self.bottomLeft,
                             configName='usecorp',
                             checked=useCorpWallet,
                             callback=self.OnUseCorp,
                             top=28)
 def _SetupUIArea(self):
     self.UISettingsContainer = ContainerAutoSize(name='HistorySettings', align=uiconst.TOTOP, parent=self.rightContainer, alignMode=uiconst.TOTOP, padLeft=self.basePadLeft)
     EveLabelMediumBold(name='UI', align=uiconst.TOTOP, parent=self.UISettingsContainer, text=localization.GetByLabel('Notifications/NotificationSettings/UISettingHeader'))
     self._MakeSeperationLine(self.UISettingsContainer)
     if self.dev_simpleHistoryDisplayEnabled:
         Checkbox(name='simple history view', text=localization.GetByLabel('Notifications/NotificationSettings/SimpleHistoryDisplay'), parent=self.UISettingsContainer, align=uiconst.TOTOP, checked=True)
     hComboRowContainer = Container(name='ComboBoxRow', parent=self.UISettingsContainer, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, height=40, padRight=10)
     from eve.client.script.ui.control.eveCombo import Combo
     Combo(name='H-ExpandCombo', parent=hComboRowContainer, labelleft=120, label=localization.GetByLabel('Notifications/NotificationSettings/DefaultHExpand'), hint=localization.GetByLabel('Notifications/NotificationSettings/DefaultHExpandToolTip'), options=self.GetHorizontalComboOptions(), align=uiconst.TOTOP, width=self.rightContainer.width, callback=self.OnHorizontalComboSelect, select=self.notificationSettingHandler.GetHorizontalExpandAlignment())
     Combo(name='V-ExpandCombo', parent=hComboRowContainer, labelleft=120, label=localization.GetByLabel('Notifications/NotificationSettings/DefaultVExpand'), hint=localization.GetByLabel('Notifications/NotificationSettings/DefaultVExpandToolTip'), align=uiconst.TOTOP, options=self.GetVerticalComboOptions(), width=self.rightContainer.width, callback=self.OnVerticalComboSelect, select=self.notificationSettingHandler.GetVerticalExpandAlignment())
예제 #22
0
    def CreateSystemPass(self, passNumber):
        def GetLocationsMenu(menuParent):
            passConfig = GetPassConfig()[passNumber]
            menuParent.AddHeader(text='Locations to visit')
            for groupId in (const.groupAsteroidBelt, const.groupStargate,
                            const.groupStation):
                menuParent.AddCheckBox(
                    text=cfg.invgroups.Get(groupId).groupName,
                    checked=groupId in passConfig['locations'],
                    callback=(ToggleLocationGroupForPass, passNumber, groupId))

            menuParent.AddDivider()
            menuParent.AddHeader(text='Actions')
            menuParent.AddCheckBox(text='Nuke location',
                                   checked=passConfig['nuke'],
                                   callback=(ToggleNuke, passNumber))

        passConfig = {
            'locations': {const.groupAsteroidBelt},
            'nuke': False,
            'enabled': passNumber == 1,
            'minTime': 1
        }
        GetPassConfig()[passNumber] = passConfig
        menuCont = Container(name='pass%d' % passNumber,
                             parent=self.sr.main,
                             align=uiconst.TOTOP,
                             height=20,
                             padLeft=4)
        cont = Container(parent=menuCont, width=100, align=uiconst.TOLEFT)
        Checkbox(parent=cont,
                 text='Enable Pass %s' % passNumber,
                 align=uiconst.CENTERLEFT,
                 checked=passConfig['enabled'],
                 callback=lambda checkbox: SetPass(checkbox, passNumber),
                 width=200)
        cont = Container(parent=menuCont, width=100, align=uiconst.TOLEFT)
        EveLabelSmall(parent=cont,
                      text='Min time (sec)',
                      align=uiconst.CENTERRIGHT,
                      left=4)
        SinglelineEdit(
            parent=menuCont,
            ints=(1, 999),
            OnChange=lambda textValue: SetPassMinTime(textValue, passNumber),
            setvalue=passConfig['minTime'],
            align=uiconst.TOLEFT,
            width=50)
        UtilMenu(menuAlign=uiconst.TOPRIGHT,
                 parent=menuCont,
                 align=uiconst.TOLEFT,
                 GetUtilMenu=GetLocationsMenu,
                 label='Options',
                 texturePath='res:/UI/Texture/Icons/38_16_229.png',
                 closeTexturePath='res:/UI/Texture/Icons/38_16_230.png')
예제 #23
0
 def _SetupTestCasePanel(self, mainCont):
     cont = Container(name='cont',
                      parent=mainCont,
                      align=uiconst.TOTOP,
                      padLeft=4,
                      padRight=4,
                      height=40)
     self.testCombo = Combo(parent=cont,
                            align=uiconst.TOTOP,
                            options=self.testOptions,
                            callback=self.TestComboChanged)
     self.testCombo.SetHint(self.testCaseDescription[1])
     buttonBox = Container(name='buttonBox',
                           parent=cont,
                           align=uiconst.TOTOP,
                           padTop=3,
                           height=20)
     self.stayHereCheckbox = Checkbox(parent=buttonBox,
                                      text=u'Stay where you are',
                                      align=uiconst.TOLEFT,
                                      checked=False,
                                      height=18,
                                      width=120)
     Button(parent=buttonBox,
            label='Spawn',
            align=uiconst.TORIGHT,
            func=self.SpawnTestcase,
            width=40,
            height=18)
     Button(parent=buttonBox,
            label='Clear',
            align=uiconst.TORIGHT,
            func=self.sceneDirector.ClearAll,
            width=40,
            height=18)
     Button(parent=buttonBox,
            label='Damage',
            align=uiconst.TORIGHT,
            func=self.sceneDirector.ApplyDamage,
            width=40,
            height=18,
            hint='Wait for ships to load before calling this')
예제 #24
0
 def DrawCheckBox(self, corpAcctName):
     useCorpWallet = settings.user.ui.Get(self.tradeForCorpSettingConfig,
                                          False)
     top = self.corpCheckboxTop
     self.useCorp = Checkbox(text=GetByLabel(
         'UI/Market/MarketQuote/UseCorpAccount', accountName=corpAcctName),
                             parent=self.bottomLeft,
                             configName='usecorp',
                             checked=useCorpWallet,
                             callback=self.OnUseCorp,
                             pos=(0, top, 350, 0),
                             align=uiconst.TOPLEFT)
예제 #25
0
    def LoadTooltipPanel(self, tooltipPanel, *args):
        if uicore.uilib.leftbtn:
            return
        tooltipPanel.columns = 2
        tooltipPanel.margin = 2
        for settingsGroupKey in self.settingGroupKeys:
            if len(tooltipPanel.children):
                divider = LineThemeColored(align=uiconst.TOTOP, height=1)
                tooltipPanel.AddCell(cellObject=divider,
                                     colSpan=tooltipPanel.columns)
            if settingsGroupKey in MV_GROUPS_BY_ID:
                for settingsID in MV_GROUPS_BY_ID[settingsGroupKey]:
                    checked = settingsID == GetMapViewSetting(settingsGroupKey)
                    checkBox = Checkbox(align=uiconst.TOPLEFT,
                                        text=LABEL_MAP_BY_ID[settingsID],
                                        groupname=settingsGroupKey,
                                        checked=checked,
                                        wrapLabel=False,
                                        callback=self.OnCheckBoxChange,
                                        configName=settingsGroupKey,
                                        retval=settingsID)
                    tooltipPanel.AddCell(cellObject=checkBox,
                                         colSpan=tooltipPanel.columns,
                                         cellPadding=(3, 0, 3, 0))

            else:
                checked = bool(GetMapViewSetting(settingsGroupKey))
                checkBox = Checkbox(align=uiconst.TOPLEFT,
                                    text=LABEL_MAP_BY_ID[settingsGroupKey],
                                    checked=checked,
                                    wrapLabel=False,
                                    callback=self.OnCheckBoxChange,
                                    configName=settingsGroupKey)
                tooltipPanel.AddCell(cellObject=checkBox,
                                     colSpan=tooltipPanel.columns,
                                     cellPadding=(3, 0, 3, 0))

        tooltipPanel.state = uiconst.UI_NORMAL
예제 #26
0
 def Startup(self, *args):
     self.label = EveLabelSmall(parent=self,
                                state=uiconst.UI_DISABLED,
                                align=uiconst.TOPLEFT,
                                left=self.TEXTLEFT,
                                top=self.TEXTTOPBOTTOM)
     cbox = Checkbox(align=uiconst.TOPLEFT,
                     state=uiconst.UI_DISABLED,
                     parent=self,
                     idx=0)
     cbox.left = 4
     cbox.top = 1
     cbox.width = 16
     cbox.height = 16
     cbox.data = {}
     cbox.OnChange = self.CheckBoxChange
     self.checkbox = cbox
예제 #27
0
 def ApplyAttributes(self, attributes):
     self._ready = False
     Window.ApplyAttributes(self, attributes)
     self.SetTopparentHeight(8)
     top = Container(parent=self.sr.main,
                     align=uiconst.TOTOP,
                     height=128,
                     padding=8)
     self.loadObjectCacheEnabledChk = Checkbox(
         parent=top,
         align=uiconst.TOTOP,
         text='Load Object Cache Enabled',
         width=120,
         checked=blue.resMan.loadObjectCacheEnabled,
         callback=self._OnLoadObjectCacheEnabledChk)
     self.attributes = Scroll(parent=top, align=uiconst.TOALL)
     bottom = LayoutGrid(parent=self.sr.main,
                         align=uiconst.TOBOTTOM,
                         height=100,
                         columns=4,
                         cellPadding=5)
     self.filterEdit = SinglelineEdit(parent=bottom,
                                      width=150,
                                      label='Filter:',
                                      OnReturn=self._OnRefresh)
     Button(parent=bottom,
            label='Refresh',
            func=self._OnRefresh,
            fixedwidth=80)
     Button(parent=bottom,
            label='Reload',
            func=self._OnReload,
            fixedwidth=80)
     Button(parent=bottom,
            label='Clear cache',
            func=self._OnClear,
            fixedwidth=80)
     Label(parent=self.sr.main,
           align=uiconst.TOTOP,
           text='<b>Resources',
           padLeft=8)
     self.scroll = Scroll(parent=self.sr.main,
                          id='resmanmonitorscroll',
                          align=uiconst.TOALL,
                          padding=2)
     self.PopulateAttributes()
     self.PopulateScroll()
     uthread2.StartTasklet(self.RefreshAttributes)
예제 #28
0
def ConstructOptInSection(column, columnWidth):
    optInOptions = GetOptInOptions()
    if not optInOptions:
        return
    from eve.client.script.ui.util.uix import GetContainerHeader
    from eve.client.script.ui.control.checkbox import Checkbox
    GetContainerHeader(localization.GetByLabel(
        'UI/SystemMenu/GeneralSettings/Experimental/Header'),
                       column,
                       xmargin=-5)
    for each in optInOptions:
        Checkbox(text=each.label,
                 parent=column,
                 configName=each.settingKey,
                 checked=GetUserSetting(each.settingKey),
                 prefstype=('user', 'ui'),
                 callback=OnBetaSettingChanged)
예제 #29
0
class SettingSectionHeaderWithCheckbox(SettingSectionHeaderBase):
    def ApplyAttributes(self, attributes):
        SettingSectionHeaderBase.ApplyAttributes(self, attributes)
        self.sgController = attributes.sgController
        checked = bool(self.sgController.GetValue())
        left = SECTION_LABEL_LEFT - 20 - 2
        self.checkbox = Checkbox(parent=self,
                                 align=uiconst.CENTERLEFT,
                                 text='',
                                 checked=checked,
                                 callback=self.CheckBoxChange,
                                 pos=(4, 0, 0, 20))

    def CheckBoxChange(self, cb):
        value = cb.GetValue()
        self.sgController.SetValue(value)

    def OnClick(self, *args):
        self.checkbox.ToggleState()
예제 #30
0
    def LoadTooltipPanel(self, tooltipPanel, *args):
        if uicore.uilib.leftbtn:
            return
        tooltipPanel.columns = 2
        tooltipPanel.AddLabelSmall(
            text=localization.GetByLabel('UI/Map/Markers'),
            bold=True,
            cellPadding=(8, 4, 4, 2),
            colSpan=tooltipPanel.columns)
        divider = LineThemeColored(align=uiconst.TOTOP,
                                   state=uiconst.UI_DISABLED,
                                   height=1,
                                   padding=(1, 1, 1, 0),
                                   opacity=0.3)
        tooltipPanel.AddCell(divider,
                             cellPadding=(0, 0, 0, 2),
                             colSpan=tooltipPanel.columns)
        currentActive = GetMapViewSetting(self.settingGroupKey, self.mapViewID)
        sortList = []
        for groupID in VIEWMODE_MARKERS_OPTIONS:
            sortList.append((evetypes.GetGroupNameByGroup(groupID), groupID))

        for customID in VIEWMODE_MARKERS_OPTIONS_CUSTOM:
            sortList.append((localization.GetByLabel(
                VIEWMODE_MARKERS_CUSTOM_LABELS[customID]), customID))

        for optionName, optionID in sorted(sortList):
            checkBox = Checkbox(align=uiconst.TOPLEFT,
                                text=optionName,
                                checked=optionID in currentActive,
                                wrapLabel=False,
                                callback=self.OnSettingButtonCheckBoxChange,
                                retval=optionID,
                                prefstype=None)
            tooltipPanel.AddCell(cellObject=checkBox,
                                 colSpan=tooltipPanel.columns,
                                 cellPadding=(5, 0, 5, 0))

        tooltipPanel.AddSpacer(width=2, height=2, colSpan=tooltipPanel.columns)
        tooltipPanel.state = uiconst.UI_NORMAL
예제 #31
0
    def LoadTooltipPanel(self, tooltipPanel, *args):
        if uicore.uilib.leftbtn:
            return
        tooltipPanel.columns = 2
        tooltipPanel.margin = 2
        currentActive = GetMapViewSetting(self.settingGroupKey)
        sortList = []
        for groupID in VIEWMODE_MARKERS_OPTIONS:
            sortList.append((cfg.invgroups.Get(groupID).name, groupID))

        for groupName, groupID in sorted(sortList):
            checkBox = Checkbox(align=uiconst.TOPLEFT,
                                text=groupName,
                                checked=groupID in currentActive,
                                wrapLabel=False,
                                callback=self.OnCheckBoxChange,
                                retval=groupID,
                                prefstype=None)
            tooltipPanel.AddCell(cellObject=checkBox,
                                 colSpan=tooltipPanel.columns,
                                 cellPadding=(3, 0, 3, 0))

        tooltipPanel.state = uiconst.UI_NORMAL
 def AddColCheckBox(self, title):
     col = self.AddColumnContainer(width=CHECKBOX_COL_WIDTH, padRight=0)
     checkbox = Checkbox(parent=col, align=uiconst.CENTER)
     checkbox.LoadTooltipPanel = self.LoadCBTooltip
     self.SetCbAttributes(checkbox, title)