diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-01-15 20:17:08 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-01-15 20:17:08 -0500 |
commit | d41219e35dc84a10c2c8c369b40ab1b38c64c381 (patch) | |
tree | 21601aa57d79e8394ae05e9433713cf902be294e /gr-qtgui/apps/plot_form.py | |
parent | 03798c0d940e236267bcd4e1d5118d73df9464f7 (diff) |
qtgui: adding features to QT-based time plotters.
Made parent class to make updates to all types easier.
Diffstat (limited to 'gr-qtgui/apps/plot_form.py')
-rw-r--r-- | gr-qtgui/apps/plot_form.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/gr-qtgui/apps/plot_form.py b/gr-qtgui/apps/plot_form.py index 9a8bdd847f..009db4aa1a 100644 --- a/gr-qtgui/apps/plot_form.py +++ b/gr-qtgui/apps/plot_form.py @@ -67,8 +67,8 @@ class dialog_box(QtGui.QWidget): 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.addLayout(self.start_form, 3,0,1,1) + self.layout.addLayout(self.end_form, 3,1,1,1) self.layout.addWidget(self.auto_scale, 1,3,1,1) # Create a save action @@ -89,9 +89,26 @@ class dialog_box(QtGui.QWidget): self.menu.addAction(self.exit_act) self.layout.addWidget(self.menu, 0,0,1,2) - + + self.posbar = QtGui.QSlider(QtCore.Qt.Horizontal, self) + self.posbar.setMaximum(self.top_block._max_nsamps) + self.posbar.setPageStep(self.top_block._nsamps) + self.connect(self.posbar, QtCore.SIGNAL("valueChanged(int)"), + self.update_position) + self.layout.addWidget(self.posbar, 2,0,1,2) + self.resize(800, 500) + def update_position(self, value): + self._start = value + self._end = value + self.posbar.pageStep() + + self.start_edit.setText("{0}".format(self._start)) + self.end_edit.setText("{0}".format(self._end)) + + if(value != self.top_block._max_nsamps): + self.top_block.reset(self._start, self.posbar.pageStep()) + def update_points(self): newstart = self.start_edit.text().toUInt()[0] newend = self.end_edit.text().toUInt()[0] |