From 34cab8d50a3c48370f7e1e42abd24be2e52a375d Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Tue, 31 Aug 2010 00:27:12 +0300 Subject: [PATCH 1/8] +2 bytes (the FA) in PYFA --- gui/pygauge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/pygauge.py b/gui/pygauge.py index 7b99d00e3..deb244c35 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 """ From f5542f588f2649d17ddedbde5d456e7cfad27db9 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Tue, 31 Aug 2010 00:38:16 +0300 Subject: [PATCH 2/8] Disabled anim (color cycle) in gauges --- gui/pygauge.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/gui/pygauge.py b/gui/pygauge.py index deb244c35..5c5ce3ff9 100644 --- a/gui/pygauge.py +++ b/gui/pygauge.py @@ -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() From 0276cdfb43bdb13498ba3249048422512d3734f4 Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Tue, 31 Aug 2010 11:13:04 +0200 Subject: [PATCH 3/8] Change eos submodule url to new repo --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 4e3e3e16388bdae5ec7113eca026be140ba97647 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Wed, 1 Sep 2010 17:08:56 +0300 Subject: [PATCH 4/8] Fixed an unwanted behavior of collapsible pane (it shows by default a pane - fix:sized to 0x0) affecting statspane view; Added Widget Inspection Tool in menu - should help debugging UI stuff if needed --- gui/mainFrame.py | 15 ++++++++++++++- gui/mainMenuBar.py | 1 + gui/statsPane.py | 5 +++++ 3 files changed, 20 insertions(+), 1 deletion(-) 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/statsPane.py b/gui/statsPane.py index 38365aa47..35dbd0f9d 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) From f527253573d2648b7d227fc29f512f4c1ad22cc8 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Wed, 1 Sep 2010 18:45:15 +0300 Subject: [PATCH 5/8] Added measurement units to pg/cpu/dronebay/dronebandwidth as suggested in 5) ticket #1 --- gui/statsPane.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gui/statsPane.py b/gui/statsPane.py index 35dbd0f9d..7428521e7 100644 --- a/gui/statsPane.py +++ b/gui/statsPane.py @@ -353,7 +353,27 @@ class StatsPane(wx.Panel): lbl = wx.StaticText(parent, wx.ID_ANY, "0") setattr(self, "label%sTotal%s" % (panel.capitalize(), capitalizedType), lbl) absolute.Add(lbl, 0, wx.ALIGN_LEFT) + + if type == "cpu": + lbl = wx.StaticText(parent, wx.ID_ANY, " tf") + setattr(self, "label%sMEASUREUNIT" % capitalizedType, lbl) + absolute.Add(lbl, 0, wx.ALIGN_LEFT) + + if type == "pg": + lbl = wx.StaticText(parent, wx.ID_ANY, " GJ") + setattr(self, "label%sMEASUREUNIT" % capitalizedType, lbl) + absolute.Add(lbl, 0, wx.ALIGN_LEFT) + + if type == "droneBandwidth": + lbl = wx.StaticText(parent, wx.ID_ANY, " mbit/s") + setattr(self, "label%sMEASUREUNIT" % capitalizedType, lbl) + absolute.Add(lbl, 0, wx.ALIGN_LEFT) + if type == "droneBay": + lbl = wx.StaticText(parent, wx.ID_ANY, u" m\u00B3") + setattr(self, "label%sMEASUREUNIT" % capitalizedType, lbl) + absolute.Add(lbl, 0, wx.ALIGN_LEFT) + # Gauges modif. - Darriele if self._showNormalGauges == True: gauge = wx.Gauge(parent, wx.ID_ANY, 100) From 9a39dd40642cd3184d2d2db07f27f005ba31accf Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Wed, 1 Sep 2010 18:51:01 +0300 Subject: [PATCH 6/8] Revert "Added measurement units to pg/cpu/dronebay/dronebandwidth as suggested in 5) ticket #1" This reverts commit f527253573d2648b7d227fc29f512f4c1ad22cc8. --- gui/statsPane.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/gui/statsPane.py b/gui/statsPane.py index 7428521e7..35dbd0f9d 100644 --- a/gui/statsPane.py +++ b/gui/statsPane.py @@ -353,27 +353,7 @@ class StatsPane(wx.Panel): lbl = wx.StaticText(parent, wx.ID_ANY, "0") setattr(self, "label%sTotal%s" % (panel.capitalize(), capitalizedType), lbl) absolute.Add(lbl, 0, wx.ALIGN_LEFT) - - if type == "cpu": - lbl = wx.StaticText(parent, wx.ID_ANY, " tf") - setattr(self, "label%sMEASUREUNIT" % capitalizedType, lbl) - absolute.Add(lbl, 0, wx.ALIGN_LEFT) - - if type == "pg": - lbl = wx.StaticText(parent, wx.ID_ANY, " GJ") - setattr(self, "label%sMEASUREUNIT" % capitalizedType, lbl) - absolute.Add(lbl, 0, wx.ALIGN_LEFT) - - if type == "droneBandwidth": - lbl = wx.StaticText(parent, wx.ID_ANY, " mbit/s") - setattr(self, "label%sMEASUREUNIT" % capitalizedType, lbl) - absolute.Add(lbl, 0, wx.ALIGN_LEFT) - if type == "droneBay": - lbl = wx.StaticText(parent, wx.ID_ANY, u" m\u00B3") - setattr(self, "label%sMEASUREUNIT" % capitalizedType, lbl) - absolute.Add(lbl, 0, wx.ALIGN_LEFT) - # Gauges modif. - Darriele if self._showNormalGauges == True: gauge = wx.Gauge(parent, wx.ID_ANY, 100) From 97ae57537156fef92039a70f06dd30dd631baf35 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Wed, 1 Sep 2010 19:05:30 +0300 Subject: [PATCH 7/8] Added measurement units to pg/cpu/dronebay/dronebandwidth as suggested in 5) ticket #1 --- gui/statsPane.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/statsPane.py b/gui/statsPane.py index 35dbd0f9d..7604fc0bf 100644 --- a/gui/statsPane.py +++ b/gui/statsPane.py @@ -354,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) From 31c59494c310a946ce0691bd0ca3c85e57fdc4f4 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Wed, 1 Sep 2010 19:15:27 +0300 Subject: [PATCH 8/8] Aligning turrets/missiles/calibration values to left as suggested in 3) ticket #1 --- gui/statsPane.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/statsPane.py b/gui/statsPane.py index 7604fc0bf..83f4e2b32 100644 --- a/gui/statsPane.py +++ b/gui/statsPane.py @@ -302,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")