本文整理汇总了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)
示例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
示例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)
示例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)
示例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)
示例6: __init__
def __init__(self, parent):
StatsView.__init__(self)
self.parent = parent
self._cachedValues = []
示例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)
示例8: __init__
def __init__(self, parent):
StatsView.__init__(self)
self.parent = parent
self._cachedShip = 0
self._cachedFittings = 0
self._cachedTotal = 0
示例9: __init__
def __init__(self, parent):
StatsView.__init__(self)
self.parent = parent
示例10: __init__
def __init__(self, parent):
StatsView.__init__(self)
self.parent = parent
self.settings = PriceMenuSettings.getInstance()
示例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