commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10920 - gnuradio/trunk/gr-qtgui/src/python


From: trondeau
Subject: [Commit-gnuradio] r10920 - gnuradio/trunk/gr-qtgui/src/python
Date: Sun, 26 Apr 2009 15:31:06 -0600 (MDT)

Author: trondeau
Date: 2009-04-26 15:31:06 -0600 (Sun, 26 Apr 2009)
New Revision: 10920

Modified:
   gnuradio/trunk/gr-qtgui/src/python/qt_digital.py
   gnuradio/trunk/gr-qtgui/src/python/qt_digital_window.ui
Log:
adding a pause/unpause button to the digital GUI application.

Modified: gnuradio/trunk/gr-qtgui/src/python/qt_digital.py
===================================================================
--- gnuradio/trunk/gr-qtgui/src/python/qt_digital.py    2009-04-26 21:09:20 UTC 
(rev 10919)
+++ gnuradio/trunk/gr-qtgui/src/python/qt_digital.py    2009-04-26 21:31:06 UTC 
(rev 10920)
@@ -35,7 +35,11 @@
         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 @@
                      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)

Modified: gnuradio/trunk/gr-qtgui/src/python/qt_digital_window.ui
===================================================================
--- gnuradio/trunk/gr-qtgui/src/python/qt_digital_window.ui     2009-04-26 
21:09:20 UTC (rev 10919)
+++ gnuradio/trunk/gr-qtgui/src/python/qt_digital_window.ui     2009-04-26 
21:31:06 UTC (rev 10920)
@@ -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">





reply via email to

[Prev in Thread] Current Thread [Next in Thread]