diff options
Diffstat (limited to 'gr-qtgui/src')
-rwxr-xr-x | gr-qtgui/src/python/qt_digital.py | 13 | ||||
-rw-r--r-- | gr-qtgui/src/python/qt_digital_window.ui | 13 |
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"> |