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


Python statsView.StatsView类代码示例

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


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

示例1: __init__

 def __init__(self, parent):
     StatsView.__init__(self)
     self.parent = parent
     self._cachedValues = []
     self.showEffective = True
     self.activeFit = None
     self.mainFrame = gui.mainFrame.MainFrame.getInstance()
     self.mainFrame.Bind(EFFECTIVE_HP_TOGGLED, self.ehpSwitch)
开发者ID:bluSch,项目名称:pyfa,代码行数:8,代码来源:resistancesViewFull.py

示例2: __init__

 def __init__(self, parent):
     StatsView.__init__(self)
     self.parent = parent
     self._timerId = wx.NewId()
     self._timer = None
     self.parent.Bind(wx.EVT_TIMER, self.OnTimer)
     self._timerRunsBeforeUpdate = 60
     self._timerRuns = 0
     self._timerIdUpdate = wx.NewId()
     self._timerUpdate = None
     self._cachedShip = 0
     self._cachedFittings = 0
     self._cachedTotal = 0
开发者ID:MRACHINI,项目名称:Pyfa,代码行数:13,代码来源:priceViewFull.py

示例3: switchToMiningYieldView

    def switchToMiningYieldView(self, event):
        # Getting the active fit
        mainFrame = gui.mainFrame.MainFrame.getInstance()
        sFit = service.Fit.getInstance()
        fit = sFit.getFit(mainFrame.getActiveFit())
        # Remove ourselves from statsPane's view list
        self.parent.views.remove(self)
        self._cachedValues = []
        # And no longer display us
        self.panel.GetSizer().Clear(True)
        self.panel.GetSizer().Layout()

        # Remove effective label
        hsizer = self.headerPanel.GetSizer()
        hsizer.Remove(self.stEff)
        self.stEff.Destroy()

        # Get the new view
        view = StatsView.getView("miningyieldViewFull")(self.parent)
        view.populatePanel(self.panel, self.headerPanel)
        # Populate us in statsPane's view list
        self.parent.views.append(view)
        # Get the TogglePanel
        tp = self.panel.GetParent()
        tp.SetLabel(view.getHeaderText(fit))
        view.refreshPanel(fit)
开发者ID:FoobarRaboof,项目名称:Pyfa,代码行数:26,代码来源:firepowerViewFull.py

示例4: __init__

    def __init__(self, parent):
        wx.Panel.__init__(self, parent)

        # Use 25% smaller fonts if MAC or force font size to 8 for msw/linux

        if "__WXMAC__" in wx.PlatformInfo:
            self.SetWindowVariant(wx.WINDOW_VARIANT_SMALL)
        else:
            standardFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
            standardFont.SetPointSize(8)
            self.SetFont(standardFont)

        mainSizer = wx.BoxSizer(wx.VERTICAL)
        self.SetSizer(mainSizer)

        self.views = []
        self.nameViewMap = {}
        maxviews = len(self.DEFAULT_VIEWS)
        i = 0
        for viewName in self.DEFAULT_VIEWS:
            tp = TogglePanel(self)
            contentPanel = tp.GetContentPane()
            contentPanel.viewName = viewName

            try:
                view = StatsView.getView(viewName)(self)
                pyfalog.debug("Load view: {0}", viewName)
            except KeyError:
                pyfalog.error("Attempted to load an invalid view: {0}", viewName)

            self.nameViewMap[viewName] = view
            self.views.append(view)

            headerPanel = tp.GetHeaderPanel()

            view.populatePanel(contentPanel, headerPanel)
            tp.SetLabel(view.getHeaderText(None))
            view.refreshPanel(None)

            contentPanel.Bind(wx.EVT_RIGHT_DOWN, self.contextHandler(contentPanel))
            for child in contentPanel.GetChildren():
                child.Bind(wx.EVT_RIGHT_DOWN, self.contextHandler(contentPanel))

            mainSizer.Add(tp, 0, wx.EXPAND | wx.LEFT, 3)
            if i < maxviews - 1:
                mainSizer.Add(wx.StaticLine(self, wx.ID_ANY, style=wx.HORIZONTAL), 0,
                              wx.EXPAND | wx.TOP | wx.LEFT | wx.RIGHT, 2)
            i += 1
            tp.OnStateChange(tp.GetBestSize())

        width, height = self.GetSize()
        self.SetMinSize((width + 9, -1))

        self.mainFrame = gui.mainFrame.MainFrame.getInstance()
        self.mainFrame.Bind(GE.FIT_CHANGED, self.fitChanged)
开发者ID:copyliu,项目名称:Pyfa,代码行数:55,代码来源:statsPane.py

示例5: switchToFirepowerView

 def switchToFirepowerView(self, event):
     # Getting the active fit
     mainFrame = gui.mainFrame.MainFrame.getInstance()
     sFit = Fit.getInstance()
     fit = sFit.getFit(mainFrame.getActiveFit())
     # Remove ourselves from statsPane's view list
     self.parent.views.remove(self)
     self._cachedValues = []
     # And no longer display us
     self.panel.GetSizer().Clear(True)
     self.panel.GetSizer().Layout()
     # Get the new view
     view = StatsView.getView("firepowerViewFull")(self.parent)
     view.populatePanel(self.panel, self.headerPanel)
     # Populate us in statsPane's view list
     self.parent.views.append(view)
     # Get the TogglePanel
     tp = self.panel.GetParent()
     # Bind the new panel's children to allow context menu access
     tp.SetLabel(view.getHeaderText(fit))
     view.refreshPanel(fit)
开发者ID:blitzmann,项目名称:Pyfa,代码行数:21,代码来源:miningyieldViewFull.py

示例6: __init__

 def __init__(self, parent):
     StatsView.__init__(self)
     self.parent = parent
     self._cachedValues = []
开发者ID:Sectoid,项目名称:Pyfa,代码行数:4,代码来源:outgoingViewMinimal.py

示例7: __init__

 def __init__(self, parent):
     StatsView.__init__(self)
     self.parent = parent
     self.mainFrame = gui.mainFrame.MainFrame.getInstance()
     self.mainFrame.additionsPane.notebook.Bind(gui.chromeTabs.EVT_NOTEBOOK_PAGE_CHANGED, self.pageChanged)
开发者ID:MrNukealizer,项目名称:Pyfa,代码行数:5,代码来源:resourcesViewFull.py

示例8: __init__

 def __init__(self, parent):
     StatsView.__init__(self)
     self.parent = parent
     self._cachedShip = 0
     self._cachedFittings = 0
     self._cachedTotal = 0
开发者ID:FoobarRaboof,项目名称:Pyfa,代码行数:6,代码来源:priceViewFull.py

示例9: __init__

 def __init__(self, parent):
     StatsView.__init__(self)
     self.parent = parent
开发者ID:DaManDOH,项目名称:Pyfa,代码行数:3,代码来源:capacitorViewFull.py

示例10: __init__

 def __init__(self, parent):
     StatsView.__init__(self)
     self.parent = parent
     self.settings = PriceMenuSettings.getInstance()
开发者ID:bsmr-eve,项目名称:Pyfa,代码行数:4,代码来源:priceViewMinimal.py

示例11: __init__

 def __init__(self, parent):
     StatsView.__init__(self)
     self.parent = parent
     self.mainFrame = gui.mainFrame.MainFrame.getInstance()
     self.mainFrame.Bind(rvf.EFFECTIVE_HP_TOGGLED, self.toggleEffective)
     self.effective = True
开发者ID:DaManDOH,项目名称:Pyfa,代码行数:6,代码来源:rechargeViewFull.py


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