[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r10577 - in gnuradio/branches/developers/jblum/gui_gut
From: |
jblum |
Subject: |
[Commit-gnuradio] r10577 - in gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python: . plotter |
Date: |
Sun, 8 Mar 2009 15:13:34 -0600 (MDT) |
Author: jblum
Date: 2009-03-08 15:13:33 -0600 (Sun, 08 Mar 2009)
New Revision: 10577
Modified:
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/fft_window.py
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/histo_window.py
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/plotter/common.py
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/scope_window.py
Log:
WIP Mouse wheel event for fft ref level and scope time base.
Modified:
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/fft_window.py
===================================================================
---
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/fft_window.py
2009-03-08 02:57:32 UTC (rev 10576)
+++
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/fft_window.py
2009-03-08 21:13:33 UTC (rev 10577)
@@ -103,6 +103,11 @@
control_box.Add(run_button, 0, wx.EXPAND)
#set sizer
self.SetSizerAndFit(control_box)
+ #mouse wheel event
+ def on_mouse_wheel(event):
+ if event.GetWheelRotation() < 0:
self._on_incr_ref_level(event)
+ else: self._on_decr_ref_level(event)
+ parent.plotter.Bind(wx.EVT_MOUSEWHEEL, on_mouse_wheel)
##################################################
# Event handlers
Modified:
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/histo_window.py
===================================================================
---
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/histo_window.py
2009-03-08 02:57:32 UTC (rev 10576)
+++
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/histo_window.py
2009-03-08 21:13:33 UTC (rev 10577)
@@ -143,7 +143,7 @@
#update the x grid
self.plotter.set_x_grid(
self[MINIMUM_KEY], self[MAXIMUM_KEY],
- (self[MAXIMUM_KEY] - self[MINIMUM_KEY])/8,
+ (self[MAXIMUM_KEY] - self[MINIMUM_KEY])/8.,
)
self.plotter.set_x_label('Counts')
#update the y grid
Modified:
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/plotter/common.py
===================================================================
---
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/plotter/common.py
2009-03-08 02:57:32 UTC (rev 10576)
+++
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/plotter/common.py
2009-03-08 21:13:33 UTC (rev 10577)
@@ -91,7 +91,7 @@
def unlock(self): self._lock.release()
##################################################
-# Period update thread for point label
+# Periodic update thread for point label
##################################################
class point_label_thread(threading.Thread, mutex):
Modified:
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/scope_window.py
===================================================================
---
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/scope_window.py
2009-03-08 02:57:32 UTC (rev 10576)
+++
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/scope_window.py
2009-03-08 21:13:33 UTC (rev 10577)
@@ -222,6 +222,12 @@
control_box.Add(self.run_button, 0, wx.EXPAND)
#set sizer
self.SetSizerAndFit(control_box)
+ #mouse wheel event
+ def on_mouse_wheel(event):
+ if parent[SCOPE_MODE_KEY] is None:
+ if event.GetWheelRotation() < 0:
self._on_incr_t_divs(event)
+ else: self._on_decr_t_divs(event)
+ parent.plotter.Bind(wx.EVT_MOUSEWHEEL, on_mouse_wheel)
##################################################
# Event handlers
@@ -491,6 +497,8 @@
Update the grid to reflect the current settings:
xy divisions, xy offset, xy mode setting
"""
+ if self[T_FRAC_OFF_KEY] < 0: self[T_FRAC_OFF_KEY] = 0; return
+ if self[T_FRAC_OFF_KEY] > 1: self[T_FRAC_OFF_KEY] = 1; return
if self[SCOPE_MODE_KEY]:
#update the x axis
self.plotter.set_x_label('Ch%d'%(self[SCOPE_MODE_KEY][1]+1))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r10577 - in gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python: . plotter,
jblum <=