diff --git a/.gitmodules b/.gitmodules index a410e00ed..3a3af4781 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "eos"] path = eos - url = git://pyfa.git.sourceforge.net/gitroot/pyfa/eos + url = git://evefit.org/eos.git diff --git a/gui/mainFrame.py b/gui/mainFrame.py index 646c2fe45..3063f8bce 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -105,7 +105,8 @@ class MainFrame(wx.Frame): def registerMenu(self): # Quit self.Bind(wx.EVT_MENU, self.ExitApp, id=wx.ID_EXIT) - + # Widgets Inspector + self.Bind(wx.EVT_MENU, self.openWXInspectTool, id=911) # About self.Bind(wx.EVT_MENU, self.ShowAboutBox, id=wx.ID_ABOUT) @@ -116,3 +117,15 @@ class MainFrame(wx.Frame): def toggleShipBrowser(self, event): self.GetToolBar().toggleShipBrowser(event) + def openWXInspectTool(self,event): + from wx.lib.inspection import InspectionTool + if not InspectionTool().initialized: + InspectionTool().Init() + + # Find a widget to be selected in the tree. Use either the + # one under the cursor, if any, or this frame. + wnd = wx.FindWindowAtPointer() + if not wnd: + wnd = self + InspectionTool().Show(wnd, True) + diff --git a/gui/mainMenuBar.py b/gui/mainMenuBar.py index 3709aeb38..ef49c7bbe 100644 --- a/gui/mainMenuBar.py +++ b/gui/mainMenuBar.py @@ -58,3 +58,4 @@ class MainMenuBar(wx.MenuBar): self.Append(helpMenu, "&Help") helpMenu.Append(wx.ID_ABOUT) helpMenu.Append(wx.ID_HELP, "User manual", "User manual") + helpMenu.Append(911,"Open Widgets Inspect tool", "Open Widgets Inspect tool") diff --git a/gui/pygauge.py b/gui/pygauge.py index 8edf36508..395a75ea9 100644 --- a/gui/pygauge.py +++ b/gui/pygauge.py @@ -7,7 +7,7 @@ # --------------------------------------------------------------------------------- # """ -PyGauge is a generic Gauge implementation tailored for PYFA (Python Fitting Assistant) +PyfaGauge is a generic Gauge implementation tailored for PYFA (Python Fitting Assistant) It uses the easeOutQuad equation from caurina.transitions.Tweener """ @@ -51,7 +51,7 @@ class PyGauge(wx.PyWindow): self._timerOver = None self._oldValue = 0 self._timerOn = 0 - self._animDuration = 500 + self._animDuration = 400 self._animStep = 0 self._period = 25 self._animValue = 0 @@ -173,16 +173,16 @@ class PyGauge(wx.PyWindow): if value > self._range: self._overdrive = value self._value = self._range - if not self._timerOver: - self._timerOver = wx.Timer(self, self._overdriveTimerId) - self._timerOver.Start(500) - self._overdriveTimerStarted = True +# if not self._timerOver: +# self._timerOver = wx.Timer(self, self._overdriveTimerId) +# self._timerOver.Start(500) +# self._overdriveTimerStarted = True else: self._overdrive = value self._value = value - if self._overdriveTimerStarted: - self._timerOver.Stop() - self._overdriveTimerStarted = False +# if self._overdriveTimerStarted: +# self._timerOver.Stop() +# self._overdriveTimerStarted = False if value < 0: self._value = 0 self._overdrive = 0 @@ -322,10 +322,11 @@ class PyGauge(wx.PyWindow): start = 0 end = oldValue - value - step=self.OUT_BOUNCE(self._animStep, start, end, self._animDuration) + step=self.OUT_QUAD(self._animStep, start, end, self._animDuration) self._animStep += self._period - if self._timerId == event.GetId() and self._overdriveTimerId != event.GetId(): + if self._timerId == event.GetId(): +# and self._overdriveTimerId != event.GetId(): stop_timer = False if self._animStep > self._animDuration: @@ -346,6 +347,6 @@ class PyGauge(wx.PyWindow): self._timer.Stop() self.Refresh() - if self._overdriveTimerId == event.GetId(): - self._overdriveToggle*=-1 - self.Refresh() +# if self._overdriveTimerId == event.GetId(): +# self._overdriveToggle*=-1 +# self.Refresh() diff --git a/gui/statsPane.py b/gui/statsPane.py index 38365aa47..83f4e2b32 100644 --- a/gui/statsPane.py +++ b/gui/statsPane.py @@ -232,6 +232,11 @@ class StatsPane(wx.Panel): self.SetSizer(self.pickerSizer) collapsible = wx.CollapsiblePane(self, label="Stats") + + colPane=collapsible.GetPane() + colPane.SetMinSize(wx.Size(0,0)) + colPane.SetSize(wx.Size(0,0)) + collapsible.Expand() collapsible.Bind(wx.EVT_COLLAPSIBLEPANE_CHANGED, self.collapseChanged) @@ -297,7 +302,7 @@ class StatsPane(wx.Panel): box = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(bitmap, 0, wx.ALIGN_CENTER) - sizer.Add(box, 0, wx.ALIGN_CENTER) + sizer.Add(box, 0, wx.ALIGN_LEFT) suffix = "Points" if type == "calibration" else "Hardpoints" lbl = wx.StaticText(parent, wx.ID_ANY, "0") @@ -349,6 +354,10 @@ class StatsPane(wx.Panel): setattr(self, "label%sTotal%s" % (panel.capitalize(), capitalizedType), lbl) absolute.Add(lbl, 0, wx.ALIGN_LEFT) + units = {"cpu":" tf", "pg":" GJ", "droneBandwidth":" mbit/s", "droneBay":u" m\u00B3"} + lbl = wx.StaticText(parent, wx.ID_ANY, "%s" % units[type]) + absolute.Add(lbl, 0, wx.ALIGN_LEFT) + # Gauges modif. - Darriele if self._showNormalGauges == True: gauge = wx.Gauge(parent, wx.ID_ANY, 100)