当前位置: 首页>>代码示例>>Python>>正文


Python settings.SettingsProvider类代码示例

本文整理汇总了Python中service.settings.SettingsProvider的典型用法代码示例。如果您正苦于以下问题:Python SettingsProvider类的具体用法?Python SettingsProvider怎么用?Python SettingsProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SettingsProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: OnClose

    def OnClose(self, event):
        self.UpdateMainFrameAttribs()

        # save open fits
        self.prevOpenFits['pyfaOpenFits'] = []  # clear old list
        for page in self.fitMultiSwitch._pages:
            m = getattr(page, "getActiveFit", None)
            if m is not None:
                self.prevOpenFits['pyfaOpenFits'].append(m())

        # save all teh settingz
        SettingsProvider.getInstance().saveAll()
        event.Skip()
开发者ID:petosorus,项目名称:Pyfa,代码行数:13,代码来源:mainFrame.py

示例2: __init__

    def __init__(self):
        pyfalog.debug("Initialize Fit class")
        self.pattern = DamagePattern.getInstance().getDamagePattern("Uniform")
        self.targetResists = None
        self.character = saveddata_Character.getAll5()
        self.booster = False
        self.dirtyFitIDs = set()

        serviceFittingDefaultOptions = {
            "useGlobalCharacter": False,
            "useGlobalDamagePattern": False,
            "defaultCharacter": self.character.ID,
            "useGlobalForceReload": False,
            "colorFitBySlot": False,
            "rackSlots": True,
            "rackLabels": True,
            "compactSkills": True,
            "showTooltip": True,
            "showMarketShortcuts": False,
            "enableGaugeAnimation": True,
            "exportCharges": True,
            "openFitInNew": False,
            "priceSystem": "Jita",
            "priceSource": "eve-marketdata.com",
            "showShipBrowserTooltip": True,
            "marketSearchDelay": 250
        }

        self.serviceFittingOptions = SettingsProvider.getInstance().getSettings(
            "pyfaServiceFittingOptions", serviceFittingDefaultOptions)
开发者ID:Sectoid,项目名称:Pyfa,代码行数:30,代码来源:fit.py

示例3: __init__

    def __init__(self):
        self.pattern = DamagePattern.getInstance().getDamagePattern("Uniform")
        self.character = Character.getInstance().all5()
        self.dirtyFitIDs = set()

        serviceFittingDefaultOptions = {"useGlobalCharacter": False, "useGlobalDamagePattern": False, "defaultCharacter": self.character.ID, "useGlobalForceReload": False}

        self.serviceFittingOptions = SettingsProvider.getInstance().getSettings("pyfaServiceFittingOptions", serviceFittingDefaultOptions)
开发者ID:MRACHINI,项目名称:Pyfa,代码行数:8,代码来源:fit.py

示例4: __init__

    def __init__(self, parent):
        wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title="Select a format", size=(-1, -1),
                           style=wx.DEFAULT_DIALOG_STYLE)
        mainSizer = wx.BoxSizer(wx.VERTICAL)

        self.settings = SettingsProvider.getInstance().getSettings("pyfaExport", {"format": 0, "options": 0})

        self.copyFormats = {
            "EFT": CopySelectDialog.copyFormatEft,
            "XML": CopySelectDialog.copyFormatXml,
            "DNA": CopySelectDialog.copyFormatDna,
            "ESI": CopySelectDialog.copyFormatEsi,
            "MultiBuy": CopySelectDialog.copyFormatMultiBuy,
            "EFS": CopySelectDialog.copyFormatEfs
        }

        self.options = {}

        for i, format in enumerate(self.copyFormats.keys()):
            if i == 0:
                rdo = wx.RadioButton(self, wx.ID_ANY, format, style=wx.RB_GROUP)
            else:
                rdo = wx.RadioButton(self, wx.ID_ANY, format)
            rdo.Bind(wx.EVT_RADIOBUTTON, self.Selected)
            if self.settings['format'] == self.copyFormats[format]:
                rdo.SetValue(True)
                self.copyFormat = self.copyFormats[format]
            mainSizer.Add(rdo, 0, wx.EXPAND | wx.ALL, 5)

            if format == "EFT":
                bsizer = wx.BoxSizer(wx.VERTICAL)

                for x, v in EFT_OPTIONS.items():
                    ch = wx.CheckBox(self, -1, v['name'])
                    self.options[x] = ch
                    if self.settings['options'] & x:
                        ch.SetValue(True)
                    bsizer.Add(ch, 1, wx.EXPAND | wx.TOP | wx.BOTTOM, 3)
                mainSizer.Add(bsizer, 1, wx.EXPAND | wx.LEFT, 20)

        buttonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL)
        if buttonSizer:
            mainSizer.Add(buttonSizer, 0, wx.EXPAND | wx.ALL, 5)

        self.toggleOptions()
        self.SetSizer(mainSizer)
        self.Fit()
        self.Center()
开发者ID:bsmr-eve,项目名称:Pyfa,代码行数:48,代码来源:copySelectDialog.py

示例5: __init__

    def __init__(self):
        self.pattern = DamagePattern.getInstance().getDamagePattern("Uniform")
        self.character = Character.getInstance().all5()
        self.booster = False
        self.dirtyFitIDs = set()

        serviceFittingDefaultOptions = {
            "useGlobalCharacter": False,
            "useGlobalDamagePattern": False,
            "defaultCharacter": self.character.ID,
            "useGlobalForceReload": False,
            "colorFitBySlot": False,
            "rackSlots": True,
            "rackLabels": True,
            "compactSkills": True}

        self.serviceFittingOptions = SettingsProvider.getInstance().getSettings(
            "pyfaServiceFittingOptions", serviceFittingDefaultOptions)
开发者ID:SpeakerJunk,项目名称:Pyfa,代码行数:18,代码来源:fit.py

示例6: LoadMainFrameAttribs

    def LoadMainFrameAttribs(self):
        mainFrameDefaultAttribs = {"wnd_width": 1000, "wnd_height": 700, "wnd_maximized": False, "browser_width": 300,
                                   "market_height": 0, "fitting_height": -200}
        self.mainFrameAttribs = SettingsProvider.getInstance().getSettings("pyfaMainWindowAttribs",
                                                                           mainFrameDefaultAttribs)

        if self.mainFrameAttribs["wnd_maximized"]:
            width = mainFrameDefaultAttribs["wnd_width"]
            height = mainFrameDefaultAttribs["wnd_height"]
            self.Maximize()
        else:
            width = self.mainFrameAttribs["wnd_width"]
            height = self.mainFrameAttribs["wnd_height"]

        self.SetSize((width, height))
        self.SetMinSize((mainFrameDefaultAttribs["wnd_width"], mainFrameDefaultAttribs["wnd_height"]))

        self.browserWidth = self.mainFrameAttribs["browser_width"]
        self.marketHeight = self.mainFrameAttribs["market_height"]
        self.fittingHeight = self.mainFrameAttribs["fitting_height"]
开发者ID:petosorus,项目名称:Pyfa,代码行数:20,代码来源:mainFrame.py

示例7: exportToClipboard

    def exportToClipboard(self, event):
        CopySelectDict = {CopySelectDialog.copyFormatEft: self.clipboardEft,
                          # CopySelectDialog.copyFormatEftImps: self.clipboardEftImps,
                          CopySelectDialog.copyFormatXml: self.clipboardXml,
                          CopySelectDialog.copyFormatDna: self.clipboardDna,
                          CopySelectDialog.copyFormatEsi: self.clipboardEsi,
                          CopySelectDialog.copyFormatMultiBuy: self.clipboardMultiBuy,
                          CopySelectDialog.copyFormatEfs: self.clipboardEfs}
        dlg = CopySelectDialog(self)
        dlg.ShowModal()
        selected = dlg.GetSelected()
        options = dlg.GetOptions()

        settings = SettingsProvider.getInstance().getSettings("pyfaExport")
        settings["format"] = selected
        settings["options"] = options

        CopySelectDict[selected](options)

        try:
            dlg.Destroy()
        except RuntimeError:
            pyfalog.error("Tried to destroy an object that doesn't exist in <exportToClipboard>.")
开发者ID:petosorus,项目名称:Pyfa,代码行数:23,代码来源:mainFrame.py

示例8: LoadPreviousOpenFits

    def LoadPreviousOpenFits(self):
        sFit = Fit.getInstance()

        self.prevOpenFits = SettingsProvider.getInstance().getSettings("pyfaPrevOpenFits",
                                                                       {"enabled": False, "pyfaOpenFits": []})
        fits = self.prevOpenFits['pyfaOpenFits']

        # Remove any fits that cause exception when fetching (non-existent fits)
        for id in fits[:]:
            try:
                fit = sFit.getFit(id, basic=True)
                if fit is None:
                    fits.remove(id)
            except:
                fits.remove(id)

        if not self.prevOpenFits['enabled'] or len(fits) is 0:
            # add blank page if there are no fits to be loaded
            self.fitMultiSwitch.AddPage()
            return

        self.waitDialog = wx.BusyInfo("Loading previous fits...")
        OpenFitsThread(fits, self.closeWaitDialog)
开发者ID:petosorus,项目名称:Pyfa,代码行数:23,代码来源:mainFrame.py

示例9: Validate

    def Validate(self):
        # Since this dialog is shown through aa ShowModal(), we hook into the Validate function to veto the closing of the dialog until we're ready.
        # This always returns False, and when we're ready will EndModal()
        selected = self.GetSelected()
        options = self.GetOptions()

        settings = SettingsProvider.getInstance().getSettings("pyfaExport")
        settings["format"] = selected
        settings["options"] = options
        self.waitDialog = None

        def cb(text):
            if self.waitDialog:
                del self.waitDialog
            toClipboard(text)
            self.EndModal(wx.ID_OK)

        export_options = options.get(selected)
        if selected == CopySelectDialog.copyFormatMultiBuy and export_options.get(PortMultiBuyOptions.OPTIMIZE_PRICES, False):
            self.waitDialog = wx.BusyInfo("Optimizing Prices", parent=self)

        self.CopySelectDict[selected](export_options, callback=cb)

        return False
开发者ID:pyfa-org,项目名称:Pyfa,代码行数:24,代码来源:copySelectDialog.py

示例10: __init__

    def __init__(self):
        self.priceCache = {}

        #Init recently used module storage
        serviceMarketRecentlyUsedModules = {"pyfaMarketRecentlyUsedModules": []}

        self.serviceMarketRecentlyUsedModules = SettingsProvider.getInstance().getSettings("pyfaMarketRecentlyUsedModules", serviceMarketRecentlyUsedModules)

        # Start price fetcher
        self.priceWorkerThread = PriceWorkerThread()
        self.priceWorkerThread.daemon = True
        self.priceWorkerThread.start()

        # Thread which handles search
        self.searchWorkerThread = SearchWorkerThread()
        self.searchWorkerThread.daemon = True
        self.searchWorkerThread.start()

        # Ship browser helper thread
        self.shipBrowserWorkerThread = ShipBrowserWorkerThread()
        self.shipBrowserWorkerThread.daemon = True
        self.shipBrowserWorkerThread.start()

        # Items' group overrides
        self.customGroups = set()
        # Limited edition ships
        self.les_grp = eos.types.Group()
        self.les_grp.ID = -1
        self.les_grp.name = "Limited Issue Ships"
        self.les_grp.published = True
        ships = self.getCategory("Ship")
        self.les_grp.category = ships
        self.les_grp.categoryID = ships.ID
        self.les_grp.description = ""
        self.les_grp.icon = None
        self.ITEMS_FORCEGROUP = {
            "Opux Luxury Yacht": self.les_grp, # One of those is wedding present at CCP fanfest, another was hijacked from ISD guy during an event
            "Silver Magnate": self.les_grp,  # Amarr Championship prize
            "Gold Magnate": self.les_grp,  # Amarr Championship prize
            "Armageddon Imperial Issue": self.les_grp,  # Amarr Championship prize
            "Apocalypse Imperial Issue": self.les_grp, # Amarr Championship prize
            "Guardian-Vexor": self.les_grp, # Illegal rewards for the Gallente Frontier Tour Lines event arc
            "Megathron Federate Issue": self.les_grp, # Reward during Crielere event
            "Raven State Issue": self.les_grp,  # AT4 prize
            "Tempest Tribal Issue": self.les_grp, # AT4 prize
            "Apotheosis": self.les_grp, # 5th EVE anniversary present
            "Zephyr": self.les_grp, # 2010 new year gift
            "Primae": self.les_grp, # Promotion of planetary interaction
            "Freki": self.les_grp, # AT7 prize
            "Mimir": self.les_grp, # AT7 prize
            "Utu": self.les_grp, # AT8 prize
            "Adrestia": self.les_grp, # AT8 prize
            "Echelon": self.les_grp, # 2011 new year gift
            "Malice": self.les_grp, # AT9 prize
            "Vangel": self.les_grp, # AT9 prize
            "Iteron Mark IV Quafe Ultra Edition": self.les_grp, # Gift to Fanfest 2012 attendees
            "Iteron Mark IV Quafe Ultramarine Edition": self.les_grp } # Gift to first Japanese subscribers
        self.ITEMS_FORCEGROUP_R = self.__makeRevDict(self.ITEMS_FORCEGROUP)
        self.les_grp.items += list(self.getItem(itmn) for itmn in self.ITEMS_FORCEGROUP_R[self.les_grp])
        self.customGroups.add(self.les_grp)

        # List of items which are forcibly published or hidden
        self.ITEMS_FORCEPUBLISHED = {
            "Ibis": True, # Noobship
            "Impairor": True, # Noobship
            "Velator": True, # Noobship
            "Reaper": True, # Noobship
            "Data Subverter I": False, # Not used in EVE, probably will appear with Dust link
            "Ghost Heavy Missile": False, # Missile used by Sansha
            "QA Damage Module": False, # QA modules used by CCP internally
            "QA ECCM": False,
            "QA Immunity Module": False,
            "QA Multiship Module - 10 Players": False,
            "QA Multiship Module - 20 Players": False,
            "QA Multiship Module - 40 Players": False,
            "QA Multiship Module - 5 Players": False,
            "QA Remote Armor Repair System - 5 Players": False,
            "QA Shield Transporter - 5 Players": False }

        # List of groups which are forcibly published
        self.GROUPS_FORCEPUBLISHED = {
            "Prototype Exploration Ship": False, # We moved the only ship from this group to other group anyway
            "Rookie ship": True } # Group-container for published noobships

        # Dictionary of items with forced meta groups, uses following format:
        # Item name: (metagroup name, parent type name)
        self.ITEMS_FORCEDMETAGROUP = {
            "'Habitat' Miner I": ("Storyline", "Miner I"),
            "'Wild' Miner I": ("Storyline", "Miner I"),
            "Medium Nano Armor Repair Unit I": ("Tech I", "Medium Armor Repairer I"),
            "Large 'Reprieve' Vestment Reconstructer I": ("Storyline", "Large Armor Repairer I"),
            "Khanid Navy Torpedo Launcher": ("Faction", "Torpedo Launcher I"),
            "Dark Blood Tracking Disruptor": ("Faction", "Tracking Disruptor I"),
            "True Sansha Tracking Disruptor": ("Faction", "Tracking Disruptor I"),
            "Shadow Serpentis Remote Sensor Dampener": ("Faction", "Remote Sensor Dampener I") }
        # Parent type name: set(item names)
        self.ITEMS_FORCEDMETAGROUP_R = {}
        for item, value in self.ITEMS_FORCEDMETAGROUP.items():
            parent = value[1]
            if not parent in self.ITEMS_FORCEDMETAGROUP_R:
#.........这里部分代码省略.........
开发者ID:bluSch,项目名称:pyfa,代码行数:101,代码来源:market.py

示例11: __init__

    def __init__(self):
        self.priceCache = {}

        #Init recently used module storage
        serviceMarketRecentlyUsedModules = {"pyfaMarketRecentlyUsedModules": []}

        self.serviceMarketRecentlyUsedModules = SettingsProvider.getInstance().getSettings("pyfaMarketRecentlyUsedModules", serviceMarketRecentlyUsedModules)

        # Start price fetcher
        self.priceWorkerThread = PriceWorkerThread()
        self.priceWorkerThread.daemon = True
        self.priceWorkerThread.start()

        # Thread which handles search
        self.searchWorkerThread = SearchWorkerThread()
        self.searchWorkerThread.daemon = True
        self.searchWorkerThread.start()

        # Ship browser helper thread
        self.shipBrowserWorkerThread = ShipBrowserWorkerThread()
        self.shipBrowserWorkerThread.daemon = True
        self.shipBrowserWorkerThread.start()

        # Items' group overrides
        self.customGroups = set()
        # Limited edition ships
        self.les_grp = eos.types.Group()
        self.les_grp.ID = -1
        self.les_grp.name = "Limited Issue Ships"
        self.les_grp.published = True
        ships = self.getCategory("Ship")
        self.les_grp.category = ships
        self.les_grp.categoryID = ships.ID
        self.les_grp.description = ""
        self.les_grp.icon = None
        self.ITEMS_FORCEGROUP = {
            "Opux Luxury Yacht": self.les_grp, # One of those is wedding present at CCP fanfest, another was hijacked from ISD guy during an event
            "Silver Magnate": self.les_grp,  # Amarr Championship prize
            "Gold Magnate": self.les_grp,  # Amarr Championship prize
            "Armageddon Imperial Issue": self.les_grp,  # Amarr Championship prize
            "Apocalypse Imperial Issue": self.les_grp, # Amarr Championship prize
            "Guardian-Vexor": self.les_grp, # Illegal rewards for the Gallente Frontier Tour Lines event arc
            "Megathron Federate Issue": self.les_grp, # Reward during Crielere event
            "Raven State Issue": self.les_grp,  # AT4 prize
            "Tempest Tribal Issue": self.les_grp, # AT4 prize
            "Apotheosis": self.les_grp, # 5th EVE anniversary present
            "Zephyr": self.les_grp, # 2010 new year gift
            "Primae": self.les_grp, # Promotion of planetary interaction
            "Freki": self.les_grp, # AT7 prize
            "Mimir": self.les_grp, # AT7 prize
            "Utu": self.les_grp, # AT8 prize
            "Adrestia": self.les_grp, # AT8 prize
            "Echelon": self.les_grp, # 2011 new year gift
            "Malice": self.les_grp, # AT9 prize
            "Vangel": self.les_grp, # AT9 prize
            "Cambion": self.les_grp, # AT10 prize
            "Etana": self.les_grp, # AT10 prize
            "Chremoas": self.les_grp, # AT11 prize :(
            "Moracha": self.les_grp, # AT11 prize
            "Stratios Emergency Responder": self.les_grp, # Issued for Somer Blink lottery
            "Miasmos Quafe Ultra Edition": self.les_grp, # Gift to people who purchased FF HD stream
            "InterBus Shuttle": self.les_grp,
            "Leopard": self.les_grp, # 2013 new year gift
            "Whiptail": self.les_grp, # AT12 prize
            "Chameleon": self.les_grp, # AT12 prize
            "Victorieux Luxury Yacht":  self.les_grp  # Worlds Collide prize \o/ chinese getting owned
        }

        self.ITEMS_FORCEGROUP_R = self.__makeRevDict(self.ITEMS_FORCEGROUP)
        self.les_grp.addItems = list(self.getItem(itmn) for itmn in self.ITEMS_FORCEGROUP_R[self.les_grp])
        self.customGroups.add(self.les_grp)

        # List of items which are forcibly published or hidden
        self.ITEMS_FORCEPUBLISHED = {
            "Data Subverter I": False, # Not used in EVE, probably will appear with Dust link
            "QA Cross Protocol Analyzer": False, # QA modules used by CCP internally
            "QA Damage Module": False,
            "QA ECCM": False,
            "QA Immunity Module": False,
            "QA Multiship Module - 10 Players": False,
            "QA Multiship Module - 20 Players": False,
            "QA Multiship Module - 40 Players": False,
            "QA Multiship Module - 5 Players": False,
            "QA Remote Armor Repair System - 5 Players": False,
            "QA Shield Transporter - 5 Players": False,
            "Goru's Shuttle": False,
            "Guristas Shuttle": False,
            "Mobile Decoy Unit": False,  # Seems to be left over test mod for deployables
            "Tournament Micro Jump Unit": False,  # Normally seen only on tournament arenas
            "Council Diplomatic Shuttle": False,  # CSM X celebration
            "Imp": False,  # AT13 prize, not a real ship yet
            "Fiend": False,  # AT13 prize, not a real ship yet
        }

        # do not publish ships that we convert
        for name in conversions.packs['skinnedShips']:
            self.ITEMS_FORCEPUBLISHED[name] = False

        if config.debug:
            # Publish Tactical Dessy Modes if in debug
#.........这里部分代码省略.........
开发者ID:poettler-ric,项目名称:Pyfa,代码行数:101,代码来源:market.py

示例12: __init__

    def __init__(self):
        self.priceCache = {}

        #Init recently used module storage
        serviceMarketRecentlyUsedModules = {"pyfaMarketRecentlyUsedModules": []}

        self.serviceMarketRecentlyUsedModules = SettingsProvider.getInstance().getSettings("pyfaMarketRecentlyUsedModules", serviceMarketRecentlyUsedModules)

        # Start price fetcher
        self.priceWorkerThread = PriceWorkerThread()
        self.priceWorkerThread.daemon = True
        self.priceWorkerThread.start()

        # Thread which handles search
        self.searchWorkerThread = SearchWorkerThread()
        self.searchWorkerThread.daemon = True
        self.searchWorkerThread.start()

        # Ship browser helper thread
        self.shipBrowserWorkerThread = ShipBrowserWorkerThread()
        self.shipBrowserWorkerThread.daemon = True
        self.shipBrowserWorkerThread.start()

        # Items' group overrides
        self.customGroups = set()
        # Limited edition ships
        self.les_grp = eos.types.Group()
        self.les_grp.ID = -1
        self.les_grp.name = "Limited Issue Ships"
        self.les_grp.published = True
        ships = self.getCategory("Ship")
        self.les_grp.category = ships
        self.les_grp.categoryID = ships.ID
        self.les_grp.description = ""
        self.les_grp.icon = None
        self.ITEMS_FORCEGROUP = {
            "Opux Luxury Yacht": self.les_grp, # One of those is wedding present at CCP fanfest, another was hijacked from ISD guy during an event
            "Silver Magnate": self.les_grp,  # Amarr Championship prize
            "Gold Magnate": self.les_grp,  # Amarr Championship prize
            "Armageddon Imperial Issue": self.les_grp,  # Amarr Championship prize
            "Apocalypse Imperial Issue": self.les_grp, # Amarr Championship prize
            "Guardian-Vexor": self.les_grp, # Illegal rewards for the Gallente Frontier Tour Lines event arc
            "Megathron Federate Issue": self.les_grp, # Reward during Crielere event
            "Raven State Issue": self.les_grp,  # AT4 prize
            "Tempest Tribal Issue": self.les_grp, # AT4 prize
            "Apotheosis": self.les_grp, # 5th EVE anniversary present
            "Zephyr": self.les_grp, # 2010 new year gift
            "Primae": self.les_grp, # Promotion of planetary interaction
            "Freki": self.les_grp, # AT7 prize
            "Mimir": self.les_grp, # AT7 prize
            "Utu": self.les_grp, # AT8 prize
            "Adrestia": self.les_grp, # AT8 prize
            "Echelon": self.les_grp, # 2011 new year gift
            "Malice": self.les_grp, # AT9 prize
            "Vangel": self.les_grp, # AT9 prize
            "Cambion": self.les_grp, # AT10 prize
            "Etana": self.les_grp, # AT10 prize
            "Chremoas": self.les_grp, # AT11 prize :(
            "Moracha": self.les_grp, # AT11 prize
            "Interbus Shuttle": self.les_grp,
            "Leopard": self.les_grp,
            "Stratios Emergency Responder": self.les_grp }
        self.ITEMS_FORCEGROUP_R = self.__makeRevDict(self.ITEMS_FORCEGROUP)
        self.les_grp.addItems = list(self.getItem(itmn) for itmn in self.ITEMS_FORCEGROUP_R[self.les_grp])
        self.customGroups.add(self.les_grp)

        # List of items which are forcibly published or hidden
        self.ITEMS_FORCEPUBLISHED = {
            "Data Subverter I": False, # Not used in EVE, probably will appear with Dust link
            "Ghost Heavy Missile": False, # Missile used by Sansha
            "QA Cross Protocol Analyzer": False, # QA modules used by CCP internally
            "QA Damage Module": False,
            "QA ECCM": False,
            "QA Immunity Module": False,
            "QA Multiship Module - 10 Players": False,
            "QA Multiship Module - 20 Players": False,
            "QA Multiship Module - 40 Players": False,
            "QA Multiship Module - 5 Players": False,
            "QA Remote Armor Repair System - 5 Players": False,
            "QA Shield Transporter - 5 Players": False,
            "Aliastra Catalyst": False, # Vanity
            "Inner Zone Shipping Catalyst": False, # Vanity
            "Intaki Syndicate Catalyst": False, # Vanity
            "InterBus Catalyst": False, # Vanity
            "Quafe Catalyst": False, # Vanity
            "Nefantar Thrasher": False, # Vanity
            "Sarum Magnate": False, # Vanity
            "Sukuuvestaa Heron": False, # Vanity
            "Inner Zone Shipping Imicus": False, # Vanity
            "Vherokior Probe": False, # Vanity
            "Miasmos Quafe Ultra Edition": False, # Vanity
            "Miasmos Quafe Ultramarine Edition": False, # Vanity
            "Miasmos Amastris Edition": False, # Vanity
            "Goru's Shuttle": False, # Vanity
            "Guristas Shuttle": False, # Vanity
            "Tash-Murkon Magnate": False, # Vanity
            "Scorpion Ishukone Watch": False, # Vanity
            "Incursus Aliastra Edition": False, # Vanity
            "Merlin Nugoeihuvi Edition": False, # Vanity
            "Police Pursuit Comet": False, # Vanity
#.........这里部分代码省略.........
开发者ID:DaManDOH,项目名称:Pyfa,代码行数:101,代码来源:market.py

示例13: populatePanel

    def populatePanel(self, panel):
        self.mainFrame = gui.mainFrame.MainFrame.getInstance()
        self.dirtySettings = False
        self.openFitsSettings = SettingsProvider.getInstance().getSettings("pyfaPrevOpenFits",
                                                                           {"enabled": False, "pyfaOpenFits": []})

        helpCursor = wx.Cursor(wx.CURSOR_QUESTION_ARROW)

        mainSizer = wx.BoxSizer(wx.VERTICAL)

        self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
        self.stTitle.Wrap(-1)
        self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))

        mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

        self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
        mainSizer.Add(self.m_staticline1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)

        self.cbGlobalChar = wx.CheckBox(panel, wx.ID_ANY, "Use global character", wx.DefaultPosition, wx.DefaultSize,
                                        0)
        mainSizer.Add(self.cbGlobalChar, 0, wx.ALL | wx.EXPAND, 5)

        self.cbGlobalDmgPattern = wx.CheckBox(panel, wx.ID_ANY, "Use global damage pattern", wx.DefaultPosition,
                                              wx.DefaultSize, 0)
        mainSizer.Add(self.cbGlobalDmgPattern, 0, wx.ALL | wx.EXPAND, 5)

        self.cbCompactSkills = wx.CheckBox(panel, wx.ID_ANY, "Compact skills needed tooltip", wx.DefaultPosition,
                                           wx.DefaultSize, 0)
        mainSizer.Add(self.cbCompactSkills, 0, wx.ALL | wx.EXPAND, 5)

        self.cbFitColorSlots = wx.CheckBox(panel, wx.ID_ANY, "Color fitting view by slot", wx.DefaultPosition,
                                           wx.DefaultSize, 0)
        mainSizer.Add(self.cbFitColorSlots, 0, wx.ALL | wx.EXPAND, 5)

        self.cbReopenFits = wx.CheckBox(panel, wx.ID_ANY, "Reopen previous fits on startup", wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        mainSizer.Add(self.cbReopenFits, 0, wx.ALL | wx.EXPAND, 5)

        self.cbRackSlots = wx.CheckBox(panel, wx.ID_ANY, "Separate Racks", wx.DefaultPosition, wx.DefaultSize, 0)
        mainSizer.Add(self.cbRackSlots, 0, wx.ALL | wx.EXPAND, 5)

        labelSizer = wx.BoxSizer(wx.VERTICAL)
        self.cbRackLabels = wx.CheckBox(panel, wx.ID_ANY, "Show Rack Labels", wx.DefaultPosition, wx.DefaultSize, 0)
        labelSizer.Add(self.cbRackLabels, 0, wx.ALL | wx.EXPAND, 5)
        mainSizer.Add(labelSizer, 0, wx.LEFT | wx.EXPAND, 30)

        self.cbShowTooltip = wx.CheckBox(panel, wx.ID_ANY, "Show tab tooltips", wx.DefaultPosition, wx.DefaultSize, 0)
        mainSizer.Add(self.cbShowTooltip, 0, wx.ALL | wx.EXPAND, 5)

        self.cbMarketShortcuts = wx.CheckBox(panel, wx.ID_ANY, "Show market shortcuts", wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        mainSizer.Add(self.cbMarketShortcuts, 0, wx.ALL | wx.EXPAND, 5)

        self.cbGaugeAnimation = wx.CheckBox(panel, wx.ID_ANY, "Animate gauges", wx.DefaultPosition, wx.DefaultSize, 0)
        mainSizer.Add(self.cbGaugeAnimation, 0, wx.ALL | wx.EXPAND, 5)

        self.cbExportCharges = wx.CheckBox(panel, wx.ID_ANY, "Export loaded charges", wx.DefaultPosition,
                                           wx.DefaultSize, 0)
        mainSizer.Add(self.cbExportCharges, 0, wx.ALL | wx.EXPAND, 5)

        self.cbOpenFitInNew = wx.CheckBox(panel, wx.ID_ANY, "Open fittings in a new page by default",
                                          wx.DefaultPosition, wx.DefaultSize, 0)
        mainSizer.Add(self.cbOpenFitInNew, 0, wx.ALL | wx.EXPAND, 5)

        self.cbShowShipBrowserTooltip = wx.CheckBox(panel, wx.ID_ANY, "Show ship browser tooltip",
                                          wx.DefaultPosition, wx.DefaultSize, 0)
        mainSizer.Add(self.cbShowShipBrowserTooltip, 0, wx.ALL | wx.EXPAND, 5)

        priceSizer = wx.BoxSizer(wx.HORIZONTAL)

        self.stDefaultSystem = wx.StaticText(panel, wx.ID_ANY, "Default Market Prices:", wx.DefaultPosition, wx.DefaultSize, 0)
        self.stDefaultSystem.Wrap(-1)
        priceSizer.Add(self.stDefaultSystem, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
        self.stDefaultSystem.SetCursor(helpCursor)
        self.stDefaultSystem.SetToolTip(
            wx.ToolTip('The source you choose will be tried first, but subsequent sources will be used if the preferred '
                       'source fails. The system you choose is absolute and requests will not be made against other systems.'))

        self.chPriceSource = wx.Choice(panel, choices=sorted(Price.sources.keys()))
        self.chPriceSystem = wx.Choice(panel, choices=list(Price.systemsList.keys()))
        priceSizer.Add(self.chPriceSource, 1, wx.ALL | wx.EXPAND, 5)
        priceSizer.Add(self.chPriceSystem, 1, wx.ALL | wx.EXPAND, 5)

        mainSizer.Add(priceSizer, 0, wx.ALL | wx.EXPAND, 0)

        delayTimer = wx.BoxSizer(wx.HORIZONTAL)

        self.stMarketDelay = wx.StaticText(panel, wx.ID_ANY, "Market Search Delay (ms):", wx.DefaultPosition, wx.DefaultSize, 0)
        self.stMarketDelay.Wrap(-1)
        self.stMarketDelay.SetCursor(helpCursor)
        self.stMarketDelay.SetToolTip(
            wx.ToolTip('The delay between a keystroke and the market search. Can help reduce lag when typing fast in the market search box.'))

        delayTimer.Add(self.stMarketDelay, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.intDelay = IntCtrl(panel, max=1000, limited=True)
        delayTimer.Add(self.intDelay, 0, wx.ALL, 5)

        mainSizer.Add(delayTimer, 0, wx.ALL | wx.EXPAND, 0)
#.........这里部分代码省略.........
开发者ID:Sectoid,项目名称:Pyfa,代码行数:101,代码来源:pyfaGeneralPreferences.py

示例14: __init__

    def __init__(self, parent):
        wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title="Select a format", size=(-1, -1),
                           style=wx.DEFAULT_DIALOG_STYLE)

        self.CopySelectDict = {
            CopySelectDialog.copyFormatEft     : self.exportEft,
            CopySelectDialog.copyFormatXml     : self.exportXml,
            CopySelectDialog.copyFormatDna     : self.exportDna,
            CopySelectDialog.copyFormatEsi     : self.exportEsi,
            CopySelectDialog.copyFormatMultiBuy: self.exportMultiBuy,
            CopySelectDialog.copyFormatEfs     : self.exportEfs
        }

        self.mainFrame = parent
        mainSizer = wx.BoxSizer(wx.VERTICAL)

        self.copyFormats = OrderedDict((
            ("EFT", (CopySelectDialog.copyFormatEft, EFT_OPTIONS)),
            ("MultiBuy", (CopySelectDialog.copyFormatMultiBuy, MULTIBUY_OPTIONS)),
            ("ESI", (CopySelectDialog.copyFormatEsi, None)),
            ("DNA", (CopySelectDialog.copyFormatDna, DNA_OPTIONS)),
            ("EFS", (CopySelectDialog.copyFormatEfs, None)),
            # ("XML", (CopySelectDialog.copyFormatXml, None)),
        ))

        defaultFormatOptions = {}
        for formatId, formatOptions in self.copyFormats.values():
            if formatOptions is None:
                continue
            defaultFormatOptions[formatId] = {opt[0]: opt[3] for opt in formatOptions}

        self.settings = SettingsProvider.getInstance().getSettings("pyfaExport", {"format": 0, "options": defaultFormatOptions})
        # Options used to be stored as int (EFT export options only),
        # overwrite them with new format when needed
        if isinstance(self.settings["options"], int):
            self.settings["options"] = defaultFormatOptions

        self.options = {}

        initialized = False
        for formatName, formatData in self.copyFormats.items():
            formatId, formatOptions = formatData
            if not initialized:
                rdo = wx.RadioButton(self, wx.ID_ANY, formatName, style=wx.RB_GROUP)
                initialized = True
            else:
                rdo = wx.RadioButton(self, wx.ID_ANY, formatName)
            rdo.Bind(wx.EVT_RADIOBUTTON, self.Selected)
            if self.settings['format'] == formatId:
                rdo.SetValue(True)
                self.copyFormat = formatId
            mainSizer.Add(rdo, 0, wx.EXPAND | wx.ALL, 5)

            if formatOptions:
                bsizer = wx.BoxSizer(wx.VERTICAL)
                self.options[formatId] = {}

                for optId, optName, optDesc, _ in formatOptions:
                    checkbox = wx.CheckBox(self, -1, optName)
                    if optDesc:
                        checkbox.SetToolTip(wx.ToolTip(optDesc))
                    self.options[formatId][optId] = checkbox
                    if self.settings['options'].get(formatId, {}).get(optId, defaultFormatOptions.get(formatId, {}).get(optId)):
                        checkbox.SetValue(True)
                    bsizer.Add(checkbox, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 3)
                mainSizer.Add(bsizer, 0, wx.EXPAND | wx.LEFT, 20)

        buttonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL)
        if buttonSizer:
            mainSizer.Add(buttonSizer, 0, wx.EXPAND | wx.ALL, 5)

        self.toggleOptions()
        self.SetSizer(mainSizer)
        self.Fit()
        self.Center()
开发者ID:pyfa-org,项目名称:Pyfa,代码行数:75,代码来源:copySelectDialog.py

示例15: populatePanel

    def populatePanel(self, panel):
        self.mainFrame = gui.mainFrame.MainFrame.getInstance()
        self.dirtySettings = False
        self.openFitsSettings = SettingsProvider.getInstance().getSettings("pyfaPrevOpenFits",
                                                                           {"enabled": False, "pyfaOpenFits": []})

        mainSizer = wx.BoxSizer(wx.VERTICAL)

        self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
        self.stTitle.Wrap(-1)
        self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))

        mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

        self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
        mainSizer.Add(self.m_staticline1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)

        self.cbGlobalChar = wx.CheckBox(panel, wx.ID_ANY, u"Use global character", wx.DefaultPosition, wx.DefaultSize,
                                        0)
        mainSizer.Add(self.cbGlobalChar, 0, wx.ALL | wx.EXPAND, 5)

        self.cbGlobalDmgPattern = wx.CheckBox(panel, wx.ID_ANY, u"Use global damage pattern", wx.DefaultPosition,
                                              wx.DefaultSize, 0)
        mainSizer.Add(self.cbGlobalDmgPattern, 0, wx.ALL | wx.EXPAND, 5)

        self.cbGlobalForceReload = wx.CheckBox(panel, wx.ID_ANY, u"Factor in reload time", wx.DefaultPosition,
                                               wx.DefaultSize, 0)
        mainSizer.Add(self.cbGlobalForceReload, 0, wx.ALL | wx.EXPAND, 5)

        self.cbCompactSkills = wx.CheckBox(panel, wx.ID_ANY, u"Compact skills needed tooltip", wx.DefaultPosition,
                                           wx.DefaultSize, 0)
        mainSizer.Add(self.cbCompactSkills, 0, wx.ALL | wx.EXPAND, 5)

        self.cbFitColorSlots = wx.CheckBox(panel, wx.ID_ANY, u"Color fitting view by slot", wx.DefaultPosition,
                                           wx.DefaultSize, 0)
        mainSizer.Add(self.cbFitColorSlots, 0, wx.ALL | wx.EXPAND, 5)

        self.cbReopenFits = wx.CheckBox(panel, wx.ID_ANY, u"Reopen previous fits on startup", wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        mainSizer.Add(self.cbReopenFits, 0, wx.ALL | wx.EXPAND, 5)

        self.cbRackSlots = wx.CheckBox(panel, wx.ID_ANY, u"Separate Racks", wx.DefaultPosition, wx.DefaultSize, 0)
        mainSizer.Add(self.cbRackSlots, 0, wx.ALL | wx.EXPAND, 5)

        labelSizer = wx.BoxSizer(wx.VERTICAL)
        self.cbRackLabels = wx.CheckBox(panel, wx.ID_ANY, u"Show Rack Labels", wx.DefaultPosition, wx.DefaultSize, 0)
        labelSizer.Add(self.cbRackLabels, 0, wx.ALL | wx.EXPAND, 5)
        mainSizer.Add(labelSizer, 0, wx.LEFT | wx.EXPAND, 30)

        self.cbShowTooltip = wx.CheckBox(panel, wx.ID_ANY, u"Show tab tooltips", wx.DefaultPosition, wx.DefaultSize, 0)
        mainSizer.Add(self.cbShowTooltip, 0, wx.ALL | wx.EXPAND, 5)

        self.cbMarketShortcuts = wx.CheckBox(panel, wx.ID_ANY, u"Show market shortcuts", wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        mainSizer.Add(self.cbMarketShortcuts, 0, wx.ALL | wx.EXPAND, 5)

        self.cbGaugeAnimation = wx.CheckBox(panel, wx.ID_ANY, u"Animate gauges", wx.DefaultPosition, wx.DefaultSize, 0)
        mainSizer.Add(self.cbGaugeAnimation, 0, wx.ALL | wx.EXPAND, 5)

        self.cbExportCharges = wx.CheckBox(panel, wx.ID_ANY, u"Export loaded charges", wx.DefaultPosition,
                                           wx.DefaultSize, 0)
        mainSizer.Add(self.cbExportCharges, 0, wx.ALL | wx.EXPAND, 5)

        self.cbOpenFitInNew = wx.CheckBox(panel, wx.ID_ANY, u"Open fittings in a new page by default",
                                          wx.DefaultPosition, wx.DefaultSize, 0)
        mainSizer.Add(self.cbOpenFitInNew, 0, wx.ALL | wx.EXPAND, 5)

        wx.BoxSizer(wx.HORIZONTAL)

        self.sFit = Fit.getInstance()

        self.cbGlobalChar.SetValue(self.sFit.serviceFittingOptions["useGlobalCharacter"])
        self.cbGlobalDmgPattern.SetValue(self.sFit.serviceFittingOptions["useGlobalDamagePattern"])
        self.cbGlobalForceReload.SetValue(self.sFit.serviceFittingOptions["useGlobalForceReload"])
        self.cbFitColorSlots.SetValue(self.sFit.serviceFittingOptions["colorFitBySlot"] or False)
        self.cbRackSlots.SetValue(self.sFit.serviceFittingOptions["rackSlots"] or False)
        self.cbRackLabels.SetValue(self.sFit.serviceFittingOptions["rackLabels"] or False)
        self.cbCompactSkills.SetValue(self.sFit.serviceFittingOptions["compactSkills"] or False)
        self.cbReopenFits.SetValue(self.openFitsSettings["enabled"])
        self.cbShowTooltip.SetValue(self.sFit.serviceFittingOptions["showTooltip"] or False)
        self.cbMarketShortcuts.SetValue(self.sFit.serviceFittingOptions["showMarketShortcuts"] or False)
        self.cbGaugeAnimation.SetValue(self.sFit.serviceFittingOptions["enableGaugeAnimation"])
        self.cbExportCharges.SetValue(self.sFit.serviceFittingOptions["exportCharges"])
        self.cbOpenFitInNew.SetValue(self.sFit.serviceFittingOptions["openFitInNew"])

        self.cbGlobalChar.Bind(wx.EVT_CHECKBOX, self.OnCBGlobalCharStateChange)
        self.cbGlobalDmgPattern.Bind(wx.EVT_CHECKBOX, self.OnCBGlobalDmgPatternStateChange)
        self.cbGlobalForceReload.Bind(wx.EVT_CHECKBOX, self.OnCBGlobalForceReloadStateChange)
        self.cbFitColorSlots.Bind(wx.EVT_CHECKBOX, self.onCBGlobalColorBySlot)
        self.cbRackSlots.Bind(wx.EVT_CHECKBOX, self.onCBGlobalRackSlots)
        self.cbRackLabels.Bind(wx.EVT_CHECKBOX, self.onCBGlobalRackLabels)
        self.cbCompactSkills.Bind(wx.EVT_CHECKBOX, self.onCBCompactSkills)
        self.cbReopenFits.Bind(wx.EVT_CHECKBOX, self.onCBReopenFits)
        self.cbShowTooltip.Bind(wx.EVT_CHECKBOX, self.onCBShowTooltip)
        self.cbMarketShortcuts.Bind(wx.EVT_CHECKBOX, self.onCBShowShortcuts)
        self.cbGaugeAnimation.Bind(wx.EVT_CHECKBOX, self.onCBGaugeAnimation)
        self.cbExportCharges.Bind(wx.EVT_CHECKBOX, self.onCBExportCharges)
        self.cbOpenFitInNew.Bind(wx.EVT_CHECKBOX, self.onCBOpenFitInNew)

        self.cbRackLabels.Enable(self.sFit.serviceFittingOptions["rackSlots"] or False)
#.........这里部分代码省略.........
开发者ID:Ebag333,项目名称:Pyfa,代码行数:101,代码来源:pyfaGeneralPreferences.py


注:本文中的service.settings.SettingsProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。