summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrondeau2009-04-26 21:31:06 +0000
committertrondeau2009-04-26 21:31:06 +0000
commit0e7cf5c9b06d8ae234aed507ca9551a49da6bf67 (patch)
treee7f4b342a62d75cfd92e903b2b28de70c5c5815a
parent0055921e21259ea96b05e7456304731ea05c6a45 (diff)
downloadgnuradio-0e7cf5c9b06d8ae234aed507ca9551a49da6bf67.tar.gz
gnuradio-0e7cf5c9b06d8ae234aed507ca9551a49da6bf67.tar.bz2
gnuradio-0e7cf5c9b06d8ae234aed507ca9551a49da6bf67.zip
adding a pause/unpause button to the digital GUI application.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10920 221aa14e-8319-0410-a670-987f0aec2ac5
-rwxr-xr-xgr-qtgui/src/python/qt_digital.py13
-rw-r--r--gr-qtgui/src/python/qt_digital_window.ui13
2 files changed, 26 insertions, 0 deletions
diff --git a/gr-qtgui/src/python/qt_digital.py b/gr-qtgui/src/python/qt_digital.py
index 33c3794ed..a4a60ccfb 100755
--- a/gr-qtgui/src/python/qt_digital.py
+++ b/gr-qtgui/src/python/qt_digital.py
@@ -35,7 +35,11 @@ class dialog_box(QtGui.QMainWindow):
self.gui.sinkLayout.addWidget(snkTx)
self.gui.sinkLayout.addWidget(snkRx)
+
# Connect up some signals
+ self.connect(self.gui.pauseButton, QtCore.SIGNAL("clicked()"),
+ self.pauseFg)
+
self.connect(self.gui.sampleRateEdit, QtCore.SIGNAL("editingFinished()"),
self.sampleRateEditText)
@@ -52,6 +56,15 @@ class dialog_box(QtGui.QMainWindow):
self.alphaEditText)
+ def pauseFg(self):
+ if(self.gui.pauseButton.text() == "Pause"):
+ self.fg.stop()
+ self.fg.wait()
+ self.gui.pauseButton.setText("Unpause")
+ else:
+ self.fg.start()
+ self.gui.pauseButton.setText("Pause")
+
# Accessor functions for Gui to manipulate system parameters
def set_sample_rate(self, sr):
ssr = eng_notation.num_to_str(sr)
diff --git a/gr-qtgui/src/python/qt_digital_window.ui b/gr-qtgui/src/python/qt_digital_window.ui
index 27764e5f2..79ba01286 100644
--- a/gr-qtgui/src/python/qt_digital_window.ui
+++ b/gr-qtgui/src/python/qt_digital_window.ui
@@ -231,6 +231,19 @@
</property>
</widget>
</widget>
+ <widget class="QPushButton" name="pauseButton">
+ <property name="geometry">
+ <rect>
+ <x>1120</x>
+ <y>520</y>
+ <width>101</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Pause</string>
+ </property>
+ </widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">