diff options
author | Walter Bender <walter.bender@gmail.com> | 2012-06-17 02:38:22 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2012-06-17 02:38:22 (GMT) |
commit | bc58918b09a145c3c2120e7e240c88e713a23a50 (patch) | |
tree | 96b4cac9eeab67a7d3ea5cd708156083e0a0c99f /drawwaveform.py | |
parent | 04aa0a455f3449b7fe7d6690d5fe2dd528b39a27 (diff) |
add toggle buttons for turning on/off channels
Diffstat (limited to 'drawwaveform.py')
-rw-r--r-- | drawwaveform.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drawwaveform.py b/drawwaveform.py index fd27a90..481a0d6 100644 --- a/drawwaveform.py +++ b/drawwaveform.py @@ -111,6 +111,7 @@ class DrawWaveform(gtk.DrawingArea): self.color = [] self.source = [] self.graph_id = [] + self.visibility = [] self.max_samples = 115 self.max_samples_fact = 3 @@ -132,6 +133,7 @@ class DrawWaveform(gtk.DrawingArea): self.type .append(0) self.color.append('#FF0000') self.source.append(0) + self.visibility.append(True) self.graph_id.append(x) self.ringbuffer = [] @@ -354,6 +356,8 @@ class DrawWaveform(gtk.DrawingArea): #Iterate for each graph for graph_id in self.graph_id: + if not self.visibility[graph_id]: + continue if self.graph_show_state[graph_id]: buf = self.ringbuffer[graph_id].read(None, self.input_step) samples = ceil(self.allocation.width / self.draw_interval) @@ -523,3 +527,6 @@ class DrawWaveform(gtk.DrawingArea): def set_bias_param(self, bias=0, channel=0): self.bias[channel] = bias + + def set_visibility(self, state, channel=0): + self.visibility[channel] = state |