summaryrefslogtreecommitdiff
path: root/gr-qtgui/apps/plot_form.py
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-01-15 17:16:54 -0500
committerTom Rondeau <trondeau@vt.edu>2013-01-15 17:16:54 -0500
commit03798c0d940e236267bcd4e1d5118d73df9464f7 (patch)
tree7a273923badfd24cd5affc9e8c92a77859fd630f /gr-qtgui/apps/plot_form.py
parentb059c724cc3929d7f2eaa55adeb20baabaa955e0 (diff)
qtgui: added auto-scale checkbox to time plot.
Diffstat (limited to 'gr-qtgui/apps/plot_form.py')
-rw-r--r--gr-qtgui/apps/plot_form.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/gr-qtgui/apps/plot_form.py b/gr-qtgui/apps/plot_form.py
index f6841811a8..9a8bdd847f 100644
--- a/gr-qtgui/apps/plot_form.py
+++ b/gr-qtgui/apps/plot_form.py
@@ -59,10 +59,17 @@ class dialog_box(QtGui.QWidget):
self.connect(self.end_edit, QtCore.SIGNAL("returnPressed()"),
self.update_points)
+ self.auto_scale = QtGui.QCheckBox("Auto Scale", self)
+ if(self.top_block._auto_scale):
+ self.auto_scale.setChecked(self.top_block._auto_scale)
+ self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"),
+ self.set_auto_scale)
+
self.layout = QtGui.QGridLayout(self)
self.layout.addWidget(top_block.get_gui(), 1,0,1,2)
self.layout.addLayout(self.start_form, 2,0,1,1)
self.layout.addLayout(self.end_form, 2,1,1,1)
+ self.layout.addWidget(self.auto_scale, 1,3,1,1)
# Create a save action
self.save_act = QtGui.QAction("Save", self)
@@ -125,3 +132,8 @@ class dialog_box(QtGui.QWidget):
else:
qpix.save(filename, "JPEG");
+ def set_auto_scale(self, state):
+ if(state):
+ self.top_block.auto_scale(True)
+ else:
+ self.top_block.auto_scale(False)