summaryrefslogtreecommitdiff
path: root/gr-wxgui/src/python/plotter/waterfall_plotter.py
diff options
context:
space:
mode:
authorMarcus Leech2012-05-21 14:35:33 -0400
committerTom Rondeau2012-05-21 14:35:33 -0400
commited838eb9be22d769247a9c63f23423c8c2f81f72 (patch)
treee109cbd8d7ce5ea2ae3df2f6ce64256ad17aeecb /gr-wxgui/src/python/plotter/waterfall_plotter.py
parentd4fe4377e72165d88fdf00f6c8d5a5b986b25955 (diff)
downloadgnuradio-ed838eb9be22d769247a9c63f23423c8c2f81f72.tar.gz
gnuradio-ed838eb9be22d769247a9c63f23423c8c2f81f72.tar.bz2
gnuradio-ed838eb9be22d769247a9c63f23423c8c2f81f72.zip
wxgui: allows LEFT click to set a flow-graph variable to the adjusted X value on either the FFT or waterfall display.
Diffstat (limited to 'gr-wxgui/src/python/plotter/waterfall_plotter.py')
-rw-r--r--gr-wxgui/src/python/plotter/waterfall_plotter.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gr-wxgui/src/python/plotter/waterfall_plotter.py b/gr-wxgui/src/python/plotter/waterfall_plotter.py
index f2456241c..6a6bf6330 100644
--- a/gr-wxgui/src/python/plotter/waterfall_plotter.py
+++ b/gr-wxgui/src/python/plotter/waterfall_plotter.py
@@ -110,6 +110,7 @@ class waterfall_plotter(grid_plotter_base):
self._counter = 0
self.set_num_lines(0)
self.set_color_mode(COLORS.keys()[0])
+ self.callback = None
def _init_waterfall(self):
"""
@@ -172,6 +173,13 @@ class waterfall_plotter(grid_plotter_base):
"""
return '%s: %s'%(self.x_label, common.eng_format(x_val, self.x_units))
+ def _call_callback(self, x_val, y_val):
+ if self.callback != None:
+ self.callback(x_val,y_val)
+
+ def set_callback(self,callback):
+ self.callback = callback
+
def _draw_legend(self):
"""
Draw the color scale legend.