diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-02-17 17:04:47 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-02-17 18:33:51 -0500 |
commit | 60f6b22a5f11d5c54771dc5a9b4567ba35852088 (patch) | |
tree | 48a0ceec6c55e780689fcf599f7ca7563a0fce2e /gr-qtgui/apps/plot_form.py | |
parent | 725b08915ce8854a824845d5e17fe6ef40e9c924 (diff) |
qtgui: tweaking plotting apps for better handling.
Diffstat (limited to 'gr-qtgui/apps/plot_form.py')
-rw-r--r-- | gr-qtgui/apps/plot_form.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gr-qtgui/apps/plot_form.py b/gr-qtgui/apps/plot_form.py index 72f8ca501c..3b477d516f 100644 --- a/gr-qtgui/apps/plot_form.py +++ b/gr-qtgui/apps/plot_form.py @@ -108,7 +108,7 @@ class plot_form(QtGui.QWidget): self.y_max_edit.setMinimumWidth(100) self.y_max_edit.setMaximumWidth(100) self.left_col_form.addRow("Y Max:", self.y_max_edit) - self.connect(self.y_max_edit, QtCore.SIGNAL("returnPressed()"), + self.connect(self.y_max_edit, QtCore.SIGNAL("editingFinished()"), self.update_yaxis_pos) self.y_min_edit = QtGui.QLineEdit(self) @@ -116,7 +116,7 @@ class plot_form(QtGui.QWidget): self.y_min_edit.setMinimumWidth(100) self.y_min_edit.setMaximumWidth(100) self.left_col_form.addRow("Y Min:", self.y_min_edit) - self.connect(self.y_min_edit, QtCore.SIGNAL("returnPressed()"), + self.connect(self.y_min_edit, QtCore.SIGNAL("editingFinished()"), self.update_yaxis_pos) self.grid_check = QtGui.QCheckBox("Grid", self) @@ -128,10 +128,11 @@ class plot_form(QtGui.QWidget): # Create a slider to move the plot's y-axis offset self.ybar = QtGui.QSlider(QtCore.Qt.Vertical, self) - self.ybar.setMinimum(self.top_block._y_min) - self.ybar.setMaximum(self.top_block._y_max) - self.ybar.setPageStep(self.top_block._y_range) - self.ybar.setValue(self.top_block._y_value) + self.ybar.setMinimum(1000*self.top_block._y_min) + self.ybar.setMaximum(1000*self.top_block._y_max) + self.ybar.setSingleStep(1000*(self.top_block._y_range/10)) + self.ybar.setPageStep(1000*(self.top_block._y_range/2)) + self.ybar.setValue(1000*self.top_block._y_value) self.connect(self.ybar, QtCore.SIGNAL("valueChanged(int)"), self.update_yaxis_slider) self.layout.addWidget(self.ybar, 1,1,1,1) @@ -334,6 +335,7 @@ class plot_form(QtGui.QWidget): self.top_block.set_y_axis(self._y_min, self._y_max) def update_yaxis_slider(self, value): + value = value/1000.0 self.top_block._y_value = value self._y_min = value - self.top_block._y_range self._y_max = value |