summaryrefslogtreecommitdiff
path: root/gr-qtgui
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui')
-rw-r--r--gr-qtgui/CMakeLists.txt30
-rw-r--r--gr-qtgui/examples/c++/CMakeLists.txt8
-rwxr-xr-xgr-qtgui/examples/pyqt_const_c.py62
-rwxr-xr-xgr-qtgui/examples/pyqt_example_c.py59
-rwxr-xr-xgr-qtgui/examples/pyqt_example_f.py59
-rwxr-xr-xgr-qtgui/examples/pyqt_freq_c.py59
-rwxr-xr-xgr-qtgui/examples/pyqt_freq_f.py60
-rwxr-xr-xgr-qtgui/examples/pyqt_histogram_f.py73
-rwxr-xr-xgr-qtgui/examples/pyqt_time_c.py66
-rwxr-xr-xgr-qtgui/examples/pyqt_time_f.py67
-rwxr-xr-xgr-qtgui/examples/pyqt_time_raster_b.py19
-rwxr-xr-xgr-qtgui/examples/pyqt_time_raster_f.py19
-rwxr-xr-xgr-qtgui/examples/pyqt_waterfall_c.py59
-rwxr-xr-xgr-qtgui/examples/pyqt_waterfall_f.py62
-rw-r--r--gr-qtgui/examples/qtgui_tags_viewing.grc2243
-rw-r--r--gr-qtgui/grc/CMakeLists.txt27
-rw-r--r--gr-qtgui/grc/qtgui_ber_sink_b.xml2
-rw-r--r--gr-qtgui/grc/qtgui_check_box.xml2
-rw-r--r--gr-qtgui/grc/qtgui_chooser.xml4
-rw-r--r--gr-qtgui/grc/qtgui_const_sink_x.xml2
-rw-r--r--gr-qtgui/grc/qtgui_edit_box_msg.xml2
-rw-r--r--gr-qtgui/grc/qtgui_entry.xml2
-rw-r--r--gr-qtgui/grc/qtgui_freq_sink_x.xml2
-rw-r--r--gr-qtgui/grc/qtgui_histogram_sink_x.xml2
-rw-r--r--gr-qtgui/grc/qtgui_label.xml2
-rw-r--r--gr-qtgui/grc/qtgui_number_sink.xml2
-rw-r--r--gr-qtgui/grc/qtgui_push_button.xml2
-rw-r--r--gr-qtgui/grc/qtgui_sink_x.xml2
-rw-r--r--gr-qtgui/grc/qtgui_tab_widget.xml2
-rw-r--r--gr-qtgui/grc/qtgui_time_raster_x.xml2
-rw-r--r--gr-qtgui/grc/qtgui_time_sink_x.xml2
-rw-r--r--gr-qtgui/grc/qtgui_vector_sink_f.xml2
-rw-r--r--gr-qtgui/grc/qtgui_waterfall_sink_x.xml2
-rw-r--r--gr-qtgui/include/QtWidgets/QRegExpValidator9
-rw-r--r--gr-qtgui/include/gnuradio/qtgui/form_menus.h5
-rw-r--r--gr-qtgui/lib/CMakeLists.txt10
-rw-r--r--gr-qtgui/lib/SpectrumGUIClass.cc1
-rw-r--r--gr-qtgui/lib/const_sink_c_impl.cc2
-rw-r--r--gr-qtgui/lib/edit_box_msg_impl.cc4
-rw-r--r--gr-qtgui/lib/freq_sink_c_impl.cc2
-rw-r--r--gr-qtgui/lib/freq_sink_f_impl.cc2
-rw-r--r--gr-qtgui/lib/histogram_sink_f_impl.cc2
-rw-r--r--gr-qtgui/lib/sink_c_impl.cc2
-rw-r--r--gr-qtgui/lib/sink_f_impl.cc2
-rw-r--r--gr-qtgui/lib/time_raster_sink_b_impl.cc2
-rw-r--r--gr-qtgui/lib/time_raster_sink_f_impl.cc2
-rw-r--r--gr-qtgui/lib/time_sink_c_impl.cc2
-rw-r--r--gr-qtgui/lib/time_sink_f_impl.cc2
-rw-r--r--gr-qtgui/lib/vector_sink_f_impl.cc2
-rw-r--r--gr-qtgui/lib/waterfall_sink_c_impl.cc2
-rw-r--r--gr-qtgui/lib/waterfall_sink_f_impl.cc2
-rw-r--r--gr-qtgui/python/qtgui/CMakeLists.txt10
-rwxr-xr-xgr-qtgui/python/qtgui/range.py.cmakein (renamed from gr-qtgui/python/qtgui/range.py)27
-rw-r--r--gr-qtgui/themes/dark.qss1
54 files changed, 2214 insertions, 887 deletions
diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt
index 80bb8b3bdb..e467567b1c 100644
--- a/gr-qtgui/CMakeLists.txt
+++ b/gr-qtgui/CMakeLists.txt
@@ -22,14 +22,27 @@
########################################################################
include(GrBoost)
-find_package(Qt4 4.2.0 COMPONENTS QtCore QtGui)
-
-find_package(Qwt)
-
find_package(PythonLibs 2)
include(GrPython)
-GR_PYTHON_CHECK_MODULE("PyQt4" PyQt4 True PYQT4_FOUND)
+
+set(DESIRED_QT_VERSION 5 CACHE STRING "The Qt version to use (4 or 5)")
+set_property(CACHE DESIRED_QT_VERSION PROPERTY STRINGS 4 5)
+
+if (DESIRED_QT_VERSION MATCHES 4)
+ find_package(Qt4 COMPONENTS QtCore QtGui)
+ set(QT_FOUND ${Qt4_FOUND})
+ include(GrSetupQt4)
+else()
+ find_package(Qt5Widgets)
+ set(QT_FOUND ${Qt5Widgets_FOUND})
+ set(QT_LIBRARIES ${Qt5Widgets_LIBRARIES})
+ set(QT_INCLUDE_DIRS ${Qt5Widgets_INCLUDE_DIRS})
+endif()
+
+GR_PYTHON_CHECK_MODULE("PyQt${DESIRED_QT_VERSION}" PyQt${DESIRED_QT_VERSION} True PYQT${DESIRED_QT_VERSION}_FOUND)
+
+find_package(Qwt)
########################################################################
# Register component
@@ -37,13 +50,13 @@ GR_PYTHON_CHECK_MODULE("PyQt4" PyQt4 True PYQT4_FOUND)
include(GrComponent)
if(NOT CMAKE_CROSSCOMPILING)
set(qt_gui_python_deps
- PYQT4_FOUND
+ PYQT${DESIRED_QT_VERSION}_FOUND
)
endif(NOT CMAKE_CROSSCOMPILING)
GR_REGISTER_COMPONENT("gr-qtgui" ENABLE_GR_QTGUI
Boost_FOUND
- QT4_FOUND
+ QT_FOUND
QWT_FOUND
ENABLE_VOLK
ENABLE_GNURADIO_RUNTIME
@@ -66,9 +79,6 @@ SET(GR_PKG_QTGUI_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/qt-gui)
########################################################################
if(ENABLE_GR_QTGUI)
-# populate the environment with QT variables
-include(GrSetupQt4)
-
########################################################################
# Add subdirectories
########################################################################
diff --git a/gr-qtgui/examples/c++/CMakeLists.txt b/gr-qtgui/examples/c++/CMakeLists.txt
index f7c61bc316..fb0b19a6d9 100644
--- a/gr-qtgui/examples/c++/CMakeLists.txt
+++ b/gr-qtgui/examples/c++/CMakeLists.txt
@@ -36,9 +36,15 @@ list(APPEND QTGUI_LIBRARIES
gnuradio-fft
gnuradio-runtime
${QWT_LIBRARY_DIRS}
+ ${QT_LIBRARIES}
)
-QT4_WRAP_CPP(qtgui_moc_sources display_qt.h)
+if (${DESIRED_QT_VERSION} MATCHES 4)
+ QT4_WRAP_CPP(qtgui_moc_sources display_qt.h)
+else()
+ QT5_WRAP_CPP(qtgui_moc_sources display_qt.h)
+endif()
+
add_executable(display_qt display_qt.cc ${qtgui_moc_sources})
target_link_libraries(display_qt ${QTGUI_LIBRARIES})
diff --git a/gr-qtgui/examples/pyqt_const_c.py b/gr-qtgui/examples/pyqt_const_c.py
index 3a43bf9a92..0bb6c20d59 100755
--- a/gr-qtgui/examples/pyqt_const_c.py
+++ b/gr-qtgui/examples/pyqt_const_c.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2011,2012 Free Software Foundation, Inc.
+# Copyright 2011,2012,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,10 +26,10 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
- sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
+ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
sys.exit(1)
try:
@@ -44,71 +44,65 @@ except ImportError:
sys.stderr.write("Error: Program requires gr-channels.\n")
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display, control):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.boxlayout.addWidget(control)
self.resize(800, 500)
-class control_box(QtGui.QWidget):
+class control_box(QtWidgets.QWidget):
def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.setWindowTitle('Control Panel')
self.setToolTip('Control the signals')
- QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
+ QtWidgets.QToolTip.setFont(Qt.QFont('OldEnglish', 10))
- self.layout = QtGui.QFormLayout(self)
+ self.layout = QtWidgets.QFormLayout(self)
# Control the first signal
- self.freq1Edit = QtGui.QLineEdit(self)
+ self.freq1Edit = QtWidgets.QLineEdit(self)
self.freq1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Frequency:", self.freq1Edit)
- self.connect(self.freq1Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq1EditText)
+ self.freq1Edit.editingFinished.connect(self.freq1EditText)
- self.amp1Edit = QtGui.QLineEdit(self)
+ self.amp1Edit = QtWidgets.QLineEdit(self)
self.amp1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Amplitude:", self.amp1Edit)
- self.connect(self.amp1Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp1EditText)
+ self.amp1Edit.editingFinished.connect(self.amp1EditText)
# Control the second signal
- self.freq2Edit = QtGui.QLineEdit(self)
+ self.freq2Edit = QtWidgets.QLineEdit(self)
self.freq2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Frequency:", self.freq2Edit)
- self.connect(self.freq2Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq2EditText)
+ self.freq2Edit.editingFinished.connect(self.freq2EditText)
- self.amp2Edit = QtGui.QLineEdit(self)
+ self.amp2Edit = QtWidgets.QLineEdit(self)
self.amp2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Amplitude:", self.amp2Edit)
- self.connect(self.amp2Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp2EditText)
+ self.amp2Edit.editingFinished.connect(self.amp2EditText)
- self.quit = QtGui.QPushButton('Close', self)
+ self.quit = QtWidgets.QPushButton('Close', self)
self.quit.setMinimumWidth(100)
+ self.quit.clicked.connect(QtWidgets.qApp.quit)
self.layout.addWidget(self.quit)
- self.connect(self.quit, QtCore.SIGNAL('clicked()'),
- QtGui.qApp, QtCore.SLOT('quit()'))
-
def attach_signal1(self, signal):
self.signal1 = signal
- self.freq1Edit.setText(QtCore.QString("%1").arg(self.signal1.frequency()))
- self.amp1Edit.setText(QtCore.QString("%1").arg(self.signal1.amplitude()))
+ self.freq1Edit.setText("{0}".format(self.signal1.frequency()))
+ self.amp1Edit.setText("{0}".format(self.signal1.amplitude()))
def attach_signal2(self, signal):
self.signal2 = signal
- self.freq2Edit.setText(QtCore.QString("%1").arg(self.signal2.frequency()))
- self.amp2Edit.setText(QtCore.QString("%1").arg(self.signal2.amplitude()))
+ self.freq2Edit.setText("{0}".format(self.signal2.frequency()))
+ self.amp2Edit.setText("{0}".format(self.signal2.amplitude()))
def freq1EditText(self):
try:
@@ -150,7 +144,7 @@ class my_top_block(gr.top_block):
npts = 2048
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
src1 = analog.sig_source_c(Rs, analog.GR_SIN_WAVE, f1, 0.5, 0)
src2 = analog.sig_source_c(Rs, analog.GR_SIN_WAVE, f2, 0.5, 0)
@@ -158,6 +152,7 @@ class my_top_block(gr.top_block):
channel = channels.channel_model(0.001)
thr = blocks.throttle(gr.sizeof_gr_complex, 100*npts)
self.snk1 = qtgui.const_sink_c(npts, "Constellation Example", 1)
+ self.snk1.disable_legend()
self.connect(src1, (src,0))
self.connect(src2, (src,1))
@@ -171,8 +166,8 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
self.main_box = dialog_box(pyWin, self.ctrl_win)
self.main_box.show()
@@ -182,4 +177,3 @@ if __name__ == "__main__":
tb.start()
tb.qapp.exec_()
tb.stop()
-
diff --git a/gr-qtgui/examples/pyqt_example_c.py b/gr-qtgui/examples/pyqt_example_c.py
index 1bf61d949d..89ca7b2820 100755
--- a/gr-qtgui/examples/pyqt_example_c.py
+++ b/gr-qtgui/examples/pyqt_example_c.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2011,2012 Free Software Foundation, Inc.
+# Copyright 2011,2012,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,10 +26,10 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
- sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
+ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
sys.exit(1)
try:
@@ -44,71 +44,66 @@ except ImportError:
sys.stderr.write("Error: Program requires gr-channels.\n")
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display, control):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.boxlayout.addWidget(control)
self.resize(800, 500)
-class control_box(QtGui.QWidget):
+class control_box(QtWidgets.QWidget):
def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.setWindowTitle('Control Panel')
self.setToolTip('Control the signals')
- QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
+ QtWidgets.QToolTip.setFont(Qt.QFont('OldEnglish', 10))
- self.layout = QtGui.QFormLayout(self)
+ self.layout = QtWidgets.QFormLayout(self)
# Control the first signal
- self.freq1Edit = QtGui.QLineEdit(self)
+ self.freq1Edit = QtWidgets.QLineEdit(self)
self.freq1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Frequency:", self.freq1Edit)
- self.connect(self.freq1Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq1EditText)
+ self.freq1Edit.editingFinished.connect(self.freq1EditText)
- self.amp1Edit = QtGui.QLineEdit(self)
+ self.amp1Edit = QtWidgets.QLineEdit(self)
self.amp1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Amplitude:", self.amp1Edit)
- self.connect(self.amp1Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp1EditText)
+ self.amp1Edit.editingFinished.connect(self.amp1EditText)
# Control the second signal
- self.freq2Edit = QtGui.QLineEdit(self)
+ self.freq2Edit = QtWidgets.QLineEdit(self)
self.freq2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Frequency:", self.freq2Edit)
- self.connect(self.freq2Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq2EditText)
+ self.freq2Edit.editingFinished.connect(self.freq2EditText)
- self.amp2Edit = QtGui.QLineEdit(self)
+ self.amp2Edit = QtWidgets.QLineEdit(self)
self.amp2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Amplitude:", self.amp2Edit)
- self.connect(self.amp2Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp2EditText)
+ self.amp2Edit.editingFinished.connect(self.amp2EditText)
- self.quit = QtGui.QPushButton('Close', self)
+ self.quit = QtWidgets.QPushButton('Close', self)
self.quit.setMinimumWidth(100)
self.layout.addWidget(self.quit)
- self.connect(self.quit, QtCore.SIGNAL('clicked()'),
- QtGui.qApp, QtCore.SLOT('quit()'))
+ self.quit.clicked.connect(QtWidgets.qApp.quit)
def attach_signal1(self, signal):
self.signal1 = signal
- self.freq1Edit.setText(QtCore.QString("%1").arg(self.signal1.frequency()))
- self.amp1Edit.setText(QtCore.QString("%1").arg(self.signal1.amplitude()))
+ self.freq1Edit.setText(("{0}").format(self.signal1.frequency()))
+ self.amp1Edit.setText(("{0}").format(self.signal1.amplitude()))
def attach_signal2(self, signal):
self.signal2 = signal
- self.freq2Edit.setText(QtCore.QString("%1").arg(self.signal2.frequency()))
- self.amp2Edit.setText(QtCore.QString("%1").arg(self.signal2.amplitude()))
+ self.freq2Edit.setText(("{0}").format(self.signal2.frequency()))
+ self.amp2Edit.setText(("{0}").format(self.signal2.amplitude()))
def freq1EditText(self):
try:
@@ -150,7 +145,7 @@ class my_top_block(gr.top_block):
fftsize = 2048
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
ss = open(gr.prefix() + '/share/gnuradio/themes/dark.qss')
sstext = ss.read()
ss.close()
@@ -178,8 +173,8 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
self.main_box = dialog_box(pyWin, self.ctrl_win)
diff --git a/gr-qtgui/examples/pyqt_example_f.py b/gr-qtgui/examples/pyqt_example_f.py
index 5bd582d1e1..77a7478aa2 100755
--- a/gr-qtgui/examples/pyqt_example_f.py
+++ b/gr-qtgui/examples/pyqt_example_f.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2011,2012 Free Software Foundation, Inc.
+# Copyright 2011,2012,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,10 +26,10 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
- sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
+ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
sys.exit(1)
try:
@@ -38,71 +38,66 @@ except ImportError:
sys.stderr.write("Error: Program requires gr-analog.\n")
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display, control):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.boxlayout.addWidget(control)
self.resize(800, 500)
-class control_box(QtGui.QWidget):
+class control_box(QtWidgets.QWidget):
def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.setWindowTitle('Control Panel')
self.setToolTip('Control the signals')
- QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
+ QtWidgets.QToolTip.setFont(Qt.QFont('OldEnglish', 10))
- self.layout = QtGui.QFormLayout(self)
+ self.layout = QtWidgets.QFormLayout(self)
# Control the first signal
- self.freq1Edit = QtGui.QLineEdit(self)
+ self.freq1Edit = QtWidgets.QLineEdit(self)
self.freq1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Frequency:", self.freq1Edit)
- self.connect(self.freq1Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq1EditText)
+ self.freq1Edit.editingFinished.connect(self.freq1EditText)
- self.amp1Edit = QtGui.QLineEdit(self)
+ self.amp1Edit = QtWidgets.QLineEdit(self)
self.amp1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Amplitude:", self.amp1Edit)
- self.connect(self.amp1Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp1EditText)
+ self.amp1Edit.editingFinished.connect(self.amp1EditText)
# Control the second signal
- self.freq2Edit = QtGui.QLineEdit(self)
+ self.freq2Edit = QtWidgets.QLineEdit(self)
self.freq2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Frequency:", self.freq2Edit)
- self.connect(self.freq2Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq2EditText)
+ self.freq2Edit.editingFinished.connect(self.freq2EditText)
- self.amp2Edit = QtGui.QLineEdit(self)
+ self.amp2Edit = QtWidgets.QLineEdit(self)
self.amp2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Amplitude:", self.amp2Edit)
- self.connect(self.amp2Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp2EditText)
+ self.amp2Edit.editingFinished.connect(self.amp2EditText)
- self.quit = QtGui.QPushButton('Close', self)
+ self.quit = QtWidgets.QPushButton('Close', self)
self.quit.setMinimumWidth(100)
self.layout.addWidget(self.quit)
- self.connect(self.quit, QtCore.SIGNAL('clicked()'),
- QtGui.qApp, QtCore.SLOT('quit()'))
+ self.quit.clicked.connect(QtWidgets.qApp.quit)
def attach_signal1(self, signal):
self.signal1 = signal
- self.freq1Edit.setText(QtCore.QString("%1").arg(self.signal1.frequency()))
- self.amp1Edit.setText(QtCore.QString("%1").arg(self.signal1.amplitude()))
+ self.freq1Edit.setText(("{0}").format(self.signal1.frequency()))
+ self.amp1Edit.setText(("{0}").format(self.signal1.amplitude()))
def attach_signal2(self, signal):
self.signal2 = signal
- self.freq2Edit.setText(QtCore.QString("%1").arg(self.signal2.frequency()))
- self.amp2Edit.setText(QtCore.QString("%1").arg(self.signal2.amplitude()))
+ self.freq2Edit.setText(("{0}").format(self.signal2.frequency()))
+ self.amp2Edit.setText(("{0}").format(self.signal2.amplitude()))
def freq1EditText(self):
try:
@@ -144,7 +139,7 @@ class my_top_block(gr.top_block):
fftsize = 2048
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
src1 = analog.sig_source_f(Rs, analog.GR_SIN_WAVE, f1, 0.1, 0)
src2 = analog.sig_source_f(Rs, analog.GR_SIN_WAVE, f2, 0.1, 0)
@@ -171,8 +166,8 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
self.main_box = dialog_box(pyWin, self.ctrl_win)
diff --git a/gr-qtgui/examples/pyqt_freq_c.py b/gr-qtgui/examples/pyqt_freq_c.py
index c53feb93d4..954a078df8 100755
--- a/gr-qtgui/examples/pyqt_freq_c.py
+++ b/gr-qtgui/examples/pyqt_freq_c.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,10 +26,10 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
- sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
+ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
sys.exit(1)
try:
@@ -44,71 +44,66 @@ except ImportError:
sys.stderr.write("Error: Program requires gr-channels.\n")
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display, control):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.boxlayout.addWidget(control)
self.resize(800, 500)
-class control_box(QtGui.QWidget):
+class control_box(QtWidgets.QWidget):
def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.setWindowTitle('Control Panel')
self.setToolTip('Control the signals')
- QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
+ QtWidgets.QToolTip.setFont(Qt.QFont('OldEnglish', 10))
- self.layout = QtGui.QFormLayout(self)
+ self.layout = QtWidgets.QFormLayout(self)
# Control the first signal
- self.freq1Edit = QtGui.QLineEdit(self)
+ self.freq1Edit = QtWidgets.QLineEdit(self)
self.freq1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Frequency:", self.freq1Edit)
- self.connect(self.freq1Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq1EditText)
+ self.freq1Edit.editingFinished.connect(self.freq1EditText)
- self.amp1Edit = QtGui.QLineEdit(self)
+ self.amp1Edit = QtWidgets.QLineEdit(self)
self.amp1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Amplitude:", self.amp1Edit)
- self.connect(self.amp1Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp1EditText)
+ self.amp1Edit.editingFinished.connect(self.amp1EditText)
# Control the second signal
- self.freq2Edit = QtGui.QLineEdit(self)
+ self.freq2Edit = QtWidgets.QLineEdit(self)
self.freq2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Frequency:", self.freq2Edit)
- self.connect(self.freq2Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq2EditText)
+ self.freq2Edit.editingFinished.connect(self.freq2EditText)
- self.amp2Edit = QtGui.QLineEdit(self)
+ self.amp2Edit = QtWidgets.QLineEdit(self)
self.amp2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Amplitude:", self.amp2Edit)
- self.connect(self.amp2Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp2EditText)
+ self.amp2Edit.editingFinished.connect(self.amp2EditText)
- self.quit = QtGui.QPushButton('Close', self)
+ self.quit = QtWidgets.QPushButton('Close', self)
self.quit.setMinimumWidth(100)
self.layout.addWidget(self.quit)
- self.connect(self.quit, QtCore.SIGNAL('clicked()'),
- QtGui.qApp, QtCore.SLOT('quit()'))
+ self.quit.clicked.connect(QtWidgets.qApp.quit)
def attach_signal1(self, signal):
self.signal1 = signal
- self.freq1Edit.setText(QtCore.QString("%1").arg(self.signal1.frequency()))
- self.amp1Edit.setText(QtCore.QString("%1").arg(self.signal1.amplitude()))
+ self.freq1Edit.setText(("{0}").format(self.signal1.frequency()))
+ self.amp1Edit.setText(("{0}").format(self.signal1.amplitude()))
def attach_signal2(self, signal):
self.signal2 = signal
- self.freq2Edit.setText(QtCore.QString("%1").arg(self.signal2.frequency()))
- self.amp2Edit.setText(QtCore.QString("%1").arg(self.signal2.amplitude()))
+ self.freq2Edit.setText(("{0}").format(self.signal2.frequency()))
+ self.amp2Edit.setText(("{0}").format(self.signal2.amplitude()))
def freq1EditText(self):
try:
@@ -150,7 +145,7 @@ class my_top_block(gr.top_block):
npts = 2048
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
ss = open(gr.prefix() + '/share/gnuradio/themes/dark.qss')
sstext = ss.read()
ss.close()
@@ -179,8 +174,8 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
#pyWin.show()
self.main_box = dialog_box(pyWin, self.ctrl_win)
diff --git a/gr-qtgui/examples/pyqt_freq_f.py b/gr-qtgui/examples/pyqt_freq_f.py
index 668b54d249..d7d389b736 100755
--- a/gr-qtgui/examples/pyqt_freq_f.py
+++ b/gr-qtgui/examples/pyqt_freq_f.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,10 +26,10 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
- sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
+ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
sys.exit(1)
try:
@@ -39,71 +39,66 @@ except ImportError:
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display, control):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.boxlayout.addWidget(control)
self.resize(800, 500)
-class control_box(QtGui.QWidget):
+class control_box(QtWidgets.QWidget):
def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.setWindowTitle('Control Panel')
self.setToolTip('Control the signals')
- QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
+ QtWidgets.QToolTip.setFont(Qt.QFont('OldEnglish', 10))
- self.layout = QtGui.QFormLayout(self)
+ self.layout = QtWidgets.QFormLayout(self)
# Control the first signal
- self.freq1Edit = QtGui.QLineEdit(self)
+ self.freq1Edit = QtWidgets.QLineEdit(self)
self.freq1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Frequency:", self.freq1Edit)
- self.connect(self.freq1Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq1EditText)
+ self.freq1Edit.editingFinished.connect(self.freq1EditText)
- self.amp1Edit = QtGui.QLineEdit(self)
+ self.amp1Edit = QtWidgets.QLineEdit(self)
self.amp1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Amplitude:", self.amp1Edit)
- self.connect(self.amp1Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp1EditText)
+ self.amp1Edit.editingFinished.connect(self.amp1EditText)
# Control the second signal
- self.freq2Edit = QtGui.QLineEdit(self)
+ self.freq2Edit = QtWidgets.QLineEdit(self)
self.freq2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Frequency:", self.freq2Edit)
- self.connect(self.freq2Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq2EditText)
+ self.freq2Edit.editingFinished.connect(self.freq2EditText)
- self.amp2Edit = QtGui.QLineEdit(self)
+ self.amp2Edit = QtWidgets.QLineEdit(self)
self.amp2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Amplitude:", self.amp2Edit)
- self.connect(self.amp2Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp2EditText)
+ self.amp2Edit.editingFinished.connect(self.amp2EditText)
- self.quit = QtGui.QPushButton('Close', self)
+ self.quit = QtWidgets.QPushButton('Close', self)
self.quit.setMinimumWidth(100)
self.layout.addWidget(self.quit)
- self.connect(self.quit, QtCore.SIGNAL('clicked()'),
- QtGui.qApp, QtCore.SLOT('quit()'))
+ self.quit.clicked.connect(QtWidgets.qApp.quit)
def attach_signal1(self, signal):
self.signal1 = signal
- self.freq1Edit.setText(QtCore.QString("%1").arg(self.signal1.frequency()))
- self.amp1Edit.setText(QtCore.QString("%1").arg(self.signal1.amplitude()))
+ self.freq1Edit.setText(("{0}").format(self.signal1.frequency()))
+ self.amp1Edit.setText(("{0}").format(self.signal1.amplitude()))
def attach_signal2(self, signal):
self.signal2 = signal
- self.freq2Edit.setText(QtCore.QString("%1").arg(self.signal2.frequency()))
- self.amp2Edit.setText(QtCore.QString("%1").arg(self.signal2.amplitude()))
+ self.freq2Edit.setText(("{0}").format(self.signal2.frequency()))
+ self.amp2Edit.setText(("{0}").format(self.signal2.amplitude()))
def freq1EditText(self):
try:
@@ -145,7 +140,7 @@ class my_top_block(gr.top_block):
npts = 2048
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
src1 = analog.sig_source_f(Rs, analog.GR_SIN_WAVE, f1, 0.1, 0)
src2 = analog.sig_source_f(Rs, analog.GR_SIN_WAVE, f2, 0.1, 0)
@@ -169,8 +164,8 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
#pyWin.show()
self.main_box = dialog_box(pyWin, self.ctrl_win)
@@ -181,4 +176,3 @@ if __name__ == "__main__":
tb.start()
tb.qapp.exec_()
tb.stop()
-
diff --git a/gr-qtgui/examples/pyqt_histogram_f.py b/gr-qtgui/examples/pyqt_histogram_f.py
index a960275f41..81f7b9d40b 100755
--- a/gr-qtgui/examples/pyqt_histogram_f.py
+++ b/gr-qtgui/examples/pyqt_histogram_f.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,10 +26,10 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
- sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
+ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
sys.exit(1)
try:
@@ -38,87 +38,80 @@ except ImportError:
sys.stderr.write("Error: Program requires gr-analog.\n")
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display, control):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.boxlayout.addWidget(control)
self.resize(800, 500)
-class control_box(QtGui.QWidget):
+class control_box(QtWidgets.QWidget):
def __init__(self, snk, parent=None):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.setWindowTitle('Control Panel')
self.snk = snk
self.setToolTip('Control the signals')
- QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
+ QtWidgets.QToolTip.setFont(Qt.QFont('OldEnglish', 10))
- self.layout = QtGui.QFormLayout(self)
+ self.layout = QtWidgets.QFormLayout(self)
# Control the first signal
- self.freq1Edit = QtGui.QLineEdit(self)
+ self.freq1Edit = QtWidgets.QLineEdit(self)
self.freq1Edit.setMinimumWidth(100)
self.layout.addRow("Sine Frequency:", self.freq1Edit)
- self.connect(self.freq1Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq1EditText)
+ self.freq1Edit.editingFinished.connect(self.freq1EditText)
- self.amp1Edit = QtGui.QLineEdit(self)
+ self.amp1Edit = QtWidgets.QLineEdit(self)
self.amp1Edit.setMinimumWidth(100)
self.layout.addRow("Sine Amplitude:", self.amp1Edit)
- self.connect(self.amp1Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp1EditText)
+ self.amp1Edit.editingFinished.connect(self.amp1EditText)
# Control the second signal
- self.amp2Edit = QtGui.QLineEdit(self)
+ self.amp2Edit = QtWidgets.QLineEdit(self)
self.amp2Edit.setMinimumWidth(100)
self.layout.addRow("Noise Amplitude:", self.amp2Edit)
- self.connect(self.amp2Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp2EditText)
+ self.amp2Edit.editingFinished.connect(self.amp2EditText)
# Control the histogram
- self.hist_npts = QtGui.QLineEdit(self)
+ self.hist_npts = QtWidgets.QLineEdit(self)
self.hist_npts.setMinimumWidth(100)
- self.hist_npts.setValidator(QtGui.QIntValidator(0, 8191))
+ self.hist_npts.setValidator(Qt.QIntValidator(0, 8191))
self.hist_npts.setText("{0}".format(self.snk.nsamps()))
self.layout.addRow("Number of Points:", self.hist_npts)
- self.connect(self.hist_npts, QtCore.SIGNAL("editingFinished()"),
- self.set_nsamps)
+ self.hist_npts.editingFinished.connect(self.set_nsamps)
- self.hist_bins = QtGui.QLineEdit(self)
+ self.hist_bins = QtWidgets.QLineEdit(self)
self.hist_bins.setMinimumWidth(100)
- self.hist_bins.setValidator(QtGui.QIntValidator(0, 1000))
+ self.hist_bins.setValidator(Qt.QIntValidator(0, 1000))
self.hist_bins.setText("{0}".format(self.snk.bins()))
self.layout.addRow("Number of Bins:", self.hist_bins)
- self.connect(self.hist_bins, QtCore.SIGNAL("editingFinished()"),
- self.set_bins)
+ self.hist_bins.editingFinished.connect(self.set_bins)
- self.hist_auto = QtGui.QPushButton("scale", self)
+ self.hist_auto = QtWidgets.QPushButton("scale", self)
self.layout.addRow("Autoscale X:", self.hist_auto)
- self.connect(self.hist_auto, QtCore.SIGNAL("pressed()"),
- self.autoscalex)
+ self.hist_auto.pressed.connect(self.autoscalex)
- self.quit = QtGui.QPushButton('Close', self)
+ self.quit = QtWidgets.QPushButton('Close', self)
self.quit.setMinimumWidth(100)
self.layout.addWidget(self.quit)
- self.connect(self.quit, QtCore.SIGNAL('clicked()'),
- QtGui.qApp, QtCore.SLOT('quit()'))
+ self.quit.clicked.connect(QtWidgets.qApp.quit)
def attach_signal1(self, signal):
self.signal1 = signal
- self.freq1Edit.setText(QtCore.QString("%1").arg(self.signal1.frequency()))
- self.amp1Edit.setText(QtCore.QString("%1").arg(self.signal1.amplitude()))
+ self.freq1Edit.setText(("{0}").format(self.signal1.frequency()))
+ self.amp1Edit.setText(("{0}").format(self.signal1.amplitude()))
def attach_signal2(self, signal):
self.signal2 = signal
- self.amp2Edit.setText(QtCore.QString("%1").arg(self.signal2.amplitude()))
+ self.amp2Edit.setText(("{0}").format(self.signal2.amplitude()))
def freq1EditText(self):
try:
@@ -164,7 +157,7 @@ class my_top_block(gr.top_block):
npts = 2048
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
src1 = analog.sig_source_f(Rs, analog.GR_SIN_WAVE, f1, 0, 0)
src2 = analog.noise_source_f(analog.GR_GAUSSIAN, 1)
@@ -172,6 +165,7 @@ class my_top_block(gr.top_block):
thr = blocks.throttle(gr.sizeof_float, 100*npts)
self.snk1 = qtgui.histogram_sink_f(npts, 200, -5, 5,
"Histogram")
+ self.snk1.disable_legend()
self.connect(src1, (src,0))
self.connect(src2, (src,1))
@@ -185,8 +179,8 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
#pyWin.show()
self.main_box = dialog_box(pyWin, self.ctrl_win)
@@ -197,4 +191,3 @@ if __name__ == "__main__":
tb.start()
tb.qapp.exec_()
tb.stop()
-
diff --git a/gr-qtgui/examples/pyqt_time_c.py b/gr-qtgui/examples/pyqt_time_c.py
index 0162bb6ffc..b595c8ff85 100755
--- a/gr-qtgui/examples/pyqt_time_c.py
+++ b/gr-qtgui/examples/pyqt_time_c.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2011,2012 Free Software Foundation, Inc.
+# Copyright 2011,2012,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,10 +26,10 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
- sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
+ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
sys.exit(1)
try:
@@ -44,71 +44,66 @@ except ImportError:
sys.stderr.write("Error: Program requires gr-channels.\n")
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display, control):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.boxlayout.addWidget(control)
self.resize(800, 500)
-class control_box(QtGui.QWidget):
+class control_box(QtWidgets.QWidget):
def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.setWindowTitle('Control Panel')
self.setToolTip('Control the signals')
- QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
+ QtWidgets.QToolTip.setFont(Qt.QFont('OldEnglish', 10))
- self.layout = QtGui.QFormLayout(self)
+ self.layout = QtWidgets.QFormLayout(self)
# Control the first signal
- self.freq1Edit = QtGui.QLineEdit(self)
+ self.freq1Edit = QtWidgets.QLineEdit(self)
self.freq1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Frequency:", self.freq1Edit)
- self.connect(self.freq1Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq1EditText)
+ self.freq1Edit.editingFinished.connect(self.freq1EditText)
- self.amp1Edit = QtGui.QLineEdit(self)
+ self.amp1Edit = QtWidgets.QLineEdit(self)
self.amp1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Amplitude:", self.amp1Edit)
- self.connect(self.amp1Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp1EditText)
+ self.amp1Edit.editingFinished.connect(self.amp1EditText)
# Control the second signal
- self.freq2Edit = QtGui.QLineEdit(self)
+ self.freq2Edit = QtWidgets.QLineEdit(self)
self.freq2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Frequency:", self.freq2Edit)
- self.connect(self.freq2Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq2EditText)
+ self.freq2Edit.editingFinished.connect(self.freq2EditText)
- self.amp2Edit = QtGui.QLineEdit(self)
+ self.amp2Edit = QtWidgets.QLineEdit(self)
self.amp2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Amplitude:", self.amp2Edit)
- self.connect(self.amp2Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp2EditText)
+ self.amp2Edit.editingFinished.connect(self.amp2EditText)
- self.quit = QtGui.QPushButton('Close', self)
+ self.quit = QtWidgets.QPushButton('Close', self)
self.quit.setMinimumWidth(100)
self.layout.addWidget(self.quit)
- self.connect(self.quit, QtCore.SIGNAL('clicked()'),
- QtGui.qApp, QtCore.SLOT('quit()'))
+ self.quit.clicked.connect(QtWidgets.qApp.quit)
def attach_signal1(self, signal):
self.signal1 = signal
- self.freq1Edit.setText(QtCore.QString("%1").arg(self.signal1.frequency()))
- self.amp1Edit.setText(QtCore.QString("%1").arg(self.signal1.amplitude()))
+ self.freq1Edit.setText(("{0}").format(self.signal1.frequency()))
+ self.amp1Edit.setText(("{0}").format(self.signal1.amplitude()))
def attach_signal2(self, signal):
self.signal2 = signal
- self.freq2Edit.setText(QtCore.QString("%1").arg(self.signal2.frequency()))
- self.amp2Edit.setText(QtCore.QString("%1").arg(self.signal2.amplitude()))
+ self.freq2Edit.setText(("{0}").format(self.signal2.frequency()))
+ self.amp2Edit.setText(("{0}").format(self.signal2.amplitude()))
def freq1EditText(self):
try:
@@ -150,7 +145,7 @@ class my_top_block(gr.top_block):
npts = 2048
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
ss = open(gr.prefix() + '/share/gnuradio/themes/dark.qss')
sstext = ss.read()
ss.close()
@@ -178,13 +173,14 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
# Example of using signal/slot to set the title of a curve
- pyWin.connect(pyWin, QtCore.SIGNAL("setLineLabel(int, QString)"),
- pyWin, QtCore.SLOT("setLineLabel(int, QString)"))
- pyWin.emit(QtCore.SIGNAL("setLineLabel(int, QString)"), 0, "Re{sum}")
+ # FIXME: update for Qt5
+ #pyWin.setLineLabel.connect(pyWin.setLineLabel)
+ #pyWin.emit(QtCore.SIGNAL("setLineLabel(int, QString)"), 0, "Re{sum}")
+ self.snk1.set_line_label(0, "Re{Sum}")
self.snk1.set_line_label(1, "Im{Sum}")
#self.snk1.set_line_label(2, "Re{src1}")
#self.snk1.set_line_label(3, "Im{src1}")
diff --git a/gr-qtgui/examples/pyqt_time_f.py b/gr-qtgui/examples/pyqt_time_f.py
index b733a5a809..3689ebff54 100755
--- a/gr-qtgui/examples/pyqt_time_f.py
+++ b/gr-qtgui/examples/pyqt_time_f.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2011,2012 Free Software Foundation, Inc.
+# Copyright 2011,2012,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,10 +26,10 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
- sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
+ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
sys.exit(1)
try:
@@ -38,71 +38,66 @@ except ImportError:
sys.stderr.write("Error: Program requires gr-analog.\n")
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display, control):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.boxlayout.addWidget(control)
self.resize(800, 500)
-class control_box(QtGui.QWidget):
+class control_box(QtWidgets.QWidget):
def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.setWindowTitle('Control Panel')
self.setToolTip('Control the signals')
- QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
+ QtWidgets.QToolTip.setFont(Qt.QFont('OldEnglish', 10))
- self.layout = QtGui.QFormLayout(self)
+ self.layout = QtWidgets.QFormLayout(self)
# Control the first signal
- self.freq1Edit = QtGui.QLineEdit(self)
+ self.freq1Edit = QtWidgets.QLineEdit(self)
self.freq1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Frequency:", self.freq1Edit)
- self.connect(self.freq1Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq1EditText)
+ self.freq1Edit.editingFinished.connect(self.freq1EditText)
- self.amp1Edit = QtGui.QLineEdit(self)
+ self.amp1Edit = QtWidgets.QLineEdit(self)
self.amp1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Amplitude:", self.amp1Edit)
- self.connect(self.amp1Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp1EditText)
+ self.amp1Edit.editingFinished.connect(self.amp1EditText)
# Control the second signal
- self.freq2Edit = QtGui.QLineEdit(self)
+ self.freq2Edit = QtWidgets.QLineEdit(self)
self.freq2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Frequency:", self.freq2Edit)
- self.connect(self.freq2Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq2EditText)
+ self.freq2Edit.editingFinished.connect(self.freq2EditText)
- self.amp2Edit = QtGui.QLineEdit(self)
+ self.amp2Edit = QtWidgets.QLineEdit(self)
self.amp2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Amplitude:", self.amp2Edit)
- self.connect(self.amp2Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp2EditText)
+ self.amp2Edit.editingFinished.connect(self.amp2EditText)
- self.quit = QtGui.QPushButton('Close', self)
+ self.quit = QtWidgets.QPushButton('Close', self)
self.quit.setMinimumWidth(100)
self.layout.addWidget(self.quit)
- self.connect(self.quit, QtCore.SIGNAL('clicked()'),
- QtGui.qApp, QtCore.SLOT('quit()'))
+ self.quit.clicked.connect(QtWidgets.qApp.quit)
def attach_signal1(self, signal):
self.signal1 = signal
- self.freq1Edit.setText(QtCore.QString("%1").arg(self.signal1.frequency()))
- self.amp1Edit.setText(QtCore.QString("%1").arg(self.signal1.amplitude()))
+ self.freq1Edit.setText(("{0}").format(self.signal1.frequency()))
+ self.amp1Edit.setText(("{0}").format(self.signal1.amplitude()))
def attach_signal2(self, signal):
self.signal2 = signal
- self.freq2Edit.setText(QtCore.QString("%1").arg(self.signal2.frequency()))
- self.amp2Edit.setText(QtCore.QString("%1").arg(self.signal2.amplitude()))
+ self.freq2Edit.setText(("{0}").format(self.signal2.frequency()))
+ self.amp2Edit.setText(("{0}").format(self.signal2.amplitude()))
def freq1EditText(self):
try:
@@ -144,7 +139,7 @@ class my_top_block(gr.top_block):
npts = 2048
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
src1 = analog.sig_source_f(Rs, analog.GR_SIN_WAVE, f1, 0.1, 0)
src2 = analog.sig_source_f(Rs, analog.GR_SIN_WAVE, f2, 0.1, 0)
@@ -171,13 +166,14 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
# Example of using signal/slot to set the title of a curve
- pyWin.connect(pyWin, QtCore.SIGNAL("setLineLabel(int, QString)"),
- pyWin, QtCore.SLOT("setLineLabel(int, QString)"))
- pyWin.emit(QtCore.SIGNAL("setLineLabel(int, QString)"), 0, "sum")
+ # FIXME: update for Qt5
+ #pyWin.setLineLabel.connect(pyWin.setLineLabel)
+ #pyWin.emit(QtCore.SIGNAL("setLineLabel(int, QString)"), 0, "Re{sum}")
+ self.snk1.set_line_label(0, "Re{sum}")
self.snk1.set_line_label(1, "src1")
self.snk1.set_line_label(2, "src2")
@@ -193,4 +189,3 @@ if __name__ == "__main__":
tb.start()
tb.qapp.exec_()
tb.stop()
-
diff --git a/gr-qtgui/examples/pyqt_time_raster_b.py b/gr-qtgui/examples/pyqt_time_raster_b.py
index 4cad9de601..7a94400283 100755
--- a/gr-qtgui/examples/pyqt_time_raster_b.py
+++ b/gr-qtgui/examples/pyqt_time_raster_b.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -27,18 +27,18 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
- print "Error: Program requires PyQt4 and gr-qtgui."
+ print "Error: Program requires PyQt5 and gr-qtgui."
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.resize(800, 500)
@@ -47,7 +47,7 @@ class my_top_block(gr.top_block):
def __init__(self):
gr.top_block.__init__(self)
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
data0 = 10*[0,] + 40*[1,0] + 10*[0,]
data0 += 10*[0,] + 40*[0,1] + 10*[0,]
@@ -73,8 +73,8 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
self.main_box = dialog_box(pyWin)
self.main_box.show()
@@ -84,4 +84,3 @@ if __name__ == "__main__":
tb.start()
tb.qapp.exec_()
tb.stop()
-
diff --git a/gr-qtgui/examples/pyqt_time_raster_f.py b/gr-qtgui/examples/pyqt_time_raster_f.py
index c5261520db..0f9de94bcb 100755
--- a/gr-qtgui/examples/pyqt_time_raster_f.py
+++ b/gr-qtgui/examples/pyqt_time_raster_f.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,18 +26,18 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
- print "Error: Program requires PyQt4 and gr-qtgui."
+ print "Error: Program requires PyQt5 and gr-qtgui."
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.resize(800, 500)
@@ -46,7 +46,7 @@ class my_top_block(gr.top_block):
def __init__(self):
gr.top_block.__init__(self)
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
data0 = 10*[0,] + 40*[1,0] + 10*[0,]
data0 += 10*[0,] + 40*[0,1] + 10*[0,]
@@ -72,8 +72,8 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
self.main_box = dialog_box(pyWin)
self.main_box.show()
@@ -83,4 +83,3 @@ if __name__ == "__main__":
tb.start()
tb.qapp.exec_()
tb.stop()
-
diff --git a/gr-qtgui/examples/pyqt_waterfall_c.py b/gr-qtgui/examples/pyqt_waterfall_c.py
index 8ec62fc1e2..3f7119f97f 100755
--- a/gr-qtgui/examples/pyqt_waterfall_c.py
+++ b/gr-qtgui/examples/pyqt_waterfall_c.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,7 +26,7 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
@@ -44,71 +44,66 @@ except ImportError:
sys.stderr.write("Error: Program requires gr-channels.\n")
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display, control):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.boxlayout.addWidget(control)
self.resize(800, 500)
-class control_box(QtGui.QWidget):
+class control_box(QtWidgets.QWidget):
def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.setWindowTitle('Control Panel')
self.setToolTip('Control the signals')
- QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
+ QtWidgets.QToolTip.setFont(Qt.QFont('OldEnglish', 10))
- self.layout = QtGui.QFormLayout(self)
+ self.layout = QtWidgets.QFormLayout(self)
# Control the first signal
- self.freq1Edit = QtGui.QLineEdit(self)
+ self.freq1Edit = QtWidgets.QLineEdit(self)
self.freq1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Frequency:", self.freq1Edit)
- self.connect(self.freq1Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq1EditText)
+ self.freq1Edit.editingFinished.connect(self.freq1EditText)
- self.amp1Edit = QtGui.QLineEdit(self)
+ self.amp1Edit = QtWidgets.QLineEdit(self)
self.amp1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Amplitude:", self.amp1Edit)
- self.connect(self.amp1Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp1EditText)
+ self.amp1Edit.editingFinished.connect(self.amp1EditText)
# Control the second signal
- self.freq2Edit = QtGui.QLineEdit(self)
+ self.freq2Edit = QtWidgets.QLineEdit(self)
self.freq2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Frequency:", self.freq2Edit)
- self.connect(self.freq2Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq2EditText)
+ self.freq2Edit.editingFinished.connect(self.freq2EditText)
- self.amp2Edit = QtGui.QLineEdit(self)
+ self.amp2Edit = QtWidgets.QLineEdit(self)
self.amp2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Amplitude:", self.amp2Edit)
- self.connect(self.amp2Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp2EditText)
+ self.amp2Edit.editingFinished.connect(self.amp2EditText)
- self.quit = QtGui.QPushButton('Close', self)
+ self.quit = QtWidgets.QPushButton('Close', self)
self.quit.setMinimumWidth(100)
self.layout.addWidget(self.quit)
- self.connect(self.quit, QtCore.SIGNAL('clicked()'),
- QtGui.qApp, QtCore.SLOT('quit()'))
+ self.quit.clicked.connect(QtWidgets.qApp.quit)
def attach_signal1(self, signal):
self.signal1 = signal
- self.freq1Edit.setText(QtCore.QString("%1").arg(self.signal1.frequency()))
- self.amp1Edit.setText(QtCore.QString("%1").arg(self.signal1.amplitude()))
+ self.freq1Edit.setText(("{0}").format(self.signal1.frequency()))
+ self.amp1Edit.setText(("{0}").format(self.signal1.amplitude()))
def attach_signal2(self, signal):
self.signal2 = signal
- self.freq2Edit.setText(QtCore.QString("%1").arg(self.signal2.frequency()))
- self.amp2Edit.setText(QtCore.QString("%1").arg(self.signal2.amplitude()))
+ self.freq2Edit.setText(("{0}").format(self.signal2.frequency()))
+ self.amp2Edit.setText(("{0}").format(self.signal2.amplitude()))
def freq1EditText(self):
try:
@@ -152,7 +147,7 @@ class my_top_block(gr.top_block):
taps = filter.firdes.complex_band_pass_2(1, Rs, 1500, 2500, 100, 60)
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
ss = open(gr.prefix() + '/share/gnuradio/themes/dark.qss')
sstext = ss.read()
ss.close()
@@ -167,6 +162,8 @@ class my_top_block(gr.top_block):
self.snk1 = qtgui.waterfall_sink_c(npts, filter.firdes.WIN_BLACKMAN_hARRIS,
0, Rs,
"Complex Waterfall Example", 2)
+ self.snk1.set_color_map(0, qtgui.INTENSITY_COLOR_MAP_TYPE_COOL)
+ self.snk1.set_color_map(1, qtgui.INTENSITY_COLOR_MAP_TYPE_COOL)
self.connect(src1, (src,0))
self.connect(src2, (src,1))
@@ -181,8 +178,8 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
#pyWin.show()
self.main_box = dialog_box(pyWin, self.ctrl_win)
diff --git a/gr-qtgui/examples/pyqt_waterfall_f.py b/gr-qtgui/examples/pyqt_waterfall_f.py
index f9680c28cf..71c72afad6 100755
--- a/gr-qtgui/examples/pyqt_waterfall_f.py
+++ b/gr-qtgui/examples/pyqt_waterfall_f.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,10 +26,10 @@ import sys
try:
from gnuradio import qtgui
- from PyQt4 import QtGui, QtCore
+ from PyQt5 import QtWidgets, Qt
import sip
except ImportError:
- sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
+ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
sys.exit(1)
try:
@@ -38,71 +38,66 @@ except ImportError:
sys.stderr.write("Error: Program requires gr-analog.\n")
sys.exit(1)
-class dialog_box(QtGui.QWidget):
+class dialog_box(QtWidgets.QWidget):
def __init__(self, display, control):
- QtGui.QWidget.__init__(self, None)
+ QtWidgets.QWidget.__init__(self, None)
self.setWindowTitle('PyQt Test GUI')
- self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
+ self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self)
self.boxlayout.addWidget(display, 1)
self.boxlayout.addWidget(control)
self.resize(800, 500)
-class control_box(QtGui.QWidget):
+class control_box(QtWidgets.QWidget):
def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.setWindowTitle('Control Panel')
self.setToolTip('Control the signals')
- QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
+ QtWidgets.QToolTip.setFont(Qt.QFont('OldEnglish', 10))
- self.layout = QtGui.QFormLayout(self)
+ self.layout = QtWidgets.QFormLayout(self)
# Control the first signal
- self.freq1Edit = QtGui.QLineEdit(self)
+ self.freq1Edit = QtWidgets.QLineEdit(self)
self.freq1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Frequency:", self.freq1Edit)
- self.connect(self.freq1Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq1EditText)
+ self.freq1Edit.editingFinished.connect(self.freq1EditText)
- self.amp1Edit = QtGui.QLineEdit(self)
+ self.amp1Edit = QtWidgets.QLineEdit(self)
self.amp1Edit.setMinimumWidth(100)
self.layout.addRow("Signal 1 Amplitude:", self.amp1Edit)
- self.connect(self.amp1Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp1EditText)
+ self.amp1Edit.editingFinished.connect(self.amp1EditText)
# Control the second signal
- self.freq2Edit = QtGui.QLineEdit(self)
+ self.freq2Edit = QtWidgets.QLineEdit(self)
self.freq2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Frequency:", self.freq2Edit)
- self.connect(self.freq2Edit, QtCore.SIGNAL("editingFinished()"),
- self.freq2EditText)
+ self.freq2Edit.editingFinished.connect(self.freq2EditText)
- self.amp2Edit = QtGui.QLineEdit(self)
+ self.amp2Edit = QtWidgets.QLineEdit(self)
self.amp2Edit.setMinimumWidth(100)
self.layout.addRow("Signal 2 Amplitude:", self.amp2Edit)
- self.connect(self.amp2Edit, QtCore.SIGNAL("editingFinished()"),
- self.amp2EditText)
+ self.amp2Edit.editingFinished.connect(self.amp2EditText)
- self.quit = QtGui.QPushButton('Close', self)
+ self.quit = QtWidgets.QPushButton('Close', self)
self.quit.setMinimumWidth(100)
self.layout.addWidget(self.quit)
- self.connect(self.quit, QtCore.SIGNAL('clicked()'),
- QtGui.qApp, QtCore.SLOT('quit()'))
+ self.quit.clicked.connect(QtWidgets.qApp.quit)
def attach_signal1(self, signal):
self.signal1 = signal
- self.freq1Edit.setText(QtCore.QString("%1").arg(self.signal1.frequency()))
- self.amp1Edit.setText(QtCore.QString("%1").arg(self.signal1.amplitude()))
+ self.freq1Edit.setText(("{0}").format(self.signal1.frequency()))
+ self.amp1Edit.setText(("{0}").format(self.signal1.amplitude()))
def attach_signal2(self, signal):
self.signal2 = signal
- self.freq2Edit.setText(QtCore.QString("%1").arg(self.signal2.frequency()))
- self.amp2Edit.setText(QtCore.QString("%1").arg(self.signal2.amplitude()))
+ self.freq2Edit.setText(("{0}").format(self.signal2.frequency()))
+ self.amp2Edit.setText(("{0}").format(self.signal2.amplitude()))
def freq1EditText(self):
try:
@@ -144,7 +139,7 @@ class my_top_block(gr.top_block):
npts = 2048
- self.qapp = QtGui.QApplication(sys.argv)
+ self.qapp = QtWidgets.QApplication(sys.argv)
src1 = analog.sig_source_f(Rs, analog.GR_SIN_WAVE, f1, 0.1, 0)
src2 = analog.sig_source_f(Rs, analog.GR_SIN_WAVE, f2, 0.1, 0)
@@ -153,6 +148,8 @@ class my_top_block(gr.top_block):
self.snk1 = qtgui.waterfall_sink_f(npts, filter.firdes.WIN_BLACKMAN_hARRIS,
0, Rs,
"Real Waterfall Example", 2)
+ self.snk1.set_color_map(0, qtgui.INTENSITY_COLOR_MAP_TYPE_COOL)
+ self.snk1.set_color_map(1, qtgui.INTENSITY_COLOR_MAP_TYPE_COOL)
self.connect(src1, (src,0))
self.connect(src2, (src,1))
@@ -167,8 +164,8 @@ class my_top_block(gr.top_block):
pyQt = self.snk1.pyqwidget()
# Wrap the pointer as a PyQt SIP object
- # This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ # This can now be manipulated as a PyQt5.QtWidgets.QWidget
+ pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
#pyWin.show()
self.main_box = dialog_box(pyWin, self.ctrl_win)
@@ -179,4 +176,3 @@ if __name__ == "__main__":
tb.start()
tb.qapp.exec_()
tb.stop()
-
diff --git a/gr-qtgui/examples/qtgui_tags_viewing.grc b/gr-qtgui/examples/qtgui_tags_viewing.grc
index 4c6454537a..635b1e43fa 100644
--- a/gr-qtgui/examples/qtgui_tags_viewing.grc
+++ b/gr-qtgui/examples/qtgui_tags_viewing.grc
@@ -1,22 +1,23 @@
-<?xml version='1.0' encoding='ASCII'?>
+<?xml version='1.0' encoding='utf-8'?>
+<?grc format='1' created='3.8.git'?>
<flow_graph>
<timestamp>Wed Nov 6 11:52:40 2013</timestamp>
<block>
<key>options</key>
<param>
- <key>id</key>
- <value>qtgui_tags_viewing</value>
+ <key>author</key>
+ <value></value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>window_size</key>
+ <value>1280, 1024</value>
</param>
<param>
- <key>title</key>
- <value></value>
+ <key>category</key>
+ <value>Custom</value>
</param>
<param>
- <key>author</key>
+ <key>comment</key>
<value></value>
</param>
<param>
@@ -24,16 +25,40 @@
<value></value>
</param>
<param>
- <key>window_size</key>
- <value>1280, 1024</value>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
</param>
<param>
<key>generate_options</key>
<value>qt_gui</value>
</param>
<param>
- <key>category</key>
- <value>Custom</value>
+ <key>id</key>
+ <value>qtgui_tags_viewing</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>qt_qss_theme</key>
+ <value></value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>run_command</key>
+ <value>{python} -u {filename}</value>
</param>
<param>
<key>run_options</key>
@@ -44,147 +69,349 @@
<value>True</value>
</param>
<param>
- <key>max_nouts</key>
- <value>0</value>
+ <key>thread_safe_setters</key>
+ <value></value>
</param>
<param>
- <key>realtime_scheduling</key>
+ <key>title</key>
+ <value></value>
+ </param>
+ </block>
+ <block>
+ <key>variable_qtgui_range</key>
+ <param>
+ <key>comment</key>
<value></value>
</param>
<param>
+ <key>value</key>
+ <value>300</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(10, 10)</value>
+ <value>(814, 390)</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
+ <param>
+ <key>id</key>
+ <value>delay</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Delay</value>
+ </param>
+ <param>
+ <key>min_len</key>
+ <value>200</value>
+ </param>
+ <param>
+ <key>orient</key>
+ <value>Qt.Horizontal</value>
+ </param>
+ <param>
+ <key>start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>step</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>stop</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>rangeType</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>widget</key>
+ <value>counter_slider</value>
+ </param>
</block>
<block>
- <key>variable</key>
+ <key>variable_qtgui_range</key>
<param>
- <key>id</key>
- <value>samp_rate</value>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>30</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>32000</value>
+ <key>_coordinate</key>
+ <value>(936, 392)</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(172, 10)</value>
+ <key>gui_hint</key>
+ <value></value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
+ <param>
+ <key>id</key>
+ <value>ntaps</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Num Taps</value>
+ </param>
+ <param>
+ <key>min_len</key>
+ <value>200</value>
+ </param>
+ <param>
+ <key>orient</key>
+ <value>Qt.Horizontal</value>
+ </param>
+ <param>
+ <key>start</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>step</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>stop</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>rangeType</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>widget</key>
+ <value>counter_slider</value>
+ </param>
</block>
<block>
- <key>import</key>
+ <key>variable</key>
<param>
- <key>id</key>
- <value>import_1</value>
+ <key>comment</key>
+ <value></value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>import</key>
- <value>from gnuradio.digital.utils import tagged_streams</value>
- </param>
- <param>
<key>_coordinate</key>
- <value>(99, 72)</value>
+ <value>(172, 10)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>32000</value>
+ </param>
</block>
<block>
- <key>import</key>
+ <key>analog_fastnoise_source_x</key>
<param>
- <key>id</key>
- <value>import_0</value>
+ <key>amp</key>
+ <value>0.004</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>alias</key>
+ <value></value>
</param>
<param>
- <key>import</key>
- <value>import scipy</value>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(9, 71)</value>
+ <value>(350, 39)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
+ <param>
+ <key>id</key>
+ <value>analog_fastnoise_source_x_0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>noise_type</key>
+ <value>analog.GR_GAUSSIAN</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>samples</key>
+ <value>8192</value>
+ </param>
</block>
<block>
- <key>import</key>
+ <key>blocks_add_xx</key>
<param>
- <key>id</key>
- <value>import_2</value>
+ <key>alias</key>
+ <value></value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>comment</key>
+ <value></value>
</param>
<param>
- <key>import</key>
- <value>import time</value>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(253, 71)</value>
+ <value>(482, 193)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
+ <param>
+ <key>id</key>
+ <value>blocks_add_xx_0</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
</block>
<block>
- <key>blocks_delay</key>
+ <key>blocks_add_xx</key>
<param>
- <key>id</key>
- <value>blocks_delay_0</value>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
+ <key>_coordinate</key>
+ <value>(707, 176)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_add_xx_1</value>
+ </param>
+ <param>
<key>type</key>
<value>complex</value>
</param>
<param>
- <key>delay</key>
- <value>1000</value>
+ <key>maxoutbuf</key>
+ <value>0</value>
</param>
<param>
- <key>num_ports</key>
- <value>1</value>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
+ </block>
+ <block>
+ <key>blocks_delay</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
<param>
<key>affinity</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>delay</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
@@ -194,40 +421,103 @@
<key>_rotation</key>
<value>0</value>
</param>
+ <param>
+ <key>id</key>
+ <value>blocks_delay_0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
</block>
<block>
- <key>blocks_tags_strobe</key>
+ <key>blocks_delay</key>
<param>
- <key>id</key>
- <value>blocks_tags_strobe_0</value>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>delay</key>
+ <value>int(delay)</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>_coordinate</key>
+ <value>(890, 44)</value>
</param>
<param>
- <key>value</key>
- <value>pmt.intern("TEST")</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
<param>
- <key>nsamps</key>
- <value>10000</value>
+ <key>id</key>
+ <value>blocks_delay_0_0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
+ </block>
+ <block>
+ <key>blocks_tags_strobe</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
<param>
<key>affinity</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
@@ -237,426 +527,836 @@
<key>_rotation</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>analog_fastnoise_source_x</key>
<param>
<key>id</key>
- <value>analog_fastnoise_source_x_0</value>
+ <value>blocks_tags_strobe_0</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>key</key>
+ <value>pmt.intern("strobe")</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>nsamps</key>
+ <value>10000</value>
</param>
<param>
<key>type</key>
<value>complex</value>
</param>
<param>
- <key>noise_type</key>
- <value>analog.GR_GAUSSIAN</value>
+ <key>value</key>
+ <value>pmt.intern("TEST")</value>
</param>
<param>
- <key>amp</key>
- <value>0.004</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
<param>
- <key>seed</key>
- <value>0</value>
+ <key>alias</key>
+ <value></value>
</param>
<param>
- <key>samples</key>
- <value>8192</value>
+ <key>comment</key>
+ <value></value>
</param>
<param>
<key>affinity</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(350, 39)</value>
+ <value>(266, 149)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>blocks_vector_source_x</key>
<param>
<key>id</key>
- <value>blocks_vector_source_x_0</value>
+ <value>blocks_throttle_0</value>
</param>
<param>
- <key>_enabled</key>
+ <key>ignoretag</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>maxoutbuf</key>
+ <value>0</value>
</param>
<param>
- <key>vector</key>
- <value>[0.85+0.5j, 0.85, 0.85, 0.85+0.5j] + (10000-4)*[0,]</value>
+ <key>minoutbuf</key>
+ <value>0</value>
</param>
<param>
- <key>tags</key>
- <value>tagged_streams.make_lengthtags((1024,), (0,), "testing tags 0")</value>
+ <key>samples_per_second</key>
+ <value>50e3</value>
</param>
<param>
- <key>repeat</key>
- <value>True</value>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
<param>
<key>affinity</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>_enabled</key>
+ <value>False</value>
</param>
<param>
<key>_coordinate</key>
- <value>(13, 132)</value>
+ <value>(267, 414)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>blocks_add_xx</key>
<param>
<key>id</key>
- <value>blocks_add_xx_0</value>
+ <value>blocks_throttle_0_0</value>
</param>
<param>
- <key>_enabled</key>
+ <key>ignoretag</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>maxoutbuf</key>
+ <value>0</value>
</param>
<param>
- <key>num_inputs</key>
- <value>2</value>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
<param>
<key>affinity</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(482, 193)</value>
+ <value>(13, 132)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>blocks_add_xx</key>
<param>
<key>id</key>
- <value>blocks_add_xx_1</value>
+ <value>blocks_vector_source_x_0</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
</param>
<param>
<key>type</key>
<value>complex</value>
</param>
<param>
- <key>num_inputs</key>
- <value>2</value>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>tagged_streams.make_lengthtags((1024,), (0,), "testing tags 0")</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
<param>
+ <key>vector</key>
+ <value>[0.85+0.5j, 0.85, 0.85, 0.85+0.5j] + (10000-4)*[0,]</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
<key>affinity</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(707, 176)</value>
+ <value>(15, 315)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>blocks_throttle</key>
<param>
<key>id</key>
- <value>blocks_throttle_0</value>
+ <value>blocks_vector_source_x_0_0</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
</param>
<param>
<key>type</key>
<value>complex</value>
</param>
<param>
- <key>samples_per_second</key>
- <value>50e3</value>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>tagged_streams.make_lengthtags((128,), (1500,), "second stream")</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
<param>
+ <key>vector</key>
+ <value>1500*[0,] + [0.25+0j,] + (10000-1500-1)*[0,]</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
<key>affinity</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>_enabled</key>
+ <value>False</value>
</param>
<param>
<key>_coordinate</key>
- <value>(266, 149)</value>
+ <value>(15, 489)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>variable_qtgui_range</key>
<param>
<key>id</key>
- <value>ntaps</value>
+ <value>blocks_vector_source_x_0_0_0</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>maxoutbuf</key>
+ <value>0</value>
</param>
<param>
- <key>label</key>
- <value>Num Taps</value>
+ <key>minoutbuf</key>
+ <value>0</value>
</param>
<param>
- <key>value</key>
- <value>30</value>
+ <key>type</key>
+ <value>float</value>
</param>
<param>
- <key>start</key>
- <value>1</value>
+ <key>repeat</key>
+ <value>True</value>
</param>
<param>
- <key>stop</key>
- <value>100</value>
+ <key>tags</key>
+ <value>tagged_streams.make_lengthtags((128,), (110,), "second stream")</value>
</param>
<param>
- <key>step</key>
+ <key>vlen</key>
<value>1</value>
</param>
<param>
- <key>widget</key>
- <value>counter_slider</value>
+ <key>vector</key>
+ <value>10*[0,] + [0.5,] + (100-10-1)*[0,]</value>
</param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
<param>
- <key>orient</key>
- <value>Qt.Horizontal</value>
+ <key>alias</key>
+ <value></value>
</param>
<param>
- <key>min_len</key>
- <value>200</value>
+ <key>comment</key>
+ <value></value>
</param>
<param>
- <key>gui_hint</key>
+ <key>affinity</key>
<value></value>
</param>
<param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(936, 392)</value>
+ <value>(15, 398)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>qtgui_time_sink_x</key>
<param>
<key>id</key>
- <value>qtgui_time_sink_x_0_1_0</value>
+ <value>blocks_vector_source_x_0_1</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
</param>
<param>
<key>type</key>
- <value>complex</value>
+ <value>float</value>
</param>
<param>
- <key>name</key>
- <value></value>
+ <key>repeat</key>
+ <value>True</value>
</param>
<param>
- <key>size</key>
- <value>5100</value>
+ <key>tags</key>
+ <value>tagged_streams.make_lengthtags((1024,), (0,), "testing tags")</value>
</param>
<param>
- <key>srate</key>
- <value>samp_rate</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
- <key>ymin</key>
- <value>-0.1</value>
+ <key>vector</key>
+ <value>[-0.85,] + (100-1)*[0,]</value>
</param>
+ </block>
+ <block>
+ <key>fir_filter_xxx</key>
<param>
- <key>ymax</key>
- <value>1.5</value>
+ <key>alias</key>
+ <value></value>
</param>
<param>
- <key>nconnections</key>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>decim</key>
<value>1</value>
</param>
<param>
- <key>update_time</key>
- <value>0.001</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>tr_mode</key>
- <value>qtgui.TRIG_MODE_TAG</value>
+ <key>_coordinate</key>
+ <value>(660, 76)</value>
</param>
<param>
- <key>tr_slope</key>
- <value>qtgui.TRIG_SLOPE_POS</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
<param>
- <key>tr_level</key>
- <value>.5</value>
+ <key>id</key>
+ <value>fir_filter_xxx_0</value>
</param>
<param>
- <key>tr_delay</key>
- <value>0.06</value>
+ <key>maxoutbuf</key>
+ <value>0</value>
</param>
<param>
- <key>tr_chan</key>
+ <key>minoutbuf</key>
<value>0</value>
</param>
<param>
- <key>tr_tag</key>
- <value>strobe</value>
+ <key>samp_delay</key>
+ <value>int(ntaps)</value>
</param>
<param>
- <key>entags</key>
- <value>True</value>
+ <key>taps</key>
+ <value>int(ntaps)*[1,]+[1,]</value>
</param>
<param>
- <key>gui_hint</key>
- <value>1,1,1,1</value>
+ <key>type</key>
+ <value>ccc</value>
</param>
+ </block>
+ <block>
+ <key>import</key>
<param>
- <key>affinity</key>
+ <key>alias</key>
<value></value>
</param>
<param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(857, 173)</value>
+ <value>(9, 71)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
+ <param>
+ <key>id</key>
+ <value>import_0</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>import scipy</value>
+ </param>
</block>
<block>
- <key>blocks_vector_source_x</key>
+ <key>import</key>
<param>
- <key>id</key>
- <value>blocks_vector_source_x_0_0</value>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>_coordinate</key>
+ <value>(99, 72)</value>
</param>
<param>
- <key>vector</key>
- <value>1500*[0,] + [0.25+0j,] + (10000-1500-1)*[0,]</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
<param>
- <key>tags</key>
- <value>tagged_streams.make_lengthtags((128,), (1500,), "second stream")</value>
+ <key>id</key>
+ <value>import_1</value>
</param>
<param>
- <key>repeat</key>
- <value>True</value>
+ <key>import</key>
+ <value>from gnuradio.digital.utils import tagged_streams</value>
</param>
+ </block>
+ <block>
+ <key>import</key>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>alias</key>
+ <value></value>
</param>
<param>
- <key>affinity</key>
+ <key>comment</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(15, 315)</value>
+ <value>(253, 71)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
+ <param>
+ <key>id</key>
+ <value>import_2</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>import time</value>
+ </param>
</block>
<block>
<key>qtgui_time_sink_x</key>
<param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>ctrlpanel</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(860, 298)</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid</key>
+ <value>False</value>
+ </param>
+ <param>
<key>id</key>
<value>qtgui_time_sink_x_0</value>
</param>
<param>
- <key>_enabled</key>
+ <key>legend</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
</param>
<param>
<key>name</key>
<value></value>
</param>
<param>
+ <key>nconnections</key>
+ <value>2</value>
+ </param>
+ <param>
<key>size</key>
<value>18000</value>
</param>
@@ -665,20 +1365,16 @@
<value>samp_rate</value>
</param>
<param>
- <key>ymin</key>
- <value>-0.1</value>
- </param>
- <param>
- <key>ymax</key>
- <value>1.5</value>
+ <key>tr_chan</key>
+ <value>0</value>
</param>
<param>
- <key>nconnections</key>
- <value>2</value>
+ <key>tr_delay</key>
+ <value>0</value>
</param>
<param>
- <key>update_time</key>
- <value>0.10</value>
+ <key>tr_level</key>
+ <value>0.1</value>
</param>
<param>
<key>tr_mode</key>
@@ -689,509 +1385,1112 @@
<value>qtgui.TRIG_SLOPE_POS</value>
</param>
<param>
- <key>tr_level</key>
- <value>0.1</value>
+ <key>tr_tag</key>
+ <value>""</value>
</param>
<param>
- <key>tr_delay</key>
- <value>0</value>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
- <key>tr_chan</key>
- <value>0</value>
+ <key>update_time</key>
+ <value>0.10</value>
</param>
<param>
- <key>tr_tag</key>
+ <key>ylabel</key>
+ <value>Amplitude</value>
+ </param>
+ <param>
+ <key>yunit</key>
<value>""</value>
</param>
<param>
- <key>entags</key>
- <value>True</value>
+ <key>ymax</key>
+ <value>1.5</value>
</param>
<param>
- <key>gui_hint</key>
+ <key>ymin</key>
+ <value>-0.1</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
<value></value>
</param>
<param>
+ <key>ctrlpanel</key>
+ <value>False</value>
+ </param>
+ <param>
<key>affinity</key>
<value></value>
</param>
<param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(860, 298)</value>
+ <value>(475, 444)</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>fir_filter_xxx</key>
+ <param>
+ <key>grid</key>
+ <value>False</value>
+ </param>
<param>
<key>id</key>
- <value>fir_filter_xxx_0</value>
+ <value>qtgui_time_sink_x_0_0</value>
</param>
<param>
- <key>_enabled</key>
+ <key>legend</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>ccc</value>
+ <key>alpha1</key>
+ <value>1.0</value>
</param>
<param>
- <key>decim</key>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style1</key>
<value>1</value>
</param>
<param>
- <key>taps</key>
- <value>int(ntaps)*[1,]+[1,]</value>
+ <key>width1</key>
+ <value>1</value>
</param>
<param>
- <key>samp_delay</key>
- <value>int(ntaps)</value>
+ <key>alpha10</key>
+ <value>1.0</value>
</param>
<param>
- <key>affinity</key>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>label10</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>marker10</key>
+ <value>-1</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(660, 76)</value>
+ <key>style10</key>
+ <value>1</value>
</param>
<param>
- <key>_rotation</key>
- <value>0</value>
+ <key>width10</key>
+ <value>1</value>
</param>
- </block>
- <block>
- <key>qtgui_time_sink_x</key>
<param>
- <key>id</key>
- <value>qtgui_time_sink_x_0_1</value>
+ <key>alpha2</key>
+ <value>1.0</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>color2</key>
+ <value>"red"</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>label2</key>
+ <value></value>
</param>
<param>
- <key>name</key>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>label3</key>
<value></value>
</param>
<param>
- <key>size</key>
- <value>1000</value>
+ <key>marker3</key>
+ <value>-1</value>
</param>
<param>
- <key>srate</key>
- <value>samp_rate</value>
+ <key>style3</key>
+ <value>1</value>
</param>
<param>
- <key>ymin</key>
- <value>-0.1</value>
+ <key>width3</key>
+ <value>1</value>
</param>
<param>
- <key>ymax</key>
- <value>4.5</value>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
</param>
<param>
<key>nconnections</key>
<value>2</value>
</param>
<param>
- <key>update_time</key>
- <value>0.10</value>
+ <key>size</key>
+ <value>1024</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
</param>
<param>
<key>tr_mode</key>
- <value>qtgui.TRIG_MODE_NORM</value>
+ <value>qtgui.TRIG_MODE_TAG</value>
</param>
<param>
<key>tr_slope</key>
<value>qtgui.TRIG_SLOPE_POS</value>
</param>
<param>
- <key>tr_level</key>
- <value>.1</value>
+ <key>tr_tag</key>
+ <value>second stream</value>
</param>
<param>
- <key>tr_delay</key>
- <value>0.015</value>
+ <key>type</key>
+ <value>float</value>
</param>
<param>
- <key>tr_chan</key>
- <value>0</value>
+ <key>update_time</key>
+ <value>0.10</value>
</param>
<param>
- <key>tr_tag</key>
+ <key>ylabel</key>
+ <value>Amplitude</value>
+ </param>
+ <param>
+ <key>yunit</key>
<value>""</value>
</param>
<param>
- <key>entags</key>
- <value>True</value>
+ <key>ymax</key>
+ <value>1</value>
</param>
<param>
- <key>gui_hint</key>
- <value>1,0,1,1</value>
+ <key>ymin</key>
+ <value>-1</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>ctrlpanel</key>
+ <value>False</value>
</param>
<param>
<key>affinity</key>
<value></value>
</param>
<param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
<key>_coordinate</key>
<value>(1072, 77)</value>
</param>
<param>
+ <key>gui_hint</key>
+ <value>1,0,1,1</value>
+ </param>
+ <param>
<key>_rotation</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>qtgui_time_sink_x</key>
+ <param>
+ <key>grid</key>
+ <value>False</value>
+ </param>
<param>
<key>id</key>
- <value>qtgui_time_sink_x_0_0</value>
+ <value>qtgui_time_sink_x_0_1</value>
</param>
<param>
- <key>_enabled</key>
- <value>False</value>
+ <key>legend</key>
+ <value>True</value>
</param>
<param>
- <key>type</key>
- <value>float</value>
+ <key>alpha1</key>
+ <value>1.0</value>
</param>
<param>
- <key>name</key>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>label1</key>
<value></value>
</param>
<param>
- <key>size</key>
- <value>1024</value>
+ <key>marker1</key>
+ <value>-1</value>
</param>
<param>
- <key>srate</key>
- <value>samp_rate</value>
+ <key>style1</key>
+ <value>1</value>
</param>
<param>
- <key>ymin</key>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker10</key>
<value>-1</value>
</param>
<param>
- <key>ymax</key>
+ <key>style10</key>
<value>1</value>
</param>
<param>
- <key>nconnections</key>
- <value>2</value>
+ <key>width10</key>
+ <value>1</value>
</param>
<param>
- <key>update_time</key>
- <value>0.10</value>
+ <key>alpha2</key>
+ <value>1.0</value>
</param>
<param>
- <key>tr_mode</key>
- <value>qtgui.TRIG_MODE_TAG</value>
+ <key>color2</key>
+ <value>"red"</value>
</param>
<param>
- <key>tr_slope</key>
- <value>qtgui.TRIG_SLOPE_POS</value>
+ <key>label2</key>
+ <value></value>
</param>
<param>
- <key>tr_level</key>
- <value>0.0</value>
+ <key>marker2</key>
+ <value>-1</value>
</param>
<param>
- <key>tr_delay</key>
- <value>0</value>
+ <key>style2</key>
+ <value>1</value>
</param>
<param>
- <key>tr_chan</key>
+ <key>width2</key>
<value>1</value>
</param>
<param>
- <key>tr_tag</key>
- <value>second stream</value>
+ <key>alpha3</key>
+ <value>1.0</value>
</param>
<param>
- <key>entags</key>
- <value>True</value>
+ <key>color3</key>
+ <value>"green"</value>
</param>
<param>
- <key>gui_hint</key>
+ <key>label3</key>
<value></value>
</param>
<param>
- <key>affinity</key>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>label4</key>
<value></value>
</param>
<param>
- <key>_coordinate</key>
- <value>(475, 444)</value>
+ <key>marker4</key>
+ <value>-1</value>
</param>
<param>
- <key>_rotation</key>
- <value>0</value>
+ <key>style4</key>
+ <value>1</value>
</param>
- </block>
- <block>
- <key>blocks_vector_source_x</key>
<param>
- <key>id</key>
- <value>blocks_vector_source_x_0_0_0</value>
+ <key>width4</key>
+ <value>1</value>
</param>
<param>
- <key>_enabled</key>
- <value>False</value>
+ <key>alpha5</key>
+ <value>1.0</value>
</param>
<param>
- <key>type</key>
- <value>float</value>
+ <key>color5</key>
+ <value>"cyan"</value>
</param>
<param>
- <key>vector</key>
- <value>10*[0,] + [0.5,] + (100-10-1)*[0,]</value>
+ <key>label5</key>
+ <value></value>
</param>
<param>
- <key>tags</key>
- <value>tagged_streams.make_lengthtags((128,), (110,), "second stream")</value>
+ <key>marker5</key>
+ <value>-1</value>
</param>
<param>
- <key>repeat</key>
- <value>True</value>
+ <key>style5</key>
+ <value>1</value>
</param>
<param>
- <key>vlen</key>
+ <key>width5</key>
<value>1</value>
</param>
<param>
- <key>affinity</key>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>label6</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>marker6</key>
+ <value>-1</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(15, 489)</value>
+ <key>style6</key>
+ <value>1</value>
</param>
<param>
- <key>_rotation</key>
- <value>0</value>
+ <key>width6</key>
+ <value>1</value>
</param>
- </block>
- <block>
- <key>blocks_vector_source_x</key>
<param>
- <key>id</key>
- <value>blocks_vector_source_x_0_1</value>
+ <key>alpha7</key>
+ <value>1.0</value>
</param>
<param>
- <key>_enabled</key>
- <value>False</value>
+ <key>color7</key>
+ <value>"yellow"</value>
</param>
<param>
- <key>type</key>
- <value>float</value>
+ <key>label7</key>
+ <value></value>
</param>
<param>
- <key>vector</key>
- <value>[-0.85,] + (100-1)*[0,]</value>
+ <key>marker7</key>
+ <value>-1</value>
</param>
<param>
- <key>tags</key>
- <value>tagged_streams.make_lengthtags((1024,), (0,), "testing tags")</value>
+ <key>style7</key>
+ <value>1</value>
</param>
<param>
- <key>repeat</key>
- <value>True</value>
+ <key>width7</key>
+ <value>1</value>
</param>
<param>
- <key>vlen</key>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style8</key>
<value>1</value>
</param>
<param>
- <key>affinity</key>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>label9</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>marker9</key>
+ <value>-1</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(15, 398)</value>
+ <key>style9</key>
+ <value>1</value>
</param>
<param>
- <key>_rotation</key>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>blocks_throttle</key>
<param>
- <key>id</key>
- <value>blocks_throttle_0_0</value>
+ <key>tr_delay</key>
+ <value>0.015</value>
</param>
<param>
- <key>_enabled</key>
- <value>False</value>
+ <key>tr_level</key>
+ <value>.1</value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_NORM</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
</param>
<param>
<key>type</key>
- <value>float</value>
+ <value>complex</value>
</param>
<param>
- <key>samples_per_second</key>
- <value>samp_rate</value>
+ <key>update_time</key>
+ <value>0.10</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>ylabel</key>
+ <value>Amplitude</value>
+ </param>
+ <param>
+ <key>yunit</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>4.5</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.1</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>ctrlpanel</key>
+ <value>False</value>
</param>
<param>
<key>affinity</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(267, 414)</value>
+ <value>(857, 173)</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value>1,1,1,1</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>blocks_delay</key>
+ <param>
+ <key>grid</key>
+ <value>False</value>
+ </param>
<param>
<key>id</key>
- <value>blocks_delay_0_0</value>
+ <value>qtgui_time_sink_x_0_1_0</value>
</param>
<param>
- <key>_enabled</key>
+ <key>legend</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>alpha1</key>
+ <value>1.0</value>
</param>
<param>
- <key>delay</key>
- <value>int(delay)</value>
+ <key>color1</key>
+ <value>"blue"</value>
</param>
<param>
- <key>num_ports</key>
+ <key>label1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style1</key>
<value>1</value>
</param>
<param>
- <key>vlen</key>
+ <key>width1</key>
<value>1</value>
</param>
<param>
- <key>affinity</key>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>label10</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>marker10</key>
+ <value>-1</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(890, 44)</value>
+ <key>style10</key>
+ <value>1</value>
</param>
<param>
- <key>_rotation</key>
- <value>0</value>
+ <key>width10</key>
+ <value>1</value>
</param>
- </block>
- <block>
- <key>variable_qtgui_range</key>
<param>
- <key>id</key>
- <value>delay</value>
+ <key>alpha2</key>
+ <value>1.0</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>color2</key>
+ <value>"red"</value>
</param>
<param>
- <key>label</key>
- <value>Delay</value>
+ <key>label2</key>
+ <value></value>
</param>
<param>
- <key>value</key>
- <value>300</value>
+ <key>marker2</key>
+ <value>-1</value>
</param>
<param>
- <key>start</key>
- <value>0</value>
+ <key>style2</key>
+ <value>1</value>
</param>
<param>
- <key>stop</key>
- <value>1000</value>
+ <key>width2</key>
+ <value>1</value>
</param>
<param>
- <key>step</key>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style3</key>
<value>1</value>
</param>
<param>
- <key>widget</key>
- <value>counter_slider</value>
+ <key>width3</key>
+ <value>1</value>
</param>
<param>
- <key>orient</key>
- <value>Qt.Horizontal</value>
+ <key>alpha4</key>
+ <value>1.0</value>
</param>
<param>
- <key>min_len</key>
- <value>200</value>
+ <key>color4</key>
+ <value>"black"</value>
</param>
<param>
- <key>gui_hint</key>
+ <key>label4</key>
<value></value>
</param>
<param>
- <key>_coordinate</key>
- <value>(814, 390)</value>
+ <key>marker4</key>
+ <value>-1</value>
</param>
<param>
- <key>_rotation</key>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>5100</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
<value>0</value>
</param>
+ <param>
+ <key>tr_delay</key>
+ <value>0.06</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>.5</value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_TAG</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>strobe</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.001</value>
+ </param>
+ <param>
+ <key>ylabel</key>
+ <value>Amplitude</value>
+ </param>
+ <param>
+ <key>yunit</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.1</value>
+ </param>
</block>
<connection>
- <source_block_id>blocks_vector_source_x_0</source_block_id>
- <sink_block_id>blocks_throttle_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
- <source_block_id>blocks_throttle_0</source_block_id>
- <sink_block_id>blocks_add_xx_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
- <source_block_id>blocks_delay_0</source_block_id>
- <sink_block_id>blocks_add_xx_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>1</sink_key>
- </connection>
- <connection>
<source_block_id>analog_fastnoise_source_x_0</source_block_id>
<sink_block_id>blocks_add_xx_1</sink_block_id>
<source_key>0</source_key>
@@ -1210,28 +2509,28 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>fir_filter_xxx_0</source_block_id>
- <sink_block_id>blocks_delay_0_0</sink_block_id>
+ <source_block_id>blocks_add_xx_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_delay_0_0</source_block_id>
- <sink_block_id>qtgui_time_sink_x_0_1</sink_block_id>
+ <source_block_id>blocks_add_xx_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0_1_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>fir_filter_xxx_0</source_block_id>
- <sink_block_id>qtgui_time_sink_x_0_1</sink_block_id>
+ <source_block_id>blocks_delay_0</source_block_id>
+ <sink_block_id>blocks_add_xx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>
<connection>
- <source_block_id>blocks_vector_source_x_0_0</source_block_id>
- <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_block_id>blocks_delay_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0_1</sink_block_id>
<source_key>0</source_key>
- <sink_key>1</sink_key>
+ <sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>blocks_tags_strobe_0</source_block_id>
@@ -1240,28 +2539,34 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_add_xx_1</source_block_id>
- <sink_block_id>qtgui_time_sink_x_0_1_0</sink_block_id>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_add_xx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_add_xx_1</source_block_id>
- <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_block_id>blocks_throttle_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_vector_source_x_0_0_0</source_block_id>
- <sink_block_id>qtgui_time_sink_x_0_0</sink_block_id>
+ <source_block_id>blocks_vector_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>
<connection>
- <source_block_id>blocks_throttle_0_0</source_block_id>
+ <source_block_id>blocks_vector_source_x_0_0_0</source_block_id>
<sink_block_id>qtgui_time_sink_x_0_0</sink_block_id>
<source_key>0</source_key>
- <sink_key>0</sink_key>
+ <sink_key>1</sink_key>
</connection>
<connection>
<source_block_id>blocks_vector_source_x_0_1</source_block_id>
@@ -1269,4 +2574,16 @@
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
+ <connection>
+ <source_block_id>fir_filter_xxx_0</source_block_id>
+ <sink_block_id>blocks_delay_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fir_filter_xxx_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
</flow_graph>
diff --git a/gr-qtgui/grc/CMakeLists.txt b/gr-qtgui/grc/CMakeLists.txt
index 7da5fbc352..74e6958639 100644
--- a/gr-qtgui/grc/CMakeLists.txt
+++ b/gr-qtgui/grc/CMakeLists.txt
@@ -19,4 +19,29 @@
########################################################################
file(GLOB xml_files "*.xml")
-install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR})
+
+macro(REPLACE_IN_FILE _xml_block match replace)
+ set(xml_block_src "${CMAKE_CURRENT_SOURCE_DIR}/${_xml_block}")
+ set(xml_block "${CMAKE_CURRENT_BINARY_DIR}/${_xml_block}")
+
+ list(REMOVE_ITEM xml_files "${xml_block_src}")
+ file(READ "${xml_block_src}" xml_block_src_text)
+ string(REPLACE "${match}" "${replace}"
+ xml_block_text "${xml_block_src_text}")
+ file(WRITE "${xml_block}" "${xml_block_text}")
+
+ list(APPEND generated_xml_files "${xml_block}")
+endmacro()
+
+
+if(DESIRED_QT_VERSION EQUAL 4)
+ foreach(xml_block_src ${xml_files})
+ get_filename_component(xml_block "${xml_block_src}" NAME)
+ REPLACE_IN_FILE("${xml_block}" "PyQt5" "PyQt4")
+ endforeach()
+endif()
+
+install(
+ FILES ${xml_files} ${generated_xml_files}
+ DESTINATION "${GRC_BLOCKS_DIR}"
+)
diff --git a/gr-qtgui/grc/qtgui_ber_sink_b.xml b/gr-qtgui/grc/qtgui_ber_sink_b.xml
index da3fc6ebf8..05a36dfbc0 100644
--- a/gr-qtgui/grc/qtgui_ber_sink_b.xml
+++ b/gr-qtgui/grc/qtgui_ber_sink_b.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Bercurve Sink</name>
<key>qtgui_bercurve_sink</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<import>import numpy</import>
diff --git a/gr-qtgui/grc/qtgui_check_box.xml b/gr-qtgui/grc/qtgui_check_box.xml
index 67c8848a22..ccee59dd92 100644
--- a/gr-qtgui/grc/qtgui_check_box.xml
+++ b/gr-qtgui/grc/qtgui_check_box.xml
@@ -8,7 +8,7 @@
<block>
<name>QT GUI Check Box</name>
<key>variable_qtgui_check_box</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $win = '_%s_check_box'%$id
#if not $label()
diff --git a/gr-qtgui/grc/qtgui_chooser.xml b/gr-qtgui/grc/qtgui_chooser.xml
index f018354dd4..f79bb8ccb3 100644
--- a/gr-qtgui/grc/qtgui_chooser.xml
+++ b/gr-qtgui/grc/qtgui_chooser.xml
@@ -8,8 +8,8 @@
<block>
<name>QT GUI Chooser</name>
<key>variable_qtgui_chooser</key>
- <import>from PyQt4 import Qt</import>
- <import>from PyQt4.QtCore import QObject, pyqtSlot</import>
+ <import>from PyQt5 import Qt</import>
+ <import>from PyQt5.QtCore import QObject, pyqtSlot</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#slurp
#set $all_options = [$option0, $option1, $option2, $option3, $option4][:int($num_opts())]
diff --git a/gr-qtgui/grc/qtgui_const_sink_x.xml b/gr-qtgui/grc/qtgui_const_sink_x.xml
index 755f12f964..10f82cce82 100644
--- a/gr-qtgui/grc/qtgui_const_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_const_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Constellation Sink</name>
<key>qtgui_const_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<make>#set $win = 'self._%s_win'%$id
diff --git a/gr-qtgui/grc/qtgui_edit_box_msg.xml b/gr-qtgui/grc/qtgui_edit_box_msg.xml
index c7c758a612..d77a4b3e1b 100644
--- a/gr-qtgui/grc/qtgui_edit_box_msg.xml
+++ b/gr-qtgui/grc/qtgui_edit_box_msg.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Message Edit Box</name>
<key>qtgui_edit_box_msg</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<make>#set $win = 'self._%s_win'%$id
diff --git a/gr-qtgui/grc/qtgui_entry.xml b/gr-qtgui/grc/qtgui_entry.xml
index cce2edb4b2..fc0f4089d1 100644
--- a/gr-qtgui/grc/qtgui_entry.xml
+++ b/gr-qtgui/grc/qtgui_entry.xml
@@ -8,7 +8,7 @@
<block>
<name>QT GUI Entry</name>
<key>variable_qtgui_entry</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import eng_notation</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $win = 'self._%s_tool_bar'%$id
diff --git a/gr-qtgui/grc/qtgui_freq_sink_x.xml b/gr-qtgui/grc/qtgui_freq_sink_x.xml
index 009a184327..ed39db7781 100644
--- a/gr-qtgui/grc/qtgui_freq_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_freq_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Frequency Sink</name>
<key>qtgui_freq_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>from gnuradio.filter import firdes</import>
<import>import sip</import>
diff --git a/gr-qtgui/grc/qtgui_histogram_sink_x.xml b/gr-qtgui/grc/qtgui_histogram_sink_x.xml
index a789d2e4fa..9e3dcb104f 100644
--- a/gr-qtgui/grc/qtgui_histogram_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_histogram_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Histogram Sink</name>
<key>qtgui_histogram_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<make>#set $win = 'self._%s_win'%$id
diff --git a/gr-qtgui/grc/qtgui_label.xml b/gr-qtgui/grc/qtgui_label.xml
index 0d844a1ab4..18d4e3a0db 100644
--- a/gr-qtgui/grc/qtgui_label.xml
+++ b/gr-qtgui/grc/qtgui_label.xml
@@ -9,7 +9,7 @@
<block>
<name>QT GUI Label</name>
<key>variable_qtgui_label</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import eng_notation</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $win = 'self._%s_tool_bar'%$id
diff --git a/gr-qtgui/grc/qtgui_number_sink.xml b/gr-qtgui/grc/qtgui_number_sink.xml
index d10b7325c0..06837493c3 100644
--- a/gr-qtgui/grc/qtgui_number_sink.xml
+++ b/gr-qtgui/grc/qtgui_number_sink.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Number Sink</name>
<key>qtgui_number_sink</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<make>#set $win = 'self._%s_win'%$id
diff --git a/gr-qtgui/grc/qtgui_push_button.xml b/gr-qtgui/grc/qtgui_push_button.xml
index a535bb6473..49c2e9d6f0 100644
--- a/gr-qtgui/grc/qtgui_push_button.xml
+++ b/gr-qtgui/grc/qtgui_push_button.xml
@@ -8,7 +8,7 @@
<block>
<name>QT GUI Push Button</name>
<key>variable_qtgui_push_button</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $win = '_%s_push_button'%$id
#if not $label()
diff --git a/gr-qtgui/grc/qtgui_sink_x.xml b/gr-qtgui/grc/qtgui_sink_x.xml
index 7488ea59d8..a9bc469cd2 100644
--- a/gr-qtgui/grc/qtgui_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Sink</name>
<key>qtgui_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>from gnuradio.filter import firdes</import>
<import>import sip</import>
diff --git a/gr-qtgui/grc/qtgui_tab_widget.xml b/gr-qtgui/grc/qtgui_tab_widget.xml
index 1bbadc8e51..805542cc8b 100644
--- a/gr-qtgui/grc/qtgui_tab_widget.xml
+++ b/gr-qtgui/grc/qtgui_tab_widget.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Tab Widget</name>
<key>qtgui_tab_widget</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<make>#set $win = 'self.%s'%$id
Qt.QTabWidget()
#set $all_labels = [$label0, $label1, $label2, $label3, $label4,
diff --git a/gr-qtgui/grc/qtgui_time_raster_x.xml b/gr-qtgui/grc/qtgui_time_raster_x.xml
index 0359dc3b71..d458f67eb9 100644
--- a/gr-qtgui/grc/qtgui_time_raster_x.xml
+++ b/gr-qtgui/grc/qtgui_time_raster_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Time Raster Sink</name>
<key>qtgui_time_raster_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<make>#set $win = 'self._%s_win'%$id
diff --git a/gr-qtgui/grc/qtgui_time_sink_x.xml b/gr-qtgui/grc/qtgui_time_sink_x.xml
index c0584b6d34..f78c3e2958 100644
--- a/gr-qtgui/grc/qtgui_time_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_time_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Time Sink</name>
<key>qtgui_time_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>from gnuradio.filter import firdes</import>
<import>import sip</import>
diff --git a/gr-qtgui/grc/qtgui_vector_sink_f.xml b/gr-qtgui/grc/qtgui_vector_sink_f.xml
index 9f40d57729..0f456323bf 100644
--- a/gr-qtgui/grc/qtgui_vector_sink_f.xml
+++ b/gr-qtgui/grc/qtgui_vector_sink_f.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Vector Sink</name>
<key>qtgui_vector_sink_f</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<make>#set $win = 'self._%s_win'%$id
diff --git a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
index cdecd5cce1..a684492246 100644
--- a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Waterfall Sink</name>
<key>qtgui_waterfall_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>from gnuradio.filter import firdes</import>
<import>import sip</import>
diff --git a/gr-qtgui/include/QtWidgets/QRegExpValidator b/gr-qtgui/include/QtWidgets/QRegExpValidator
new file mode 100644
index 0000000000..17f6ce8333
--- /dev/null
+++ b/gr-qtgui/include/QtWidgets/QRegExpValidator
@@ -0,0 +1,9 @@
+/*
+ * The Qt5 version of the 'uic' compiler generates incorrect code right now.
+ * The bug has been reported (https://bugreports.qt.io/browse/QTBUG-48492) and
+ * is pending review.
+ *
+ * This file will make sure that the build of gr-qtgui will succeed with the
+ * broken version of 'uic'.
+ */
+#include <QtGui/QRegExpValidator>
diff --git a/gr-qtgui/include/gnuradio/qtgui/form_menus.h b/gr-qtgui/include/gnuradio/qtgui/form_menus.h
index cb9b775e8b..1fa7413117 100644
--- a/gr-qtgui/include/gnuradio/qtgui/form_menus.h
+++ b/gr-qtgui/include/gnuradio/qtgui/form_menus.h
@@ -28,6 +28,11 @@
#include <QtGui/QtGui>
#include <QtGui/QIntValidator>
#include <QtGui/QDoubleValidator>
+
+#if QT_VERSION >= 0x050000
+#include <QtWidgets/QtWidgets>
+#endif
+
#include <qwt_symbol.h>
#include <gnuradio/filter/firdes.h>
#include <gnuradio/qtgui/qtgui_types.h>
diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt
index aafb61699d..e9740a8cf0 100644
--- a/gr-qtgui/lib/CMakeLists.txt
+++ b/gr-qtgui/lib/CMakeLists.txt
@@ -45,8 +45,14 @@ set(qtgui_moc_hdrs
${qtgui_mod_includedir}/VectorDisplayPlot.h
edit_box_msg_impl.h
)
-QT4_WRAP_CPP(qtgui_moc_sources ${qtgui_moc_hdrs})
-QT4_WRAP_UI(qtgui_ui_hdrs spectrumdisplayform.ui)
+
+if (${DESIRED_QT_VERSION} MATCHES 4)
+ QT4_WRAP_CPP(qtgui_moc_sources ${qtgui_moc_hdrs})
+ QT4_WRAP_UI(qtgui_ui_hdrs spectrumdisplayform.ui)
+else()
+ QT5_WRAP_CPP(qtgui_moc_sources ${qtgui_moc_hdrs})
+ QT5_WRAP_UI(qtgui_ui_hdrs spectrumdisplayform.ui)
+endif()
#FIXME the sources expect <foo>.ui.h, but the macros generate ui_foo.h
#avoid changing the sources by generating the header with the include
diff --git a/gr-qtgui/lib/SpectrumGUIClass.cc b/gr-qtgui/lib/SpectrumGUIClass.cc
index cf7c728251..fe1973fc75 100644
--- a/gr-qtgui/lib/SpectrumGUIClass.cc
+++ b/gr-qtgui/lib/SpectrumGUIClass.cc
@@ -26,7 +26,6 @@
#include <gnuradio/qtgui/SpectrumGUIClass.h>
//Added by qt3to4:
#include <QEvent>
-#include <QCustomEvent>
#include <volk/volk.h>
const long SpectrumGUIClass::MAX_FFT_SIZE = 32768;
diff --git a/gr-qtgui/lib/const_sink_c_impl.cc b/gr-qtgui/lib/const_sink_c_impl.cc
index eaaf5f570a..7aa99a1c68 100644
--- a/gr-qtgui/lib/const_sink_c_impl.cc
+++ b/gr-qtgui/lib/const_sink_c_impl.cc
@@ -128,7 +128,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/edit_box_msg_impl.cc b/gr-qtgui/lib/edit_box_msg_impl.cc
index e0c5f64b3d..e0b5f256b6 100644
--- a/gr-qtgui/lib/edit_box_msg_impl.cc
+++ b/gr-qtgui/lib/edit_box_msg_impl.cc
@@ -65,10 +65,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/freq_sink_c_impl.cc b/gr-qtgui/lib/freq_sink_c_impl.cc
index 517786d58d..544c8b3c47 100644
--- a/gr-qtgui/lib/freq_sink_c_impl.cc
+++ b/gr-qtgui/lib/freq_sink_c_impl.cc
@@ -154,7 +154,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/freq_sink_f_impl.cc b/gr-qtgui/lib/freq_sink_f_impl.cc
index 90624e78eb..816b37415e 100644
--- a/gr-qtgui/lib/freq_sink_f_impl.cc
+++ b/gr-qtgui/lib/freq_sink_f_impl.cc
@@ -153,7 +153,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/histogram_sink_f_impl.cc b/gr-qtgui/lib/histogram_sink_f_impl.cc
index 4a1267c129..376f50a4a4 100644
--- a/gr-qtgui/lib/histogram_sink_f_impl.cc
+++ b/gr-qtgui/lib/histogram_sink_f_impl.cc
@@ -115,7 +115,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/sink_c_impl.cc b/gr-qtgui/lib/sink_c_impl.cc
index c1ee694213..14ddde8e20 100644
--- a/gr-qtgui/lib/sink_c_impl.cc
+++ b/gr-qtgui/lib/sink_c_impl.cc
@@ -130,7 +130,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/sink_f_impl.cc b/gr-qtgui/lib/sink_f_impl.cc
index d9bc526dbf..e60e98a59b 100644
--- a/gr-qtgui/lib/sink_f_impl.cc
+++ b/gr-qtgui/lib/sink_f_impl.cc
@@ -130,7 +130,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/time_raster_sink_b_impl.cc b/gr-qtgui/lib/time_raster_sink_b_impl.cc
index c0990a9890..7b252a4d1c 100644
--- a/gr-qtgui/lib/time_raster_sink_b_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_b_impl.cc
@@ -130,7 +130,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/time_raster_sink_f_impl.cc b/gr-qtgui/lib/time_raster_sink_f_impl.cc
index 2fb3e7db68..0e4cb1d345 100644
--- a/gr-qtgui/lib/time_raster_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_f_impl.cc
@@ -128,7 +128,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/time_sink_c_impl.cc b/gr-qtgui/lib/time_sink_c_impl.cc
index 209f03340f..b59e4c9461 100644
--- a/gr-qtgui/lib/time_sink_c_impl.cc
+++ b/gr-qtgui/lib/time_sink_c_impl.cc
@@ -129,7 +129,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/time_sink_f_impl.cc b/gr-qtgui/lib/time_sink_f_impl.cc
index 50a86d7dff..28bbb44ee9 100644
--- a/gr-qtgui/lib/time_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_sink_f_impl.cc
@@ -126,7 +126,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/vector_sink_f_impl.cc b/gr-qtgui/lib/vector_sink_f_impl.cc
index ba139b97f4..bafd1b73aa 100644
--- a/gr-qtgui/lib/vector_sink_f_impl.cc
+++ b/gr-qtgui/lib/vector_sink_f_impl.cc
@@ -139,7 +139,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.cc b/gr-qtgui/lib/waterfall_sink_c_impl.cc
index 7395aaf2a9..d3ca347c36 100644
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
@@ -154,7 +154,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.cc b/gr-qtgui/lib/waterfall_sink_f_impl.cc
index b6f50de31d..4b062de14d 100644
--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc
@@ -154,7 +154,7 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
QApplication::setGraphicsSystem(QString(style.c_str()));
#endif
diff --git a/gr-qtgui/python/qtgui/CMakeLists.txt b/gr-qtgui/python/qtgui/CMakeLists.txt
index 212c98ebb4..23e75e6583 100644
--- a/gr-qtgui/python/qtgui/CMakeLists.txt
+++ b/gr-qtgui/python/qtgui/CMakeLists.txt
@@ -20,9 +20,17 @@
########################################################################
include(GrPython)
+if (DESIRED_QT_VERSION MATCHES 4)
+ set(PY_QT_IMPORT "from PyQt4 import Qt, QtCore, QtGui as QtWidgets")
+else()
+ set(PY_QT_IMPORT "from PyQt5 import Qt, QtCore, QtWidgets")
+endif()
+
+configure_file(range.py.cmakein "${CMAKE_CURRENT_BINARY_DIR}/range.py" @ONLY)
+
GR_PYTHON_INSTALL(
FILES __init__.py
- range.py
+ "${CMAKE_CURRENT_BINARY_DIR}/range.py"
DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui
)
diff --git a/gr-qtgui/python/qtgui/range.py b/gr-qtgui/python/qtgui/range.py.cmakein
index 3eafc9002e..45aa762ae3 100755
--- a/gr-qtgui/python/qtgui/range.py
+++ b/gr-qtgui/python/qtgui/range.py.cmakein
@@ -21,8 +21,7 @@
# Boston, MA 02110-1301, USA.
#
-from PyQt4 import Qt, QtCore, QtGui
-
+@PY_QT_IMPORT@
class Range(object):
def __init__(self, minv, maxv, step, default, min_length):
@@ -63,10 +62,10 @@ class Range(object):
return (val*self.step+self.min)
-class RangeWidget(QtGui.QWidget):
+class RangeWidget(QtWidgets.QWidget):
def __init__(self, ranges, slot, label, style, rangeType=float):
""" Creates the QT Range widget """
- QtGui.QWidget.__init__(self)
+ QtWidgets.QWidget.__init__(self)
self.range = ranges
self.style = style
@@ -97,10 +96,10 @@ class RangeWidget(QtGui.QWidget):
layout.addWidget(self.d_widget)
self.setLayout(layout)
- class Dial(QtGui.QDial):
+ class Dial(QtWidgets.QDial):
""" Creates the range using a dial """
def __init__(self, parent, ranges, slot, rangeType=float):
- QtGui.QDial.__init__(self, parent)
+ QtWidgets.QDial.__init__(self, parent)
self.rangeType = rangeType
@@ -123,10 +122,10 @@ class RangeWidget(QtGui.QWidget):
val = self.range.map_range(value)
self.notifyChanged(self.rangeType(val))
- class Slider(QtGui.QSlider):
+ class Slider(QtWidgets.QSlider):
""" Creates the range using a slider """
def __init__(self, parent, ranges, slot, rangeType=float):
- QtGui.QSlider.__init__(self, QtCore.Qt.Horizontal, parent)
+ QtWidgets.QSlider.__init__(self, QtCore.Qt.Horizontal, parent)
self.rangeType = rangeType
@@ -165,18 +164,18 @@ class RangeWidget(QtGui.QWidget):
event.accept()
# Use repaint rather than calling the super mousePressEvent.
# Calling super causes issue where slider jumps to wrong value.
- QtGui.QSlider.repaint(self)
+ QtWidgets.QSlider.repaint(self)
def mouseMoveEvent(self, event):
new = self.minimum() + ((self.maximum()-self.minimum()) * event.x()) / self.width()
self.setValue(new)
event.accept()
- QtGui.QSlider.repaint(self)
+ QtWidgets.QSlider.repaint(self)
- class Counter(QtGui.QDoubleSpinBox):
+ class Counter(QtWidgets.QDoubleSpinBox):
""" Creates the range using a counter """
def __init__(self, parent, ranges, slot, rangeType=float):
- QtGui.QDoubleSpinBox.__init__(self, parent)
+ QtWidgets.QDoubleSpinBox.__init__(self, parent)
self.rangeType = rangeType
@@ -195,10 +194,10 @@ class RangeWidget(QtGui.QWidget):
""" Handle the valueChanged signal by converting to the right type """
self.notifyChanged(self.rangeType(value))
- class CounterSlider(QtGui.QWidget):
+ class CounterSlider(QtWidgets.QWidget):
""" Creates the range using a counter and slider """
def __init__(self, parent, ranges, slot, rangeType=float):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.rangeType = rangeType
diff --git a/gr-qtgui/themes/dark.qss b/gr-qtgui/themes/dark.qss
index 5b236fa3aa..575f475ca8 100644
--- a/gr-qtgui/themes/dark.qss
+++ b/gr-qtgui/themes/dark.qss
@@ -15,7 +15,6 @@ DisplayPlot {
qproperty-line_color1: green;
qproperty-line_color2: green;
qproperty-line_color3: green;
- qproperty-line_style1: SolidLine;
qproperty-line_style2: DashLine;
qproperty-line_style3: DotLine;
qproperty-axes_label_font_size: 18;