diff options
author | jblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5> | 2008-10-09 01:42:25 +0000 |
---|---|---|
committer | jblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5> | 2008-10-09 01:42:25 +0000 |
commit | 73f3c91a5ad2acbb9f32bd440f2d4ea9ab54ac08 (patch) | |
tree | 01ee01600897d56c4f58bcfe627e41d0d9621cab /gr-wxgui/src/python/common.py | |
parent | e06f06e37fdc65198c037ab92f669f3ce78949c9 (diff) |
proper custom wxPython event, in wxPython style
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9760 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-wxgui/src/python/common.py')
-rw-r--r-- | gr-wxgui/src/python/common.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gr-wxgui/src/python/common.py b/gr-wxgui/src/python/common.py index e54f4dbf15..f31e1a7085 100644 --- a/gr-wxgui/src/python/common.py +++ b/gr-wxgui/src/python/common.py @@ -24,12 +24,6 @@ import numpy import math import wx -EVT_DATA = wx.NewEventType() -class DataEvent(wx.PyEvent): - def __init__(self, data): - wx.PyEvent.__init__(self, wx.NewId(), EVT_DATA) - self.data = data - class prop_setter(object): def _register_set_prop(self, controller, control_key, *args): def set_method(value): controller[control_key] = value @@ -37,6 +31,15 @@ class prop_setter(object): setattr(self, 'set_%s'%control_key, set_method) ################################################## +# Custom Data Event +################################################## +EVT_DATA = wx.PyEventBinder(wx.NewEventType()) +class DataEvent(wx.PyEvent): + def __init__(self, data): + wx.PyEvent.__init__(self, wx.NewId(), EVT_DATA.typeId) + self.data = data + +################################################## # Input Watcher Thread ################################################## class input_watcher(threading.Thread): |