diff -Nru gnuradio-3.7.11/debian/changelog gnuradio-3.7.11/debian/changelog --- gnuradio-3.7.11/debian/changelog 2018-02-11 00:06:32.000000000 +0000 +++ gnuradio-3.7.11/debian/changelog 2018-02-27 02:40:13.000000000 +0000 @@ -1,3 +1,17 @@ +gnuradio (3.7.11-10) unstable; urgency=medium + + * import Qt5 QtWidgets in gr-qtgui util.py (Closes: #891495) + + -- A. Maitland Bottoms Mon, 26 Feb 2018 21:40:13 -0500 + +gnuradio (3.7.11-9) unstable; urgency=medium + + * update to v3.7.11-137-g4579e7b647 + * update qt5 patches + * direct-freedesktop-install + + -- A. Maitland Bottoms Sat, 24 Feb 2018 21:36:39 -0500 + gnuradio (3.7.11-8) unstable; urgency=medium * update to v3.7.11-132-g72e085515b diff -Nru gnuradio-3.7.11/debian/control gnuradio-3.7.11/debian/control --- gnuradio-3.7.11/debian/control 2018-02-06 03:59:44.000000000 +0000 +++ gnuradio-3.7.11/debian/control 2018-02-27 00:06:58.000000000 +0000 @@ -66,6 +66,7 @@ python-lxml, python-numpy, python-opengl, + python-pyqt5, python-sip, python-wxgtk3.0, python-zmq [!hurd-i386], @@ -75,7 +76,6 @@ Recommends: gnuradio-dev, python-matplotlib, python-networkx, - python-pyqt5 [!hurd-i386], python-qwt-qt5, python-scipy, python-tk, diff -Nru gnuradio-3.7.11/debian/gnuradio.install gnuradio-3.7.11/debian/gnuradio.install --- gnuradio-3.7.11/debian/gnuradio.install 2016-01-06 17:26:48.000000000 +0000 +++ gnuradio-3.7.11/debian/gnuradio.install 2018-02-25 02:34:54.000000000 +0000 @@ -1,4 +1,7 @@ etc usr/bin usr/lib/python* +usr/share/applications usr/share/gnuradio +usr/share/icons +usr/share/mime diff -Nru gnuradio-3.7.11/debian/gnuradio.postinst gnuradio-3.7.11/debian/gnuradio.postinst --- gnuradio-3.7.11/debian/gnuradio.postinst 2015-12-13 23:34:39.000000000 +0000 +++ gnuradio-3.7.11/debian/gnuradio.postinst 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -#!/bin/bash -set -e - -# Copyright 2008-2012 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. - -ICON_SIZES="32 48 64 128 256" -SRCDIR="/usr/share/gnuradio/grc/freedesktop" - -pathfind() { - OLDIFS="$IFS" - IFS=: - for p in $PATH; do - if [ -x "$p/$*" ]; then - IFS="$OLDIFS" - return 0 - fi - done - IFS="$OLDIFS" - return 1 -} - -# Only do this when the xdg-utils package is installed... -if `pathfind xdg-icon-resource` ; then -echo "Begin freedesktop install..." -for size in ${ICON_SIZES}; do \ - echo "Install icon: ${size}x${size}" - xdg-icon-resource install --noupdate --context mimetypes --theme gnome --size ${size} ${SRCDIR}/grc-icon-${size}.png application-gnuradio-grc || true; \ - xdg-icon-resource install --noupdate --context mimetypes --size ${size} ${SRCDIR}/grc-icon-${size}.png application-gnuradio-grc || true; \ - xdg-icon-resource install --noupdate --context apps --theme gnome --size ${size} ${SRCDIR}/grc-icon-${size}.png gnuradio-grc || true; \ - xdg-icon-resource install --noupdate --context apps --size ${size} ${SRCDIR}/grc-icon-${size}.png gnuradio-grc || true; \ -done -xdg-icon-resource forceupdate || true -echo "Install mime type" -xdg-mime install ${SRCDIR}/gnuradio-grc.xml || true -echo "Install menu items" -xdg-desktop-menu install ${SRCDIR}/*.desktop || true -echo "Done!" -fi - -#DEBHELPER# diff -Nru gnuradio-3.7.11/debian/gnuradio.prerm gnuradio-3.7.11/debian/gnuradio.prerm --- gnuradio-3.7.11/debian/gnuradio.prerm 2015-12-13 23:35:05.000000000 +0000 +++ gnuradio-3.7.11/debian/gnuradio.prerm 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -#!/bin/bash -set -e - -# Copyright 2008-2012 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. - -ICON_SIZES="32 48 64 128 256" -SRCDIR="/usr/share/gnuradio/grc/freedesktop" - -pathfind() { - OLDIFS="$IFS" - IFS=: - for p in $PATH; do - if [ -x "$p/$*" ]; then - IFS="$OLDIFS" - return 0 - fi - done - IFS="$OLDIFS" - return 1 -} - -# Only do this when the xdg-utils package is installed... -if `pathfind xdg-icon-resource` ; then -echo "Begin freedesktop uninstall..." -for size in ${ICON_SIZES}; do \ - echo "Uninstall icon: ${size}x${size}" - xdg-icon-resource uninstall --noupdate --context mimetypes --theme gnome --size ${size} application-gnuradio-grc || true; \ - xdg-icon-resource uninstall --noupdate --context mimetypes --size ${size} application-gnuradio-grc || true; \ - xdg-icon-resource uninstall --noupdate --context apps --theme gnome --size ${size} gnuradio-grc || true; \ - xdg-icon-resource uninstall --noupdate --context apps --size ${size} gnuradio-grc || true; \ -done -xdg-icon-resource forceupdate || true -echo "Uninstall mime type" -xdg-mime uninstall ${SRCDIR}/gnuradio-grc.xml || true -echo "Uninstall menu items" -xdg-desktop-menu uninstall `ls ${SRCDIR}/*.desktop | xargs -n1 basename` || true -echo "Done!" -fi - -#DEBHELPER# diff -Nru gnuradio-3.7.11/debian/gnuradio.sharedmimeinfo gnuradio-3.7.11/debian/gnuradio.sharedmimeinfo --- gnuradio-3.7.11/debian/gnuradio.sharedmimeinfo 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/gnuradio.sharedmimeinfo 2018-02-25 01:34:01.000000000 +0000 @@ -0,0 +1 @@ +/usr/share/gnuradio/grc/freedesktop/gnuradio-grc.xml diff -Nru gnuradio-3.7.11/debian/patches/0090-logging-updated-doxygen-with-section-about-how-to-us.patch gnuradio-3.7.11/debian/patches/0090-logging-updated-doxygen-with-section-about-how-to-us.patch --- gnuradio-3.7.11/debian/patches/0090-logging-updated-doxygen-with-section-about-how-to-us.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/0090-logging-updated-doxygen-with-section-about-how-to-us.patch 2018-02-20 01:36:05.000000000 +0000 @@ -0,0 +1,42 @@ +From 8fdbc1bfb1e9633f13956862840ae1a60ec40544 Mon Sep 17 00:00:00 2001 +From: Jacob Gilbert +Date: Wed, 14 Feb 2018 19:05:41 -0800 +Subject: [PATCH 090/108] logging: updated doxygen with section about how to + use logging module in OOT modules + +--- + docs/doxygen/other/logger.dox | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/docs/doxygen/other/logger.dox b/docs/doxygen/other/logger.dox +index ae6a744d00..c8e4a5daa2 100644 +--- a/docs/doxygen/other/logger.dox ++++ b/docs/doxygen/other/logger.dox +@@ -212,6 +212,24 @@ This creates a pointer called LOG (which is instantiated as a + log4cpp:LoggerPtr in the macro) that we can now use locally as the + input to our logging macros like 'GR_LOG_INFO(LOG, "message")'. + ++\subsection using_logging Using Logging in Out of Tree Modules ++ ++In order to use the logging interface in an out of tree module based on a ++gr_modtool template module, several CMake modifications are required. ++Without these changes, logging will be disabled. ++ ++GrMiscUtils.cmake module must be included in the OOT module top level ++CMakeLists.Texts file, and the GR_LOGGING() function provided by GrMiscUtils ++must be called from the same top level CMakeLists.txt file. This will ++set the appropriate build environment and during that process, attempt ++to find the log4cpp package using the FindLog4Cpp.cmake module. ++This module is not included in the module by gr_modtool, but is part of ++the GNU Radio codebase and can be copied directly into the cmake/Modules/ ++directory of the OOT module. ++ ++Once these CMake changes are made, the GR logging interface will function ++as documented on this page. ++ + \section logPy Logging from Python + + The logging capability has been brought out python via swig. The configuration +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/0091-channels-interpolate-dist-with-M_PI-not-2-M_PI.patch gnuradio-3.7.11/debian/patches/0091-channels-interpolate-dist-with-M_PI-not-2-M_PI.patch --- gnuradio-3.7.11/debian/patches/0091-channels-interpolate-dist-with-M_PI-not-2-M_PI.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/0091-channels-interpolate-dist-with-M_PI-not-2-M_PI.patch 2018-02-23 03:27:06.000000000 +0000 @@ -0,0 +1,30 @@ +From 7d19bf6e756e69dd9a84464ca2640ec45b036308 Mon Sep 17 00:00:00 2001 +From: jan-safar +Date: Fri, 9 Feb 2018 12:29:10 +0000 +Subject: [PATCH 91/93] channels: interpolate `dist` with `M_PI`, not `2*M_PI` + +The multiplication by 2 in the sinc() function argument appears to be a +mistake. It, for example, results in signal paths with a delay of 0.5 +sample time being completely ignored. + +https://en.wikipedia.org/wiki/Sinc_function +--- + gr-channels/lib/selective_fading_model_impl.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gr-channels/lib/selective_fading_model_impl.cc b/gr-channels/lib/selective_fading_model_impl.cc +index dfd7b74ca9..3594ec4aa0 100644 +--- a/gr-channels/lib/selective_fading_model_impl.cc ++++ b/gr-channels/lib/selective_fading_model_impl.cc +@@ -95,7 +95,7 @@ namespace gr { + gr_complex ff_H(d_faders[j]->next_sample()); + for(size_t k=0; k +Date: Thu, 17 Aug 2017 19:41:04 -0400 +Subject: [PATCH 92/93] Fixes #1297, adds grc gui_hint collision detection + +--- + grc/core/Param.py | 128 ++++++++++++++++++++++++++++++++++++++++++++---------- + 1 file changed, 106 insertions(+), 22 deletions(-) + +diff --git a/grc/core/Param.py b/grc/core/Param.py +index 9c26e02d90..0a22069488 100644 +--- a/grc/core/Param.py ++++ b/grc/core/Param.py +@@ -526,37 +526,121 @@ class Param(Element): + # GUI Position/Hint + ######################### + elif t == 'gui_hint': +- if ':' in v: +- tab, pos = v.split(':') +- elif '@' in v: +- tab, pos = v, '' +- else: +- tab, pos = '', v +- +- if '@' in tab: +- tab, index = tab.split('@') +- else: +- index = '?' +- +- # TODO: Problem with this code. Produces bad tabs +- widget_str = ({ +- (True, True): 'self.%(tab)s_grid_layout_%(index)s.addWidget(%(widget)s, %(pos)s)', +- (True, False): 'self.%(tab)s_layout_%(index)s.addWidget(%(widget)s)', +- (False, True): 'self.top_grid_layout.addWidget(%(widget)s, %(pos)s)', +- (False, False): 'self.top_layout.addWidget(%(widget)s)', +- }[bool(tab), bool(pos)]) % {'tab': tab, 'index': index, 'widget': '%s', 'pos': pos} +- ++ + # FIXME: Move replace(...) into the make template of the qtgui blocks + # Return a string here + class GuiHint(object): + def __init__(self, ws): + self._ws = ws +- ++ + def __call__(self, w): + return (self._ws.replace('addWidget', 'addLayout') if 'layout' in w else self._ws) % w +- ++ + def __str__(self): + return self._ws ++ ++ if (self.get_parent().get_state() == Constants.BLOCK_DISABLED): ++ return GuiHint('') ++ ++ # Parsing ++ if ':' in v: ++ tab, pos = v.split(':') ++ elif '@' in v: ++ tab, pos = v, '' ++ else: ++ tab, pos = '', v ++ ++ if '@' in tab: ++ tab, index = tab.split('@') ++ else: ++ index = '0' ++ ++ position_set = bool(pos) ++ tab_set = bool(tab) ++ ++ # Validation ++ if position_set: ++ e = self.get_parent().get_parent().evaluate(pos) ++ ++ if len(e) == 2: ++ e = e + (1,1) ++ row, col, row_span, col_span = e ++ ++ if not isinstance(e, (list, tuple)) or not (len(e) == 2 or len(e) == 4) or not all([isinstance(ei, int) for ei in e]): ++ raise Exception('Invalid GUI Hint entered: {e!s:s} (Must be a list of {{2,4}} non-negative integers).'.format(e=e)) ++ ++ if (row < 0) or (col < 0): ++ raise Exception('Invalid GUI Hint entered: {e!s:s} (non-negative integers only).'.format(e=e)) ++ ++ if (row_span < 1) or (col_span < 1): ++ raise Exception('Invalid GUI Hint entered: {e!s:s} (positive row/column span required).'.format(e=e)) ++ ++ if tab_set: ++ enabled_blocks = self.get_parent().get_parent().get_enabled_blocks() ++ tab_list = filter(lambda block: str(block.get_key()) == 'qtgui_tab_widget', enabled_blocks) ++ tab_match = filter(lambda t: t.get_id() == tab, tab_list) ++ if not tab_match: ++ raise Exception('Invalid tab name entered: {tab!s:s} (Tab name not found).'.format(tab=tab)) ++ ++ tab_index_size = tab_match[0].get_param('num_tabs').get_value() ++ if index >= tab_index_size: ++ raise Exception('Invalid tab index entered: {tab!s:s}@{index!s:s} (Index out of range).'.format(tab=tab, ++ index=index)) ++ ++ # Code Generation ++ if position_set and tab_set: ++ widget_str = 'self.{tab:s}_grid_layout_{index:s}.addWidget({widget:s}, {e!s:s})' ++ widget_str += '\n[self.{tab:s}_grid_layout_{index:s}.setRowStretch(r,1) for r in range({fRow:d},{lRow:d})]' ++ widget_str += '\n[self.{tab:s}_grid_layout_{index:s}.setColumnStretch(c,1) for c in range({fCol:d},{lCol:d})]' ++ widget_str = widget_str.format(tab=tab, ++ index=index, ++ widget='%s', ++ e=str(e)[1:-1], ++ fRow=row, ++ lRow=(row + row_span), ++ fCol=col, ++ lCol=(col + col_span)) ++ ++ elif position_set and not tab_set: ++ widget_str = 'self.top_grid_layout.addWidget({widget:s}, {e!s:s})' ++ widget_str += '\n[self.top_grid_layout.setRowStretch(r,1) for r in range({fRow:d},{lRow:d})]' ++ widget_str += '\n[self.top_grid_layout.setColumnStretch(c,1) for c in range({fCol:d},{lCol:d})]' ++ widget_str = widget_str.format(widget='%s', ++ e=str(e)[1:-1], ++ fRow=row, ++ lRow=(row + row_span), ++ fCol=col, ++ lCol=(col + col_span)) ++ ++ elif not position_set and tab_set: ++ widget_str = 'self.{tab:s}_layout_{index:s}.addWidget({widget:s})' ++ widget_str = widget_str.format(tab=tab, ++ index=index, ++ widget='%s') ++ ++ elif not position_set and not tab_set: ++ widget_str = 'self.top_layout.addWidget({widget:s})' ++ widget_str = widget_str.format(widget='%s') ++ ++ # Collision Detection ++ if position_set: ++ if tab_set: ++ my_parent = '{tab:s}@{index:s}'.format(tab=tab, ++ index=index) ++ else: ++ my_parent = 'main' ++ # Calculate hostage cells ++ for r in range(row, row + row_span): ++ for c in range(col, col + col_span): ++ self._hostage_cells.append((my_parent, (r, c))) ++ # Avoid collisions ++ params = filter(lambda p: p is not self, self.get_all_params('gui_hint')) ++ for param in params: ++ for parent, cell in param._hostage_cells: ++ if (parent, cell) in self._hostage_cells: ++ raise Exception('Another graphical element is using parent "{parent!s:s}", cell "{cell!s:s}".'.format(parent=parent, ++ cell=cell)) ++ + return GuiHint(widget_str) + ######################### + # Grid Position Type +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/0093-moves-gui_hint-logic-into-parsing-function-removes-G.patch gnuradio-3.7.11/debian/patches/0093-moves-gui_hint-logic-into-parsing-function-removes-G.patch --- gnuradio-3.7.11/debian/patches/0093-moves-gui_hint-logic-into-parsing-function-removes-G.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/0093-moves-gui_hint-logic-into-parsing-function-removes-G.patch 2018-02-23 03:27:06.000000000 +0000 @@ -0,0 +1,550 @@ +From 69cdcdc9c9ade2a9f1731af700137e3603328381 Mon Sep 17 00:00:00 2001 +From: Spencer Ross +Date: Sat, 19 Aug 2017 23:16:38 -0400 +Subject: [PATCH 93/93] moves gui_hint logic into parsing function, removes + GuiHint class from Param.py, cleans up gr-qtgui blocks functions + +--- + gr-qtgui/grc/qtgui_ber_sink_b.xml | 2 +- + gr-qtgui/grc/qtgui_check_box.xml | 3 +- + gr-qtgui/grc/qtgui_chooser.xml | 3 +- + gr-qtgui/grc/qtgui_const_sink_x.xml | 3 +- + gr-qtgui/grc/qtgui_edit_box_msg.xml | 2 +- + gr-qtgui/grc/qtgui_entry.xml | 5 +- + gr-qtgui/grc/qtgui_freq_sink_x.xml | 3 +- + gr-qtgui/grc/qtgui_histogram_sink_x.xml | 4 +- + gr-qtgui/grc/qtgui_label.xml | 3 +- + gr-qtgui/grc/qtgui_number_sink.xml | 3 +- + gr-qtgui/grc/qtgui_push_button.xml | 4 +- + gr-qtgui/grc/qtgui_range.xml | 3 +- + gr-qtgui/grc/qtgui_sink_x.xml | 2 +- + gr-qtgui/grc/qtgui_tab_widget.xml | 3 +- + gr-qtgui/grc/qtgui_time_raster_x.xml | 3 +- + gr-qtgui/grc/qtgui_time_sink_x.xml | 3 +- + gr-qtgui/grc/qtgui_vector_sink_f.xml | 3 +- + gr-qtgui/grc/qtgui_waterfall_sink_x.xml | 3 +- + grc/core/Param.py | 232 ++++++++++++++++---------------- + grc/core/generator/Generator.py | 2 +- + 20 files changed, 154 insertions(+), 135 deletions(-) + +diff --git a/gr-qtgui/grc/qtgui_ber_sink_b.xml b/gr-qtgui/grc/qtgui_ber_sink_b.xml +index da3fc6ebf8..851502a774 100644 +--- a/gr-qtgui/grc/qtgui_ber_sink_b.xml ++++ b/gr-qtgui/grc/qtgui_ber_sink_b.xml +@@ -47,7 +47,7 @@ for i in xrange($num_curves): + self.$(id).set_line_alpha(i, alphas[i]) + + self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget) +-$(gui_hint()($win)) ++$(gui_hint() % $win) + + + esno +diff --git a/gr-qtgui/grc/qtgui_check_box.xml b/gr-qtgui/grc/qtgui_check_box.xml +index 67c8848a22..a02c83e3cf 100644 +--- a/gr-qtgui/grc/qtgui_check_box.xml ++++ b/gr-qtgui/grc/qtgui_check_box.xml +@@ -20,7 +20,8 @@ self._$(id)_choices_inv = dict((v,k) for k,v in self._$(id)_choices.iteritems()) + self._$(id)_callback = lambda i: Qt.QMetaObject.invokeMethod($(win), "setChecked", Qt.Q_ARG("bool", self._$(id)_choices_inv[i])) + self._$(id)_callback(self.$id) + $(win).stateChanged.connect(lambda i: self.set_$(id)(self._$(id)_choices[bool(i)])) +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + self.set_$(id)($value) + self._$(id)_callback($id) + +diff --git a/gr-qtgui/grc/qtgui_chooser.xml b/gr-qtgui/grc/qtgui_chooser.xml +index f018354dd4..b91566ae74 100644 +--- a/gr-qtgui/grc/qtgui_chooser.xml ++++ b/gr-qtgui/grc/qtgui_chooser.xml +@@ -86,7 +86,8 @@ self._$(id)_callback(self.$id) + self._$(id)_button_group.buttonClicked[int].connect( + lambda i: self.set_$(id)(self._$(id)_options[i])) + #end if +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + self.set_$(id)($value) + self._$(id)_callback($id) + +diff --git a/gr-qtgui/grc/qtgui_const_sink_x.xml b/gr-qtgui/grc/qtgui_const_sink_x.xml +index 755f12f964..6bf31d5190 100644 +--- a/gr-qtgui/grc/qtgui_const_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_const_sink_x.xml +@@ -51,7 +51,8 @@ for i in xrange(#if $type.t == 'message' then 1 else $nconnections#): + self.$(id).set_line_alpha(i, alphas[i]) + + self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget) +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + set_resize($width, $height) + set_update_time($update_time) + set_title($which, $title) +diff --git a/gr-qtgui/grc/qtgui_edit_box_msg.xml b/gr-qtgui/grc/qtgui_edit_box_msg.xml +index c7c758a612..276cfe9801 100644 +--- a/gr-qtgui/grc/qtgui_edit_box_msg.xml ++++ b/gr-qtgui/grc/qtgui_edit_box_msg.xml +@@ -13,7 +13,7 @@ + #set $win = 'self._%s_win'%$id + qtgui.edit_box_msg($(type.t), $value, $label, $is_pair, $is_static, $key) + self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget) +-$(gui_hint()($win)) ++$(gui_hint() % $win) + + + Type +diff --git a/gr-qtgui/grc/qtgui_entry.xml b/gr-qtgui/grc/qtgui_entry.xml +index cce2edb4b2..ab35aec858 100644 +--- a/gr-qtgui/grc/qtgui_entry.xml ++++ b/gr-qtgui/grc/qtgui_entry.xml +@@ -21,9 +21,12 @@ self._$(id)_line_edit = Qt.QLineEdit(str(self.$id)) + self._$(id)_tool_bar.addWidget(self._$(id)_line_edit) + self._$(id)_line_edit.returnPressed.connect( + lambda: self.set_$(id)($(type.conv)(str(self._$(id)_line_edit.text().toAscii())))) +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + self.set_$(id)($value) ++ + Qt.QMetaObject.invokeMethod(self._$(id)_line_edit, "setText", Qt.Q_ARG("QString", $(type.str)($id))) ++ + + Label + label +diff --git a/gr-qtgui/grc/qtgui_freq_sink_x.xml b/gr-qtgui/grc/qtgui_freq_sink_x.xml +index 009a184327..5c6595cb33 100644 +--- a/gr-qtgui/grc/qtgui_freq_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_freq_sink_x.xml +@@ -54,7 +54,8 @@ for i in xrange(#if $type.t == 'message' then 1 else $nconnections#): + self.$(id).set_line_alpha(i, alphas[i]) + + self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget) +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + set_frequency_range($fc, $bw) + set_update_time($update_time) + set_title($which, $title) +diff --git a/gr-qtgui/grc/qtgui_histogram_sink_x.xml b/gr-qtgui/grc/qtgui_histogram_sink_x.xml +index a789d2e4fa..8bf9662b74 100644 +--- a/gr-qtgui/grc/qtgui_histogram_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_histogram_sink_x.xml +@@ -53,8 +53,8 @@ for i in xrange(#if $type.t == 'message' then 1 else $nconnections#): + self.$(id).set_line_alpha(i, alphas[i]) + + self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget) +-$(gui_hint()($win)) +- ++$(gui_hint() % $win) ++ + set_update_time($update_time) + set_title($which, $title) + set_color($which, $color) +diff --git a/gr-qtgui/grc/qtgui_label.xml b/gr-qtgui/grc/qtgui_label.xml +index d67f3d7500..90b77fa968 100644 +--- a/gr-qtgui/grc/qtgui_label.xml ++++ b/gr-qtgui/grc/qtgui_label.xml +@@ -26,8 +26,7 @@ else: + $(win).addWidget(Qt.QLabel($label+": ")) + self._$(id)_label = Qt.QLabel(str(self._$(id)_formatter(self.$id))) + self._$(id)_tool_bar.addWidget(self._$(id)_label) +-$(gui_hint()($win)) +- ++$(gui_hint() % $win) + + self.set_$(id)(self._$(id)_formatter($value)) + Qt.QMetaObject.invokeMethod(self._$(id)_label, "setText", Qt.Q_ARG("QString", $id)) +diff --git a/gr-qtgui/grc/qtgui_number_sink.xml b/gr-qtgui/grc/qtgui_number_sink.xml +index d10b7325c0..264baae667 100644 +--- a/gr-qtgui/grc/qtgui_number_sink.xml ++++ b/gr-qtgui/grc/qtgui_number_sink.xml +@@ -41,7 +41,8 @@ for i in xrange($nconnections): + + self.$(id).enable_autoscale($autoscale) + self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget) +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + set_update_time($update_time) + + +diff --git a/gr-qtgui/grc/qtgui_push_button.xml b/gr-qtgui/grc/qtgui_push_button.xml +index a535bb6473..e4f598e725 100644 +--- a/gr-qtgui/grc/qtgui_push_button.xml ++++ b/gr-qtgui/grc/qtgui_push_button.xml +@@ -18,8 +18,10 @@ $win = Qt.QPushButton($label) + self._$(id)_choices = {'Pressed': $pressed, 'Released': $released} + $(win).pressed.connect(lambda: self.set_$(id)(self._$(id)_choices['Pressed'])) + $(win).released.connect(lambda: self.set_$(id)(self._$(id)_choices['Released'])) +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + self.set_$(id)($value) ++ + + Label + label +diff --git a/gr-qtgui/grc/qtgui_range.xml b/gr-qtgui/grc/qtgui_range.xml +index 71b614cc5e..0999311a0b 100644 +--- a/gr-qtgui/grc/qtgui_range.xml ++++ b/gr-qtgui/grc/qtgui_range.xml +@@ -17,7 +17,8 @@ + #end if + $(range) = Range($start, $stop, $step, $value, $min_len) + $(win) = RangeWidget($range, self.set_$(id), $label, "$widget", $rangeType) +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + self.set_$(id)($value) + + +diff --git a/gr-qtgui/grc/qtgui_sink_x.xml b/gr-qtgui/grc/qtgui_sink_x.xml +index 7488ea59d8..4dbf0e6375 100644 +--- a/gr-qtgui/grc/qtgui_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_sink_x.xml +@@ -25,7 +25,7 @@ qtgui.$(type.fcn)( + ) + self.$(id).set_update_time(1.0/$rate) + self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget) +-$(gui_hint()($win)) ++$(gui_hint() % $win) + + self.$(id).enable_rf_freq($showrf) + +diff --git a/gr-qtgui/grc/qtgui_tab_widget.xml b/gr-qtgui/grc/qtgui_tab_widget.xml +index 1bbadc8e51..fc8ad0553a 100644 +--- a/gr-qtgui/grc/qtgui_tab_widget.xml ++++ b/gr-qtgui/grc/qtgui_tab_widget.xml +@@ -21,7 +21,8 @@ self.$(id)_grid_layout_$(i) = Qt.QGridLayout() + self.$(id)_layout_$(i).addLayout(self.$(id)_grid_layout_$(i)) + $(win).addTab(self.$(id)_widget_$(i), $label) + #end for +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + + Num Tabs + num_tabs +diff --git a/gr-qtgui/grc/qtgui_time_raster_x.xml b/gr-qtgui/grc/qtgui_time_raster_x.xml +index 0359dc3b71..2d2f3cbff4 100644 +--- a/gr-qtgui/grc/qtgui_time_raster_x.xml ++++ b/gr-qtgui/grc/qtgui_time_raster_x.xml +@@ -41,7 +41,8 @@ for i in xrange(#if $type.t == 'message' then 1 else $nconnections#): + self.$(id).set_line_alpha(i, alphas[i]) + + self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget) +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + set_num_rows($nrows) + set_num_cols($ncols) + set_multiplier($mult) +diff --git a/gr-qtgui/grc/qtgui_time_sink_x.xml b/gr-qtgui/grc/qtgui_time_sink_x.xml +index 144cba60eb..2067841be8 100644 +--- a/gr-qtgui/grc/qtgui_time_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_time_sink_x.xml +@@ -74,7 +74,8 @@ for i in xrange(#if $type.t == 'message' then 1 else $nconnections#): + #end if + + self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget) +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + set_time_domain_axis($min, $max) + set_update_time($update_time) + set_title($which, $title) +diff --git a/gr-qtgui/grc/qtgui_vector_sink_f.xml b/gr-qtgui/grc/qtgui_vector_sink_f.xml +index 9f40d57729..1c17b8256a 100644 +--- a/gr-qtgui/grc/qtgui_vector_sink_f.xml ++++ b/gr-qtgui/grc/qtgui_vector_sink_f.xml +@@ -46,7 +46,8 @@ for i in xrange($nconnections): + self.$(id).set_line_alpha(i, alphas[i]) + + self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget) +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + set_update_time($update_time) + set_title($title) + set_color($which, $color) +diff --git a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml +index cdecd5cce1..206318e30d 100644 +--- a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml +@@ -47,7 +47,8 @@ for i in xrange(#if $type.t == 'message' then 1 else $nconnections#): + self.$(id).set_intensity_range($int_min, $int_max) + + self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget) +-$(gui_hint()($win)) ++$(gui_hint() % $win) ++ + set_frequency_range($fc, $bw) + set_update_time($update_time) + set_title($which, $title) +diff --git a/grc/core/Param.py b/grc/core/Param.py +index 0a22069488..7307eabef1 100644 +--- a/grc/core/Param.py ++++ b/grc/core/Param.py +@@ -526,122 +526,10 @@ class Param(Element): + # GUI Position/Hint + ######################### + elif t == 'gui_hint': +- +- # FIXME: Move replace(...) into the make template of the qtgui blocks +- # Return a string here +- class GuiHint(object): +- def __init__(self, ws): +- self._ws = ws +- +- def __call__(self, w): +- return (self._ws.replace('addWidget', 'addLayout') if 'layout' in w else self._ws) % w +- +- def __str__(self): +- return self._ws +- + if (self.get_parent().get_state() == Constants.BLOCK_DISABLED): +- return GuiHint('') +- +- # Parsing +- if ':' in v: +- tab, pos = v.split(':') +- elif '@' in v: +- tab, pos = v, '' +- else: +- tab, pos = '', v +- +- if '@' in tab: +- tab, index = tab.split('@') ++ return '' + else: +- index = '0' +- +- position_set = bool(pos) +- tab_set = bool(tab) +- +- # Validation +- if position_set: +- e = self.get_parent().get_parent().evaluate(pos) +- +- if len(e) == 2: +- e = e + (1,1) +- row, col, row_span, col_span = e +- +- if not isinstance(e, (list, tuple)) or not (len(e) == 2 or len(e) == 4) or not all([isinstance(ei, int) for ei in e]): +- raise Exception('Invalid GUI Hint entered: {e!s:s} (Must be a list of {{2,4}} non-negative integers).'.format(e=e)) +- +- if (row < 0) or (col < 0): +- raise Exception('Invalid GUI Hint entered: {e!s:s} (non-negative integers only).'.format(e=e)) +- +- if (row_span < 1) or (col_span < 1): +- raise Exception('Invalid GUI Hint entered: {e!s:s} (positive row/column span required).'.format(e=e)) +- +- if tab_set: +- enabled_blocks = self.get_parent().get_parent().get_enabled_blocks() +- tab_list = filter(lambda block: str(block.get_key()) == 'qtgui_tab_widget', enabled_blocks) +- tab_match = filter(lambda t: t.get_id() == tab, tab_list) +- if not tab_match: +- raise Exception('Invalid tab name entered: {tab!s:s} (Tab name not found).'.format(tab=tab)) +- +- tab_index_size = tab_match[0].get_param('num_tabs').get_value() +- if index >= tab_index_size: +- raise Exception('Invalid tab index entered: {tab!s:s}@{index!s:s} (Index out of range).'.format(tab=tab, +- index=index)) +- +- # Code Generation +- if position_set and tab_set: +- widget_str = 'self.{tab:s}_grid_layout_{index:s}.addWidget({widget:s}, {e!s:s})' +- widget_str += '\n[self.{tab:s}_grid_layout_{index:s}.setRowStretch(r,1) for r in range({fRow:d},{lRow:d})]' +- widget_str += '\n[self.{tab:s}_grid_layout_{index:s}.setColumnStretch(c,1) for c in range({fCol:d},{lCol:d})]' +- widget_str = widget_str.format(tab=tab, +- index=index, +- widget='%s', +- e=str(e)[1:-1], +- fRow=row, +- lRow=(row + row_span), +- fCol=col, +- lCol=(col + col_span)) +- +- elif position_set and not tab_set: +- widget_str = 'self.top_grid_layout.addWidget({widget:s}, {e!s:s})' +- widget_str += '\n[self.top_grid_layout.setRowStretch(r,1) for r in range({fRow:d},{lRow:d})]' +- widget_str += '\n[self.top_grid_layout.setColumnStretch(c,1) for c in range({fCol:d},{lCol:d})]' +- widget_str = widget_str.format(widget='%s', +- e=str(e)[1:-1], +- fRow=row, +- lRow=(row + row_span), +- fCol=col, +- lCol=(col + col_span)) +- +- elif not position_set and tab_set: +- widget_str = 'self.{tab:s}_layout_{index:s}.addWidget({widget:s})' +- widget_str = widget_str.format(tab=tab, +- index=index, +- widget='%s') +- +- elif not position_set and not tab_set: +- widget_str = 'self.top_layout.addWidget({widget:s})' +- widget_str = widget_str.format(widget='%s') +- +- # Collision Detection +- if position_set: +- if tab_set: +- my_parent = '{tab:s}@{index:s}'.format(tab=tab, +- index=index) +- else: +- my_parent = 'main' +- # Calculate hostage cells +- for r in range(row, row + row_span): +- for c in range(col, col + col_span): +- self._hostage_cells.append((my_parent, (r, c))) +- # Avoid collisions +- params = filter(lambda p: p is not self, self.get_all_params('gui_hint')) +- for param in params: +- for parent, cell in param._hostage_cells: +- if (parent, cell) in self._hostage_cells: +- raise Exception('Another graphical element is using parent "{parent!s:s}", cell "{cell!s:s}".'.format(parent=parent, +- cell=cell)) +- +- return GuiHint(widget_str) ++ return self.parse_gui_hint(v) + ######################### + # Grid Position Type + ######################### +@@ -828,3 +716,119 @@ class Param(Element): + n['key'] = self.get_key() + n['value'] = self.get_value() + return n ++ ++ ############################################## ++ # GUI Hint ++ ############################################## ++ def parse_gui_hint(self, v): ++ """ ++ Parse/validate gui hint value. ++ ++ Args: ++ v: gui_hint string from a block's 'gui_hint' param ++ ++ Returns: ++ string of python code for positioning GUI elements in pyQT ++ """ ++ ++ # Parsing ++ if ':' in v: ++ tab, pos = v.split(':') ++ elif ',' in v: ++ tab, pos = '', v ++ else: ++ tab, pos = v, '' ++ ++ if '@' in tab: ++ tab, index = tab.split('@') ++ else: ++ index = '0' ++ index = int(index) ++ ++ position_set = bool(pos) ++ tab_set = bool(tab) ++ ++ # Validation ++ if position_set: ++ e = self.get_parent().get_parent().evaluate(pos) ++ ++ if len(e) == 2: ++ e = e + (1,1) ++ row, col, row_span, col_span = e ++ ++ if not isinstance(e, (list, tuple)) or not (len(e) == 2 or len(e) == 4) or not all([isinstance(ei, int) for ei in e]): ++ raise Exception('Invalid GUI Hint entered: {e!s:s} (Must be a list of {{2,4}} non-negative integers).'.format(e=e)) ++ ++ if (row < 0) or (col < 0): ++ raise Exception('Invalid GUI Hint entered: {e!s:s} (non-negative integers only).'.format(e=e)) ++ ++ if (row_span < 1) or (col_span < 1): ++ raise Exception('Invalid GUI Hint entered: {e!s:s} (positive row/column span required).'.format(e=e)) ++ ++ if tab_set: ++ enabled_blocks = self.get_parent().get_parent().get_enabled_blocks() ++ tab_list = filter(lambda block: str(block.get_key()) == 'qtgui_tab_widget', enabled_blocks) ++ tab_match = filter(lambda t: t.get_id() == tab, tab_list) ++ if not tab_match: ++ raise Exception('Invalid tab name entered: {tab!s:s} (Tab name not found).'.format(tab=tab)) ++ ++ tab_index_size = int(tab_match[0].get_param('num_tabs').get_value()) ++ if index >= tab_index_size: ++ raise Exception('Invalid tab index entered: {tab!s:s}@{index!s:s} (Index out of range).'.format(tab=tab, ++ index=index)) ++ ++ # Code Generation ++ if position_set and tab_set: ++ widget_str = 'self.{tab:s}_grid_layout_{index!s:s}.addWidget({widget:s}, {e!s:s})' ++ widget_str += '\n[self.{tab:s}_grid_layout_{index!s:s}.setRowStretch(r,1) for r in range({fRow:d},{lRow:d})]' ++ widget_str += '\n[self.{tab:s}_grid_layout_{index!s:s}.setColumnStretch(c,1) for c in range({fCol:d},{lCol:d})]' ++ widget_str = widget_str.format(tab=tab, ++ index=index, ++ widget='%s', ++ e=str(e)[1:-1], ++ fRow=row, ++ lRow=(row + row_span), ++ fCol=col, ++ lCol=(col + col_span)) ++ ++ elif position_set and not tab_set: ++ widget_str = 'self.top_grid_layout.addWidget({widget:s}, {e!s:s})' ++ widget_str += '\n[self.top_grid_layout.setRowStretch(r,1) for r in range({fRow:d},{lRow:d})]' ++ widget_str += '\n[self.top_grid_layout.setColumnStretch(c,1) for c in range({fCol:d},{lCol:d})]' ++ widget_str = widget_str.format(widget='%s', ++ e=str(e)[1:-1], ++ fRow=row, ++ lRow=(row + row_span), ++ fCol=col, ++ lCol=(col + col_span)) ++ ++ elif not position_set and tab_set: ++ widget_str = 'self.{tab:s}_layout_{index!s:s}.addWidget({widget:s})' ++ widget_str = widget_str.format(tab=tab, ++ index=index, ++ widget='%s') ++ ++ elif not position_set and not tab_set: ++ widget_str = 'self.top_layout.addWidget({widget:s})' ++ widget_str = widget_str.format(widget='%s') ++ ++ # Collision Detection ++ if position_set: ++ if tab_set: ++ my_parent = '{tab:s}@{index!s:s}'.format(tab=tab, ++ index=index) ++ else: ++ my_parent = 'main' ++ # Calculate hostage cells ++ for r in range(row, row + row_span): ++ for c in range(col, col + col_span): ++ self._hostage_cells.append((my_parent, (r, c))) ++ # Avoid collisions ++ params = filter(lambda p: p is not self, self.get_all_params('gui_hint')) ++ for param in params: ++ for parent, cell in param._hostage_cells: ++ if (parent, cell) in self._hostage_cells: ++ raise Exception('Another graphical element is using parent "{parent!s:s}", cell "{cell!s:s}".'.format(parent=parent, ++ cell=cell)) ++ ++ return widget_str +\ No newline at end of file +diff --git a/grc/core/generator/Generator.py b/grc/core/generator/Generator.py +index 1ed7d2d89d..628ce11abd 100644 +--- a/grc/core/generator/Generator.py ++++ b/grc/core/generator/Generator.py +@@ -397,6 +397,6 @@ class QtHierBlockGenerator(HierBlockGenerator): + + block_n['make'] += ( + "\n#set $win = 'self.%s' % $id" +- "\n${gui_hint()($win)}" ++ "\n${gui_hint() % $win}" + ) + return n +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/cmake-policies gnuradio-3.7.11/debian/patches/cmake-policies --- gnuradio-3.7.11/debian/patches/cmake-policies 2018-02-11 00:06:32.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/cmake-policies 2018-02-20 01:40:16.000000000 +0000 @@ -17,7 +17,7 @@ @@ -26,6 +26,10 @@ endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) # Project setup ######################################################################## - cmake_minimum_required(VERSION 2.6) + cmake_minimum_required(VERSION 2.8.12) +# use cmake_policy to silence warnings without updating code +cmake_policy(SET CMP0026 OLD) +cmake_policy(SET CMP0045 OLD) diff -Nru gnuradio-3.7.11/debian/patches/direct-freedesktop-install gnuradio-3.7.11/debian/patches/direct-freedesktop-install --- gnuradio-3.7.11/debian/patches/direct-freedesktop-install 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/direct-freedesktop-install 2018-02-25 20:45:27.000000000 +0000 @@ -0,0 +1,46 @@ +From bb9200a560b30737ab080d5c2ae0e56281712a99 Mon Sep 17 00:00:00 2001 +From: "A. Maitland Bottoms" +Date: Sun, 25 Feb 2018 15:43:55 -0500 +Subject: [PATCH] direct freedesktop install + +--- + grc/scripts/freedesktop/CMakeLists.txt | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/grc/scripts/freedesktop/CMakeLists.txt b/grc/scripts/freedesktop/CMakeLists.txt +index 47e836f697..9f070c8e1c 100644 +--- a/grc/scripts/freedesktop/CMakeLists.txt ++++ b/grc/scripts/freedesktop/CMakeLists.txt +@@ -34,6 +34,29 @@ install(FILES + COMPONENT "grc" + ) + ++# Install desktop ++install(FILES gnuradio-grc.desktop DESTINATION share/applications) ++ ++# Install mime ++install(FILES gnuradio-grc.xml DESTINATION share/mime/packages) ++install(FILES gnuradio-grc.xml DESTINATION share/mime/application) ++ ++# Install icons ++install(FILES grc-icon-256.png DESTINATION share/icons/gnome/256x256/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-128.png DESTINATION share/icons/gnome/128x128/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-64.png DESTINATION share/icons/gnome/64x64/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-48.png DESTINATION share/icons/gnome/48x48/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-32.png DESTINATION share/icons/gnome/32x32/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-24.png DESTINATION share/icons/gnome/24x24/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-16.png DESTINATION share/icons/gnome/16x16/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-256.png DESTINATION share/icons/hicolor/256x256/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-128.png DESTINATION share/icons/hicolor/128x128/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-64.png DESTINATION share/icons/hicolor/64x64/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-48.png DESTINATION share/icons/hicolor/48x48/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-32.png DESTINATION share/icons/hicolor/32x32/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-24.png DESTINATION share/icons/hicolor/24x24/apps RENAME gnuradio-grc.png) ++install(FILES grc-icon-16.png DESTINATION share/icons/hicolor/16x16/apps RENAME gnuradio-grc.png) ++ + find_program(HAVE_XDG_UTILS xdg-desktop-menu) + + if(UNIX AND HAVE_XDG_UTILS) +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/Fix-AttributeError-NoneType-object-has-no-attribute- gnuradio-3.7.11/debian/patches/Fix-AttributeError-NoneType-object-has-no-attribute- --- gnuradio-3.7.11/debian/patches/Fix-AttributeError-NoneType-object-has-no-attribute- 2018-02-11 00:06:32.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/Fix-AttributeError-NoneType-object-has-no-attribute- 2018-02-25 18:18:21.000000000 +0000 @@ -12,11 +12,9 @@ grc/core/generator/flow_graph.tmpl | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) -diff --git a/gr-uhd/apps/uhd_fft b/gr-uhd/apps/uhd_fft -index 44bd270b97..fc944ded56 100755 --- a/gr-uhd/apps/uhd_fft +++ b/gr-uhd/apps/uhd_fft -@@ -40,7 +40,7 @@ import sip +@@ -40,7 +40,7 @@ import threading import time from distutils.version import StrictVersion @@ -25,7 +23,7 @@ from gnuradio import eng_notation from gnuradio import eng_arg from gnuradio import gr -@@ -60,7 +60,7 @@ class uhd_fft(gr.top_block, Qt.QWidget, UHDApp): +@@ -60,7 +60,7 @@ """ def __init__(self, args): gr.top_block.__init__(self, "UHD FFT") @@ -34,7 +32,7 @@ UHDApp.__init__(self, args=args, prefix="UHD FFT") ################################################## # Init QT App -@@ -82,7 +82,7 @@ class uhd_fft(gr.top_block, Qt.QWidget, UHDApp): +@@ -82,7 +82,7 @@ self.top_grid_layout = Qt.QGridLayout() self.top_layout.addLayout(self.top_grid_layout) self.settings = Qt.QSettings("GNU Radio", "uhd_fft") @@ -43,11 +41,9 @@ ################################################## # Parameters -diff --git a/gr-uhd/apps/uhd_siggen_gui b/gr-uhd/apps/uhd_siggen_gui -index 52c0182c54..16f472fe86 100755 --- a/gr-uhd/apps/uhd_siggen_gui +++ b/gr-uhd/apps/uhd_siggen_gui -@@ -39,7 +39,7 @@ import threading +@@ -39,7 +39,7 @@ import time from distutils.version import StrictVersion from PyQt5 import Qt @@ -56,7 +52,7 @@ from gnuradio import analog from gnuradio import eng_notation from gnuradio import gr -@@ -85,7 +85,7 @@ class uhd_siggen_gui(Qt.QWidget): +@@ -85,7 +85,7 @@ self.top_grid_layout = Qt.QGridLayout() self.top_layout.addLayout(self.top_grid_layout) self.settings = Qt.QSettings("GNU Radio", "uhd_siggen_gui") @@ -65,11 +61,9 @@ ################################################## # Widgets + Controls -diff --git a/grc/blocks/options.xml b/grc/blocks/options.xml -index 1ef1e9df5d..414a16783f 100644 --- a/grc/blocks/options.xml +++ b/grc/blocks/options.xml -@@ -16,7 +16,7 @@ from grc_gnuradio import wxgui as grc_wxgui +@@ -16,7 +16,7 @@ import wx #end if #if $generate_options() == 'qt_gui' @@ -78,19 +72,14 @@ import sys #end if #if not $generate_options().startswith('hb') -diff --git a/grc/core/generator/flow_graph.tmpl b/grc/core/generator/flow_graph.tmpl -index 9fdc1fbb63..8b181849a2 100644 --- a/grc/core/generator/flow_graph.tmpl +++ b/grc/core/generator/flow_graph.tmpl -@@ -118,7 +118,7 @@ class $(class_name)(gr.top_block, Qt.QWidget): - self.top_layout.addLayout(self.top_grid_layout) - - self.settings = Qt.QSettings("GNU Radio", "$class_name") -- self.restoreGeometry(self.settings.value("geometry").toByteArray()) -+ self.restoreGeometry(self.settings.value("geometry", type=QtCore.QByteArray)) +@@ -126,7 +126,7 @@ + if StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"): + self.restoreGeometry(self.settings.value("geometry").toByteArray()) + else: +- self.restoreGeometry(self.settings.value("geometry")) ++ self.restoreGeometry(self.settings.value("geometry", type=QtCore.QByteArray)) #elif $generate_options == 'no_gui' --- -2.11.0 - diff -Nru gnuradio-3.7.11/debian/patches/gnuradio-runtime-ctrlport-qt5 gnuradio-3.7.11/debian/patches/gnuradio-runtime-ctrlport-qt5 --- gnuradio-3.7.11/debian/patches/gnuradio-runtime-ctrlport-qt5 2018-02-11 00:06:32.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/gnuradio-runtime-ctrlport-qt5 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -From 0cfb52b05cdc5d61c6834856400b94a287d54c31 Mon Sep 17 00:00:00 2001 -From: "A. Maitland Bottoms" -Date: Sat, 25 Nov 2017 23:26:07 -0500 -Subject: [PATCH 23/27] gnuradio-runtime-ctrlport-qt5 - ---- - gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py | 4 ++-- - gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor | 4 ++-- - gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx | 4 ++-- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py b/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py -index c5bfd0a8cb..2bb074a940 100644 ---- a/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py -+++ b/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py -@@ -28,10 +28,10 @@ import sys, time, struct - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class GrDataPlotParent(gr.top_block, QtGui.QWidget): -diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor b/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor -index c866776355..ce53c60c0e 100644 ---- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor -+++ b/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor -@@ -20,8 +20,8 @@ - # Boston, MA 02110-1301, USA. - # - --from PyQt4 import QtCore,Qt --import PyQt4.QtGui as QtGui -+from PyQt5 import QtCore,Qt -+import PyQt5.QtGui as QtGui - import os, sys, time, struct - - from gnuradio import gr, ctrlport -diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx -index 15a2153a0f..a9e43bff41 100644 ---- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx -+++ b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx -@@ -46,8 +46,8 @@ except ImportError: - "Please check that they are installed and try again." - sys.exit(1) - --from PyQt4 import QtCore,Qt --import PyQt4.QtGui as QtGui -+from PyQt5 import QtCore,Qt -+import PyQt5.QtGui as QtGui - import itertools - - from gnuradio import gr, ctrlport --- -2.11.0 - diff -Nru gnuradio-3.7.11/debian/patches/gr-qtgui-qt5 gnuradio-3.7.11/debian/patches/gr-qtgui-qt5 --- gnuradio-3.7.11/debian/patches/gr-qtgui-qt5 2018-02-11 00:06:32.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/gr-qtgui-qt5 1970-01-01 00:00:00.000000000 +0000 @@ -1,615 +0,0 @@ -From 824de56f5107943c5ddaf95871cd32820b533a72 Mon Sep 17 00:00:00 2001 -From: "A. Maitland Bottoms" -Date: Sat, 25 Nov 2017 23:18:54 -0500 -Subject: [PATCH 24/27] gr-qtgui-qt5 - ---- - gr-qtgui/apps/gr_constellation_plot | 4 ++-- - gr-qtgui/apps/gr_psd_plot_b | 4 ++-- - gr-qtgui/apps/gr_psd_plot_c | 4 ++-- - gr-qtgui/apps/gr_psd_plot_f | 4 ++-- - gr-qtgui/apps/gr_psd_plot_i | 4 ++-- - gr-qtgui/apps/gr_psd_plot_s | 4 ++-- - gr-qtgui/apps/gr_spectrogram_plot | 4 ++-- - gr-qtgui/apps/gr_spectrogram_plot_b | 4 ++-- - gr-qtgui/apps/gr_spectrogram_plot_c | 4 ++-- - gr-qtgui/apps/gr_spectrogram_plot_f | 4 ++-- - gr-qtgui/apps/gr_spectrogram_plot_i | 4 ++-- - gr-qtgui/apps/gr_spectrogram_plot_s | 4 ++-- - gr-qtgui/apps/gr_time_plot_b | 4 ++-- - gr-qtgui/apps/gr_time_plot_c | 4 ++-- - gr-qtgui/apps/gr_time_plot_f | 4 ++-- - gr-qtgui/apps/gr_time_plot_i | 4 ++-- - gr-qtgui/apps/gr_time_plot_s | 4 ++-- - gr-qtgui/apps/gr_time_raster_b | 4 ++-- - gr-qtgui/apps/gr_time_raster_f | 4 ++-- - gr-qtgui/apps/plot_base.py | 4 ++-- - gr-qtgui/apps/plot_constellation_form.py | 4 ++-- - gr-qtgui/apps/plot_form.py | 4 ++-- - gr-qtgui/apps/plot_psd_base.py | 4 ++-- - gr-qtgui/apps/plot_psd_form.py | 4 ++-- - gr-qtgui/apps/plot_spectrogram_base.py | 4 ++-- - gr-qtgui/apps/plot_spectrogram_form.py | 4 ++-- - gr-qtgui/apps/plot_time_base.py | 4 ++-- - gr-qtgui/apps/plot_time_form.py | 4 ++-- - gr-qtgui/apps/plot_time_raster_base.py | 4 ++-- - gr-qtgui/apps/plot_time_raster_form.py | 4 ++-- - gr-qtgui/apps/uhd_display.py | 6 +++--- - gr-qtgui/doc/qtgui.dox | 4 ++-- - gr-qtgui/examples/pyqt_waterfall_c.py | 2 +- - 33 files changed, 66 insertions(+), 66 deletions(-) - -diff --git a/gr-qtgui/apps/gr_constellation_plot b/gr-qtgui/apps/gr_constellation_plot -index 528bb97e5a..10f6954fb8 100755 ---- a/gr-qtgui/apps/gr_constellation_plot -+++ b/gr-qtgui/apps/gr_constellation_plot -@@ -28,10 +28,10 @@ import os, sys - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - try: -diff --git a/gr-qtgui/apps/gr_psd_plot_b b/gr-qtgui/apps/gr_psd_plot_b -index 606311af48..a5a2e3f21e 100755 ---- a/gr-qtgui/apps/gr_psd_plot_b -+++ b/gr-qtgui/apps/gr_psd_plot_b -@@ -31,10 +31,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class psd_plot_b(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_psd_plot_c b/gr-qtgui/apps/gr_psd_plot_c -index 6df9fae190..e8b83c33f5 100755 ---- a/gr-qtgui/apps/gr_psd_plot_c -+++ b/gr-qtgui/apps/gr_psd_plot_c -@@ -32,10 +32,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class psd_plot_c(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_psd_plot_f b/gr-qtgui/apps/gr_psd_plot_f -index f07e3e8b50..8ad5a283bc 100755 ---- a/gr-qtgui/apps/gr_psd_plot_f -+++ b/gr-qtgui/apps/gr_psd_plot_f -@@ -32,10 +32,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class psd_plot_f(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_psd_plot_i b/gr-qtgui/apps/gr_psd_plot_i -index 1852345823..fda69cfbca 100755 ---- a/gr-qtgui/apps/gr_psd_plot_i -+++ b/gr-qtgui/apps/gr_psd_plot_i -@@ -31,10 +31,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class psd_plot_i(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_psd_plot_s b/gr-qtgui/apps/gr_psd_plot_s -index c06076f1f9..02fe777dda 100755 ---- a/gr-qtgui/apps/gr_psd_plot_s -+++ b/gr-qtgui/apps/gr_psd_plot_s -@@ -31,10 +31,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class psd_plot_s(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_spectrogram_plot b/gr-qtgui/apps/gr_spectrogram_plot -index db79f9dbad..6fb25651ac 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot -+++ b/gr-qtgui/apps/gr_spectrogram_plot -@@ -36,10 +36,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class spectrogram_plot_c(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_spectrogram_plot_b b/gr-qtgui/apps/gr_spectrogram_plot_b -index 0d7a16ea6e..917fc4e9e9 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot_b -+++ b/gr-qtgui/apps/gr_spectrogram_plot_b -@@ -31,10 +31,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class spectrogram_plot_b(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_spectrogram_plot_c b/gr-qtgui/apps/gr_spectrogram_plot_c -index 52b0d4dff7..e6d7455920 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot_c -+++ b/gr-qtgui/apps/gr_spectrogram_plot_c -@@ -32,10 +32,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class spectrogram_plot_c(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_spectrogram_plot_f b/gr-qtgui/apps/gr_spectrogram_plot_f -index 6ea5afc4ef..91eb48b5e5 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot_f -+++ b/gr-qtgui/apps/gr_spectrogram_plot_f -@@ -32,10 +32,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class spectrogram_plot_f(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_spectrogram_plot_i b/gr-qtgui/apps/gr_spectrogram_plot_i -index 893df2a234..4e66585811 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot_i -+++ b/gr-qtgui/apps/gr_spectrogram_plot_i -@@ -31,10 +31,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class spectrogram_plot_i(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_spectrogram_plot_s b/gr-qtgui/apps/gr_spectrogram_plot_s -index 82a22f740d..014663f20f 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot_s -+++ b/gr-qtgui/apps/gr_spectrogram_plot_s -@@ -31,10 +31,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class spectrogram_plot_s(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_time_plot_b b/gr-qtgui/apps/gr_time_plot_b -index d822557f1b..4a5ef3e8a8 100755 ---- a/gr-qtgui/apps/gr_time_plot_b -+++ b/gr-qtgui/apps/gr_time_plot_b -@@ -30,10 +30,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class plot_time_b(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_time_plot_c b/gr-qtgui/apps/gr_time_plot_c -index 202e0f88f4..307cf9b534 100755 ---- a/gr-qtgui/apps/gr_time_plot_c -+++ b/gr-qtgui/apps/gr_time_plot_c -@@ -31,10 +31,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class plot_time_c(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_time_plot_f b/gr-qtgui/apps/gr_time_plot_f -index 8f5ad9f60d..95d3a8a46e 100755 ---- a/gr-qtgui/apps/gr_time_plot_f -+++ b/gr-qtgui/apps/gr_time_plot_f -@@ -31,10 +31,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class plot_time_f(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_time_plot_i b/gr-qtgui/apps/gr_time_plot_i -index 8a7888b451..1d70098ee3 100755 ---- a/gr-qtgui/apps/gr_time_plot_i -+++ b/gr-qtgui/apps/gr_time_plot_i -@@ -30,10 +30,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class plot_time_i(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_time_plot_s b/gr-qtgui/apps/gr_time_plot_s -index 7cee262379..50643e0ae2 100755 ---- a/gr-qtgui/apps/gr_time_plot_s -+++ b/gr-qtgui/apps/gr_time_plot_s -@@ -30,10 +30,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class plot_time_s(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_time_raster_b b/gr-qtgui/apps/gr_time_raster_b -index ad8691489c..370008a2ab 100755 ---- a/gr-qtgui/apps/gr_time_raster_b -+++ b/gr-qtgui/apps/gr_time_raster_b -@@ -31,10 +31,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class plot_time_raster_b(plot_base.plot_base): -diff --git a/gr-qtgui/apps/gr_time_raster_f b/gr-qtgui/apps/gr_time_raster_f -index 5d6a8389cf..7512348e86 100755 ---- a/gr-qtgui/apps/gr_time_raster_f -+++ b/gr-qtgui/apps/gr_time_raster_f -@@ -31,10 +31,10 @@ except ImportError: - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - class plot_time_raster_f(plot_base.plot_base): -diff --git a/gr-qtgui/apps/plot_base.py b/gr-qtgui/apps/plot_base.py -index eaab7599c7..4b57291e06 100644 ---- a/gr-qtgui/apps/plot_base.py -+++ b/gr-qtgui/apps/plot_base.py -@@ -29,10 +29,10 @@ os.environ['GR_CONF_CONTROLPORT_ON'] = 'False' - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - try: -diff --git a/gr-qtgui/apps/plot_constellation_form.py b/gr-qtgui/apps/plot_constellation_form.py -index 01c6ed1865..b81b990eda 100644 ---- a/gr-qtgui/apps/plot_constellation_form.py -+++ b/gr-qtgui/apps/plot_constellation_form.py -@@ -24,10 +24,10 @@ import sys - from gnuradio import filter - - try: -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4." -+ print "Error: Program requires PyQt5." - sys.exit(1) - - try: -diff --git a/gr-qtgui/apps/plot_form.py b/gr-qtgui/apps/plot_form.py -index 931565bd3e..1c7939b93c 100644 ---- a/gr-qtgui/apps/plot_form.py -+++ b/gr-qtgui/apps/plot_form.py -@@ -21,10 +21,10 @@ - # - - try: -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4." -+ print "Error: Program requires PyQt5." - sys.exit(1) - - import numpy -diff --git a/gr-qtgui/apps/plot_psd_base.py b/gr-qtgui/apps/plot_psd_base.py -index 46f903e1b5..0990e439bb 100644 ---- a/gr-qtgui/apps/plot_psd_base.py -+++ b/gr-qtgui/apps/plot_psd_base.py -@@ -27,10 +27,10 @@ import os, sys - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - try: -diff --git a/gr-qtgui/apps/plot_psd_form.py b/gr-qtgui/apps/plot_psd_form.py -index 2d1fcd10bc..bf01af4a5c 100644 ---- a/gr-qtgui/apps/plot_psd_form.py -+++ b/gr-qtgui/apps/plot_psd_form.py -@@ -24,10 +24,10 @@ import sys - from gnuradio import filter - - try: -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4." -+ print "Error: Program requires PyQt5." - sys.exit(1) - - try: -diff --git a/gr-qtgui/apps/plot_spectrogram_base.py b/gr-qtgui/apps/plot_spectrogram_base.py -index b252bb8863..3fae5c252a 100644 ---- a/gr-qtgui/apps/plot_spectrogram_base.py -+++ b/gr-qtgui/apps/plot_spectrogram_base.py -@@ -27,10 +27,10 @@ import os, sys - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - try: -diff --git a/gr-qtgui/apps/plot_spectrogram_form.py b/gr-qtgui/apps/plot_spectrogram_form.py -index 17cb0335bd..d4b1c0dae2 100644 ---- a/gr-qtgui/apps/plot_spectrogram_form.py -+++ b/gr-qtgui/apps/plot_spectrogram_form.py -@@ -24,10 +24,10 @@ import sys - from gnuradio import filter - - try: -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4." -+ print "Error: Program requires PyQt5." - sys.exit(1) - - try: -diff --git a/gr-qtgui/apps/plot_time_base.py b/gr-qtgui/apps/plot_time_base.py -index 007c94d044..31c96ab804 100644 ---- a/gr-qtgui/apps/plot_time_base.py -+++ b/gr-qtgui/apps/plot_time_base.py -@@ -27,10 +27,10 @@ import os, sys - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - try: -diff --git a/gr-qtgui/apps/plot_time_form.py b/gr-qtgui/apps/plot_time_form.py -index 0ab94e6cfe..66c1efc895 100644 ---- a/gr-qtgui/apps/plot_time_form.py -+++ b/gr-qtgui/apps/plot_time_form.py -@@ -24,10 +24,10 @@ import sys - from gnuradio import filter - - try: -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4." -+ print "Error: Program requires PyQt5." - sys.exit(1) - - try: -diff --git a/gr-qtgui/apps/plot_time_raster_base.py b/gr-qtgui/apps/plot_time_raster_base.py -index 856c8c8945..252f4154e8 100644 ---- a/gr-qtgui/apps/plot_time_raster_base.py -+++ b/gr-qtgui/apps/plot_time_raster_base.py -@@ -27,10 +27,10 @@ import os, sys - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - try: -diff --git a/gr-qtgui/apps/plot_time_raster_form.py b/gr-qtgui/apps/plot_time_raster_form.py -index 32fbba0765..4b7a03e51d 100644 ---- a/gr-qtgui/apps/plot_time_raster_form.py -+++ b/gr-qtgui/apps/plot_time_raster_form.py -@@ -24,10 +24,10 @@ import sys, math - from gnuradio import filter - - try: -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4." -+ print "Error: Program requires PyQt5." - sys.exit(1) - - try: -diff --git a/gr-qtgui/apps/uhd_display.py b/gr-qtgui/apps/uhd_display.py -index 0e0c8a177d..8cb2324de6 100755 ---- a/gr-qtgui/apps/uhd_display.py -+++ b/gr-qtgui/apps/uhd_display.py -@@ -31,10 +31,10 @@ import sys - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - try: -@@ -218,7 +218,7 @@ class my_top_block(gr.top_block): - - # Get the reference pointer to the SpectrumDisplayForm QWidget - # Wrap the pointer as a PyQt SIP object -- # This can now be manipulated as a PyQt4.QtGui.QWidget -+ # This can now be manipulated as a PyQt5.QtGui.QWidget - self.pysink = sip.wrapinstance(self.snk.pyqwidget(), QtGui.QWidget) - - self.main_win = main_window(self.pysink, self) -diff --git a/gr-qtgui/doc/qtgui.dox b/gr-qtgui/doc/qtgui.dox -index 8cbbd7367a..7c955d0527 100644 ---- a/gr-qtgui/doc/qtgui.dox -+++ b/gr-qtgui/doc/qtgui.dox -@@ -129,7 +129,7 @@ The QT GUI blocks require the following dependencies. - \li QtCore (version >= 4.4) - \li QtGui (version >= 4.4) - \li QtOpenGL (version >= 4.4) --\li PyQt4 for Qt4 (version >= 4.4) -+\li PyQt5 for Qt5 (version >= 4.4) - \li Qwt (version >= 5.2) - - \section qtgui_usage Usage -@@ -148,7 +148,7 @@ qapp's "exec_()" function is called. This function is a blocking call - while the GUI is alive. - - \code --from PyQt4 import Qt -+from PyQt5 import Qt - from gnuradio import qtgui - import sys, sip - -diff --git a/gr-qtgui/examples/pyqt_waterfall_c.py b/gr-qtgui/examples/pyqt_waterfall_c.py -index 8ec62fc1e2..b17ff56c2f 100755 ---- a/gr-qtgui/examples/pyqt_waterfall_c.py -+++ b/gr-qtgui/examples/pyqt_waterfall_c.py -@@ -29,7 +29,7 @@ try: - from PyQt4 import QtGui, QtCore - 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: --- -2.11.0 - diff -Nru gnuradio-3.7.11/debian/patches/gr-uhd-qt5 gnuradio-3.7.11/debian/patches/gr-uhd-qt5 --- gnuradio-3.7.11/debian/patches/gr-uhd-qt5 2018-02-11 00:06:32.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/gr-uhd-qt5 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -From 8603d18a87c585530afc0b03529c0644290ae883 Mon Sep 17 00:00:00 2001 -From: "A. Maitland Bottoms" -Date: Sat, 25 Nov 2017 23:23:47 -0500 -Subject: [PATCH 25/27] gr-uhd-qt5 - ---- - gr-uhd/apps/uhd_fft | 14 +++++++------- - gr-uhd/apps/uhd_siggen_gui | 14 +++++++------- - 2 files changed, 14 insertions(+), 14 deletions(-) - -diff --git a/gr-uhd/apps/uhd_fft b/gr-uhd/apps/uhd_fft -index a04c310be3..44bd270b97 100755 ---- a/gr-uhd/apps/uhd_fft -+++ b/gr-uhd/apps/uhd_fft -@@ -40,7 +40,7 @@ import sip - import threading - import time - from distutils.version import StrictVersion --from PyQt4 import Qt -+from PyQt5 import Qt - from gnuradio import eng_notation - from gnuradio import eng_arg - from gnuradio import gr -@@ -477,16 +477,16 @@ def main(): - Go, go, go! - """ - args = setup_argparser().parse_args() -- if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): -- Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui','style','raster')) -+ #if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): -+ # Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui','style','raster')) - qapp = Qt.QApplication(sys.argv) - tb = uhd_fft(args) - tb.start() - tb.show() -- def quitting(): -- tb.stop() -- tb.wait() -- qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting) -+ #def quitting(): -+ # tb.stop() -+ # tb.wait() -+ #qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting) - qapp.exec_() - tb = None #to clean up Qt widgets - -diff --git a/gr-uhd/apps/uhd_siggen_gui b/gr-uhd/apps/uhd_siggen_gui -index 9a57aa65ae..52c0182c54 100755 ---- a/gr-uhd/apps/uhd_siggen_gui -+++ b/gr-uhd/apps/uhd_siggen_gui -@@ -38,8 +38,8 @@ import sys - import threading - import time - from distutils.version import StrictVersion --from PyQt4 import Qt --from PyQt4.QtCore import pyqtSlot -+from PyQt5 import Qt -+from PyQt5.QtCore import pyqtSlot - from gnuradio import analog - from gnuradio import eng_notation - from gnuradio import gr -@@ -448,14 +448,14 @@ def main(): - """ Go, go, go! """ - parser = setup_parser() - args = parser.parse_args() -- if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): -- Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui', 'style', 'raster')) -+ #if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): -+ # Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui', 'style', 'raster')) - qapp = Qt.QApplication(sys.argv) - siggen_gui = uhd_siggen_gui(args) - siggen_gui.show() -- def quitting(): -- siggen_gui.stop() -- qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting) -+ #def quitting(): -+ # siggen_gui.stop() -+ #qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting) - qapp.exec_() - siggen_gui = None #to clean up Qt widgets - --- -2.11.0 - diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0001-CMake-Update-required-minimum-version-to-2.8.12.patch gnuradio-3.7.11/debian/patches/qt5-maint-0001-CMake-Update-required-minimum-version-to-2.8.12.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0001-CMake-Update-required-minimum-version-to-2.8.12.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0001-CMake-Update-required-minimum-version-to-2.8.12.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,28 @@ +From b0f4ebcf6d656c829747dded592e182144098d42 Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Tue, 29 Sep 2015 13:57:13 +0200 +Subject: [PATCH 01/22] CMake: Update required minimum version to 2.8.12 + +This is required to use the Qt5-specific macros. + +Signed-off-by: Paul Cercueil +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 59e3c886c4..ae6c1e1d49 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,7 +25,7 @@ endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + ######################################################################## + # Project setup + ######################################################################## +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 2.8.12) + project(gnuradio CXX C) + enable_testing() + +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0002-CMake-FindQwt-Find-the-Qt5-version-of-QWT-instead-of.patch gnuradio-3.7.11/debian/patches/qt5-maint-0002-CMake-FindQwt-Find-the-Qt5-version-of-QWT-instead-of.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0002-CMake-FindQwt-Find-the-Qt5-version-of-QWT-instead-of.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0002-CMake-FindQwt-Find-the-Qt5-version-of-QWT-instead-of.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,40 @@ +From 25dedc0a2a7f0790f280770a7d22e9650ae2adbf Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Tue, 29 Sep 2015 13:30:59 +0200 +Subject: [PATCH 02/22] CMake: FindQwt: Find the Qt5 version of QWT instead of + the Qt4 version + +Signed-off-by: Paul Cercueil +--- + cmake/Modules/FindQwt.cmake | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake +index da8bbe9049..2cffbe66f4 100644 +--- a/cmake/Modules/FindQwt.cmake ++++ b/cmake/Modules/FindQwt.cmake +@@ -11,10 +11,10 @@ find_path(QWT_INCLUDE_DIRS + ${CMAKE_INSTALL_PREFIX}/include/qwt + ${CMAKE_PREFIX_PATH}/include/qwt + PATHS +- /usr/local/include/qwt-qt4 ++ /usr/local/include/qwt-qt5 + /usr/local/include/qwt + /usr/include/qwt6 +- /usr/include/qwt-qt4 ++ /usr/include/qwt-qt5 + /usr/include/qwt + /usr/include/qwt5 + /opt/local/include/qwt +@@ -23,7 +23,7 @@ find_path(QWT_INCLUDE_DIRS + ) + + find_library (QWT_LIBRARIES +- NAMES qwt6 qwt6-qt4 qwt qwt-qt4 qwt5 qwtd5 ++ NAMES qwt6 qwt6-qt5 qwt qwt-qt5 + HINTS + ${CMAKE_INSTALL_PREFIX}/lib + ${CMAKE_INSTALL_PREFIX}/lib64 +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0003-gr-qtgui-update-for-Qt5.patch gnuradio-3.7.11/debian/patches/qt5-maint-0003-gr-qtgui-update-for-Qt5.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0003-gr-qtgui-update-for-Qt5.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0003-gr-qtgui-update-for-Qt5.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,646 @@ +From 1f78d5f2176de31809dc34fb38945c181390cdef Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Tue, 29 Sep 2015 11:25:47 +0200 +Subject: [PATCH 03/22] gr-qtgui: update for Qt5 + +This commit switch the gr-qtgui blocks from being usable with Qt4 to +being usable with Qt5. + +Signed-off-by: Paul Cercueil +--- + gr-qtgui/CMakeLists.txt | 11 ++++------- + gr-qtgui/grc/qtgui_ber_sink_b.xml | 2 +- + gr-qtgui/grc/qtgui_check_box.xml | 2 +- + gr-qtgui/grc/qtgui_chooser.xml | 4 ++-- + gr-qtgui/grc/qtgui_const_sink_x.xml | 2 +- + gr-qtgui/grc/qtgui_entry.xml | 2 +- + gr-qtgui/grc/qtgui_freq_sink_x.xml | 2 +- + gr-qtgui/grc/qtgui_histogram_sink_x.xml | 2 +- + gr-qtgui/grc/qtgui_label.xml | 2 +- + gr-qtgui/grc/qtgui_number_sink.xml | 2 +- + gr-qtgui/grc/qtgui_push_button.xml | 2 +- + gr-qtgui/grc/qtgui_sink_x.xml | 2 +- + gr-qtgui/grc/qtgui_tab_widget.xml | 2 +- + gr-qtgui/grc/qtgui_time_raster_x.xml | 2 +- + gr-qtgui/grc/qtgui_time_sink_x.xml | 2 +- + gr-qtgui/grc/qtgui_vector_sink_f.xml | 2 +- + gr-qtgui/grc/qtgui_waterfall_sink_x.xml | 2 +- + gr-qtgui/include/gnuradio/qtgui/form_menus.h | 1 + + gr-qtgui/lib/CMakeLists.txt | 8 ++++---- + gr-qtgui/lib/SpectrumGUIClass.cc | 1 - + gr-qtgui/lib/const_sink_c_impl.cc | 4 ---- + gr-qtgui/lib/freq_sink_c_impl.cc | 4 ---- + gr-qtgui/lib/freq_sink_f_impl.cc | 4 ---- + gr-qtgui/lib/histogram_sink_f_impl.cc | 4 ---- + gr-qtgui/lib/sink_c_impl.cc | 4 ---- + gr-qtgui/lib/sink_f_impl.cc | 4 ---- + gr-qtgui/lib/time_raster_sink_b_impl.cc | 4 ---- + gr-qtgui/lib/time_raster_sink_f_impl.cc | 4 ---- + gr-qtgui/lib/time_sink_c_impl.cc | 4 ---- + gr-qtgui/lib/time_sink_f_impl.cc | 4 ---- + gr-qtgui/lib/vector_sink_f_impl.cc | 4 ---- + gr-qtgui/lib/waterfall_sink_c_impl.cc | 4 ---- + gr-qtgui/lib/waterfall_sink_f_impl.cc | 4 ---- + gr-qtgui/python/qtgui/range.py | 26 +++++++++++++------------- + 34 files changed, 39 insertions(+), 94 deletions(-) + +diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt +index ad10363c1e..e3dcf7b86b 100644 +--- a/gr-qtgui/CMakeLists.txt ++++ b/gr-qtgui/CMakeLists.txt +@@ -22,14 +22,14 @@ + ######################################################################## + include(GrBoost) + +-find_package(Qt4 4.2.0 COMPONENTS QtCore QtGui) ++find_package(Qt5Widgets) + + find_package(Qwt) + + find_package(PythonLibs 2) + + include(GrPython) +-GR_PYTHON_CHECK_MODULE("PyQt4" PyQt4 True PYQT4_FOUND) ++GR_PYTHON_CHECK_MODULE("PyQt5" PyQt5 True PYQT5_FOUND) + + ######################################################################## + # Register component +@@ -37,13 +37,13 @@ GR_PYTHON_CHECK_MODULE("PyQt4" PyQt4 True PYQT4_FOUND) + include(GrComponent) + if(NOT CMAKE_CROSSCOMPILING) + set(qt_gui_python_deps +- PYQT4_FOUND ++ PYQT5_FOUND + ) + endif(NOT CMAKE_CROSSCOMPILING) + + GR_REGISTER_COMPONENT("gr-qtgui" ENABLE_GR_QTGUI + Boost_FOUND +- QT4_FOUND ++ Qt5Widgets_FOUND + QWT_FOUND + ENABLE_VOLK + ENABLE_GNURADIO_RUNTIME +@@ -66,9 +66,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) +- + ######################################################################## + # Setup CPack components + ######################################################################## +diff --git a/gr-qtgui/grc/qtgui_ber_sink_b.xml b/gr-qtgui/grc/qtgui_ber_sink_b.xml +index da3fc6ebf8..085bf282be 100644 +--- a/gr-qtgui/grc/qtgui_ber_sink_b.xml ++++ b/gr-qtgui/grc/qtgui_ber_sink_b.xml +@@ -7,7 +7,7 @@ + + QT GUI Bercurve Sink + qtgui_bercurve_sink +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + import numpy +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 @@ + + QT GUI Check Box + variable_qtgui_check_box +- from PyQt4 import Qt ++ from PyQt5 import Qt + self.$(id) = $(id) = $value + #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 @@ + + QT GUI Chooser + variable_qtgui_chooser +- from PyQt4 import Qt +- from PyQt4.QtCore import QObject, pyqtSlot ++ from PyQt5 import Qt ++ from PyQt5.QtCore import QObject, pyqtSlot + self.$(id) = $(id) = $value + #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 @@ + + QT GUI Constellation Sink + qtgui_const_sink_x +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #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 @@ + + QT GUI Entry + variable_qtgui_entry +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import eng_notation + self.$(id) = $(id) = $value + #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 @@ + + QT GUI Frequency Sink + qtgui_freq_sink_x +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +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 @@ + + QT GUI Histogram Sink + qtgui_histogram_sink_x +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #set $win = 'self._%s_win'%$id +diff --git a/gr-qtgui/grc/qtgui_label.xml b/gr-qtgui/grc/qtgui_label.xml +index d67f3d7500..946cee36ab 100644 +--- a/gr-qtgui/grc/qtgui_label.xml ++++ b/gr-qtgui/grc/qtgui_label.xml +@@ -9,7 +9,7 @@ + + QT GUI Label + variable_qtgui_label +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import eng_notation + self.$(id) = $(id) = $value + #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 @@ + + QT GUI Number Sink + qtgui_number_sink +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #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 @@ + + QT GUI Push Button + variable_qtgui_push_button +- from PyQt4 import Qt ++ from PyQt5 import Qt + self.$(id) = $(id) = $value + #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 @@ + + QT GUI Sink + qtgui_sink_x +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +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 @@ + + QT GUI Tab Widget + qtgui_tab_widget +- from PyQt4 import Qt ++ from PyQt5 import Qt + #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 @@ + + QT GUI Time Raster Sink + qtgui_time_raster_sink_x +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #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 144cba60eb..d4347950ea 100644 +--- a/gr-qtgui/grc/qtgui_time_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_time_sink_x.xml +@@ -7,7 +7,7 @@ + + QT GUI Time Sink + qtgui_time_sink_x +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +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 @@ + + QT GUI Vector Sink + qtgui_vector_sink_f +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #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 @@ + + QT GUI Waterfall Sink + qtgui_waterfall_sink_x +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +diff --git a/gr-qtgui/include/gnuradio/qtgui/form_menus.h b/gr-qtgui/include/gnuradio/qtgui/form_menus.h +index 5c77f825d8..ed27d747d9 100644 +--- a/gr-qtgui/include/gnuradio/qtgui/form_menus.h ++++ b/gr-qtgui/include/gnuradio/qtgui/form_menus.h +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt +index b1ee580398..4827ec4f3f 100644 +--- a/gr-qtgui/lib/CMakeLists.txt ++++ b/gr-qtgui/lib/CMakeLists.txt +@@ -45,8 +45,8 @@ 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) ++QT5_WRAP_CPP(qtgui_moc_sources ${qtgui_moc_hdrs}) ++QT5_WRAP_UI(qtgui_ui_hdrs spectrumdisplayform.ui) + + #FIXME the sources expect .ui.h, but the macros generate ui_foo.h + #avoid changing the sources by generating the header with the include +@@ -127,7 +127,7 @@ include_directories( + ${GNURADIO_RUNTIME_INCLUDE_DIRS} + ${VOLK_INCLUDE_DIRS} + ${QWT_INCLUDE_DIRS} +- ${QT_INCLUDE_DIRS} ++ ${Qt5Widgets_INCLUDE_DIRS} + ${FFTW3F_INCLUDE_DIRS} + ${LOG4CPP_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} +@@ -156,7 +156,7 @@ list(APPEND qtgui_libs + gnuradio-filter + ${VOLK_LIBRARIES} + ${QWT_LIBRARIES} +- ${QT_LIBRARIES} ++ ${Qt5Widgets_LIBRARIES} + ${FFTW3F_LIBRARIES} + ${LOG4CPP_LIBRARIES} + ) +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 + //Added by qt3to4: + #include +-#include + #include + + 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 7d9a3941c8..b2ec9c7de2 100644 +--- a/gr-qtgui/lib/const_sink_c_impl.cc ++++ b/gr-qtgui/lib/const_sink_c_impl.cc +@@ -127,10 +127,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 ffa4e3017c..9d8e0370a5 100644 +--- a/gr-qtgui/lib/freq_sink_c_impl.cc ++++ b/gr-qtgui/lib/freq_sink_c_impl.cc +@@ -154,10 +154,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_f_impl.cc b/gr-qtgui/lib/freq_sink_f_impl.cc +index 3fe2572eb0..49918e806a 100644 +--- a/gr-qtgui/lib/freq_sink_f_impl.cc ++++ b/gr-qtgui/lib/freq_sink_f_impl.cc +@@ -153,10 +153,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/histogram_sink_f_impl.cc b/gr-qtgui/lib/histogram_sink_f_impl.cc +index cd48de8666..6ad56c8e02 100644 +--- a/gr-qtgui/lib/histogram_sink_f_impl.cc ++++ b/gr-qtgui/lib/histogram_sink_f_impl.cc +@@ -115,10 +115,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/sink_c_impl.cc b/gr-qtgui/lib/sink_c_impl.cc +index ba34eaaa32..1c2823601b 100644 +--- a/gr-qtgui/lib/sink_c_impl.cc ++++ b/gr-qtgui/lib/sink_c_impl.cc +@@ -130,10 +130,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/sink_f_impl.cc b/gr-qtgui/lib/sink_f_impl.cc +index 17a4f78db4..2964783f62 100644 +--- a/gr-qtgui/lib/sink_f_impl.cc ++++ b/gr-qtgui/lib/sink_f_impl.cc +@@ -130,10 +130,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/time_raster_sink_b_impl.cc b/gr-qtgui/lib/time_raster_sink_b_impl.cc +index cc13faf49a..bd26e12f97 100644 +--- a/gr-qtgui/lib/time_raster_sink_b_impl.cc ++++ b/gr-qtgui/lib/time_raster_sink_b_impl.cc +@@ -130,10 +130,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/time_raster_sink_f_impl.cc b/gr-qtgui/lib/time_raster_sink_f_impl.cc +index 873bd68555..322ffdbbb3 100644 +--- a/gr-qtgui/lib/time_raster_sink_f_impl.cc ++++ b/gr-qtgui/lib/time_raster_sink_f_impl.cc +@@ -128,10 +128,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/time_sink_c_impl.cc b/gr-qtgui/lib/time_sink_c_impl.cc +index 6fe06b74a0..4d13b674f0 100644 +--- a/gr-qtgui/lib/time_sink_c_impl.cc ++++ b/gr-qtgui/lib/time_sink_c_impl.cc +@@ -132,10 +132,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/time_sink_f_impl.cc b/gr-qtgui/lib/time_sink_f_impl.cc +index 1298c6c422..477c2ae435 100644 +--- a/gr-qtgui/lib/time_sink_f_impl.cc ++++ b/gr-qtgui/lib/time_sink_f_impl.cc +@@ -129,10 +129,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/vector_sink_f_impl.cc b/gr-qtgui/lib/vector_sink_f_impl.cc +index 6197da4949..e4259e7ffc 100644 +--- a/gr-qtgui/lib/vector_sink_f_impl.cc ++++ b/gr-qtgui/lib/vector_sink_f_impl.cc +@@ -139,10 +139,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/waterfall_sink_c_impl.cc b/gr-qtgui/lib/waterfall_sink_c_impl.cc +index fbc655afba..f17407cfa9 100644 +--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc ++++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc +@@ -154,10 +154,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/waterfall_sink_f_impl.cc b/gr-qtgui/lib/waterfall_sink_f_impl.cc +index fdb8fde686..e4284bab32 100644 +--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc ++++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc +@@ -154,10 +154,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/python/qtgui/range.py b/gr-qtgui/python/qtgui/range.py +index f60d6919bf..f972844114 100755 +--- a/gr-qtgui/python/qtgui/range.py ++++ b/gr-qtgui/python/qtgui/range.py +@@ -21,7 +21,7 @@ + # Boston, MA 02110-1301, USA. + # + +-from PyQt4 import Qt, QtCore, QtGui ++from PyQt5 import Qt, QtCore, QtWidgets + import util + + class Range(object): +@@ -64,10 +64,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 +@@ -98,10 +98,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 + +@@ -124,10 +124,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 + +@@ -166,18 +166,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 + +@@ -196,10 +196,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 + +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0004-grc-Generate-Python-scripts-that-use-PyQt5.patch gnuradio-3.7.11/debian/patches/qt5-maint-0004-grc-Generate-Python-scripts-that-use-PyQt5.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0004-grc-Generate-Python-scripts-that-use-PyQt5.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0004-grc-Generate-Python-scripts-that-use-PyQt5.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,60 @@ +From e58eb487c4119866f8c820658c8cda173bc96370 Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Tue, 29 Sep 2015 13:22:46 +0200 +Subject: [PATCH 04/22] grc: Generate Python scripts that use PyQt5 + +Signed-off-by: Paul Cercueil +--- + grc/blocks/options.xml | 2 +- + grc/core/generator/flow_graph.tmpl | 8 ++------ + 2 files changed, 3 insertions(+), 7 deletions(-) + +diff --git a/grc/blocks/options.xml b/grc/blocks/options.xml +index 1dee986c5c..1ef1e9df5d 100644 +--- a/grc/blocks/options.xml ++++ b/grc/blocks/options.xml +@@ -16,7 +16,7 @@ from grc_gnuradio import wxgui as grc_wxgui + import wx + #end if + #if $generate_options() == 'qt_gui' +-from PyQt4 import Qt ++from PyQt5 import Qt + import sys + #end if + #if not $generate_options().startswith('hb') +diff --git a/grc/core/generator/flow_graph.tmpl b/grc/core/generator/flow_graph.tmpl +index 1ef251c46b..1d657701c1 100644 +--- a/grc/core/generator/flow_graph.tmpl ++++ b/grc/core/generator/flow_graph.tmpl +@@ -118,7 +118,7 @@ class $(class_name)(gr.top_block, Qt.QWidget): + self.top_layout.addLayout(self.top_grid_layout) + + self.settings = Qt.QSettings("GNU Radio", "$class_name") +- self.restoreGeometry(self.settings.value("geometry").toByteArray()) ++ self.restoreGeometry(self.settings.value("geometry")) + #elif $generate_options == 'no_gui' + + +@@ -379,10 +379,6 @@ def main(top_block_cls=$(class_name), options=None): + tb.Wait() + #end if + #elif $generate_options == 'qt_gui' +- from distutils.version import StrictVersion +- if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): +- style = gr.prefs().get_string('qtgui', 'style', 'raster') +- Qt.QApplication.setGraphicsSystem(style) + qapp = Qt.QApplication(sys.argv) + + tb = top_block_cls($(', '.join($params_eq_list))) +@@ -401,7 +397,7 @@ def main(top_block_cls=$(class_name), options=None): + def quitting(): + tb.stop() + tb.wait() +- qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting) ++ qapp.aboutToQuit.connect(quitting) + #for $m in $monitors + if $m.has_param('en'): + if $m.get_param('en').get_value(): +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0005-gr-qtgui-Add-a-workaround-for-an-upstream-bug-of-uic.patch gnuradio-3.7.11/debian/patches/qt5-maint-0005-gr-qtgui-Add-a-workaround-for-an-upstream-bug-of-uic.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0005-gr-qtgui-Add-a-workaround-for-an-upstream-bug-of-uic.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0005-gr-qtgui-Add-a-workaround-for-an-upstream-bug-of-uic.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,33 @@ +From 45c65ebeefcb20c2d2480b11b299d49f288c3b73 Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Mon, 12 Oct 2015 12:19:42 +0200 +Subject: [PATCH 05/22] gr-qtgui: Add a workaround for an upstream bug of 'uic' + +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. + +Signed-off-by: Paul Cercueil +--- + gr-qtgui/include/QtWidgets/QRegExpValidator | 9 +++++++++ + 1 file changed, 9 insertions(+) + create mode 100644 gr-qtgui/include/QtWidgets/QRegExpValidator + +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 +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0006-qtgui-fixed-examples-for-Qt5-compatibility.patch gnuradio-3.7.11/debian/patches/qt5-maint-0006-qtgui-fixed-examples-for-Qt5-compatibility.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0006-qtgui-fixed-examples-for-Qt5-compatibility.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0006-qtgui-fixed-examples-for-Qt5-compatibility.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,4737 @@ +From 8abc28b44c65bf710235be7d1528c5ad92f53e53 Mon Sep 17 00:00:00 2001 +From: Tom Rondeau +Date: Tue, 13 Oct 2015 18:47:32 -0400 +Subject: [PATCH 06/22] qtgui: fixed examples for Qt5 compatibility. + +--- + gr-qtgui/examples/pyqt_const_c.py | 62 +- + gr-qtgui/examples/pyqt_example_c.py | 59 +- + gr-qtgui/examples/pyqt_example_f.py | 59 +- + gr-qtgui/examples/pyqt_freq_c.py | 59 +- + gr-qtgui/examples/pyqt_freq_f.py | 60 +- + gr-qtgui/examples/pyqt_histogram_f.py | 73 +- + gr-qtgui/examples/pyqt_time_c.py | 66 +- + gr-qtgui/examples/pyqt_time_f.py | 67 +- + gr-qtgui/examples/pyqt_time_raster_b.py | 19 +- + gr-qtgui/examples/pyqt_time_raster_f.py | 19 +- + gr-qtgui/examples/pyqt_waterfall_c.py | 59 +- + gr-qtgui/examples/pyqt_waterfall_f.py | 62 +- + gr-qtgui/examples/qtgui_tags_viewing.grc | 2399 +++++++++++++++++++++++------- + 13 files changed, 2164 insertions(+), 899 deletions(-) + +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 @@ +- ++ ++ + + Wed Nov 6 11:52:40 2013 + + options + +- id +- qtgui_tags_viewing ++ author ++ + + +- _enabled +- True ++ window_size ++ 1280, 1024 + + +- title +- ++ category ++ Custom + + +- author ++ comment + + + +@@ -24,241 +25,260 @@ + + + +- window_size +- 1280, 1024 ++ _enabled ++ True + + +- generate_options +- qt_gui ++ _coordinate ++ (10, 10) + + +- category +- Custom ++ _rotation ++ 0 + + +- run_options +- run ++ generate_options ++ qt_gui + + +- run +- True ++ id ++ qtgui_tags_viewing + + + max_nouts + 0 + + +- realtime_scheduling ++ qt_qss_theme + + + +- _coordinate +- (10, 10) ++ realtime_scheduling ++ + + +- _rotation +- 0 ++ run_command ++ {python} -u {filename} + +- +- +- variable + +- id +- samp_rate ++ run_options ++ run + + +- _enabled ++ run + True + + +- value +- 32000 +- +- +- _coordinate +- (172, 10) ++ thread_safe_setters ++ + + +- _rotation +- 0 ++ title ++ + + + +- import ++ variable_qtgui_range + +- id +- import_1 ++ comment ++ ++ ++ ++ value ++ 300 + + + _enabled + True + + +- import +- from gnuradio.digital.utils import tagged_streams ++ _coordinate ++ (814, 390) + + +- _coordinate +- (99, 72) ++ gui_hint ++ + + + _rotation + 0 + +- +- +- import + + id +- import_0 ++ delay + + +- _enabled +- True ++ label ++ Delay + + +- import +- import scipy ++ min_len ++ 200 + + +- _coordinate +- (9, 71) ++ orient ++ Qt.Horizontal + + +- _rotation ++ start + 0 + ++ ++ step ++ 1 ++ ++ ++ stop ++ 1000 ++ ++ ++ rangeType ++ float ++ ++ ++ widget ++ counter_slider ++ + + +- import ++ variable_qtgui_range + +- id +- import_2 ++ comment ++ ++ ++ ++ value ++ 30 + + + _enabled + True + + +- import +- import time ++ _coordinate ++ (936, 392) + + +- _coordinate +- (253, 71) ++ gui_hint ++ + + + _rotation + 0 + +- +- +- blocks_delay + + id +- blocks_delay_0 ++ ntaps + + +- _enabled +- True ++ label ++ Num Taps + + +- type +- complex ++ min_len ++ 200 + + +- delay +- 1000 ++ orient ++ Qt.Horizontal + + +- num_ports ++ start + 1 + + +- vlen ++ step + 1 + + +- affinity +- +- +- +- minoutbuf +- 0 ++ stop ++ 100 + + +- _coordinate +- (300, 240) ++ rangeType ++ float + + +- _rotation +- 0 ++ widget ++ counter_slider + + + +- blocks_tags_strobe ++ variable + +- id +- blocks_tags_strobe_0 ++ comment ++ + + + _enabled + True + + +- type +- complex ++ _coordinate ++ (172, 10) ++ ++ ++ _rotation ++ 0 ++ ++ ++ id ++ samp_rate + + + value +- pmt.intern("TEST") ++ 32000 + ++ ++ ++ analog_fastnoise_source_x + +- nsamps +- 10000 ++ amp ++ 0.004 + + +- vlen +- 1 ++ alias ++ ++ ++ ++ comment ++ + + + affinity + + + +- minoutbuf +- 0 ++ _enabled ++ True + + + _coordinate +- (16, 232) ++ (350, 39) + + + _rotation + 0 + +- +- +- analog_fastnoise_source_x + + id + analog_fastnoise_source_x_0 + + +- _enabled +- True ++ maxoutbuf ++ 0 + + +- type +- complex ++ minoutbuf ++ 0 + + + noise_type + analog.GR_GAUSSIAN + + +- amp +- 0.004 ++ type ++ complex + + + seed +@@ -268,85 +288,101 @@ + samples + 8192 + ++ ++ ++ blocks_add_xx ++ ++ alias ++ ++ ++ ++ comment ++ ++ + + affinity + + + +- minoutbuf +- 0 ++ _enabled ++ True + + + _coordinate +- (350, 39) ++ (482, 193) + + + _rotation + 0 + +- +- +- blocks_vector_source_x + + id +- blocks_vector_source_x_0 +- +- +- _enabled +- True ++ blocks_add_xx_0 + + + type + complex + + +- vector +- [0.85+0.5j, 0.85, 0.85, 0.85+0.5j] + (10000-4)*[0,] ++ maxoutbuf ++ 0 + + +- tags +- tagged_streams.make_lengthtags((1024,), (0,), "testing tags 0") ++ minoutbuf ++ 0 + + +- repeat +- True ++ num_inputs ++ 2 + + + vlen + 1 + ++ ++ ++ blocks_add_xx + +- affinity ++ alias + + + +- minoutbuf +- 0 ++ comment ++ ++ ++ ++ affinity ++ ++ ++ ++ _enabled ++ True + + + _coordinate +- (13, 132) ++ (707, 176) + + + _rotation + 0 + +- +- +- blocks_add_xx + + id +- blocks_add_xx_0 +- +- +- _enabled +- True ++ blocks_add_xx_1 + + + type + complex + + ++ maxoutbuf ++ 0 ++ ++ ++ minoutbuf ++ 0 ++ ++ + num_inputs + 2 + +@@ -354,439 +390,1691 @@ + vlen + 1 + ++ ++ ++ blocks_delay ++ ++ alias ++ ++ ++ ++ comment ++ ++ + + affinity + + + +- minoutbuf +- 0 ++ delay ++ 1000 ++ ++ ++ _enabled ++ True + + + _coordinate +- (482, 193) ++ (300, 240) + + + _rotation + 0 + +- +- +- blocks_add_xx + + id +- blocks_add_xx_1 ++ blocks_delay_0 + + +- _enabled +- True ++ maxoutbuf ++ 0 + + +- type +- complex ++ minoutbuf ++ 0 + + +- num_inputs +- 2 ++ num_ports ++ 1 ++ ++ ++ type ++ complex + + + vlen + 1 + ++ ++ ++ blocks_delay ++ ++ alias ++ ++ ++ ++ comment ++ ++ + + affinity + + + +- minoutbuf +- 0 ++ delay ++ int(delay) ++ ++ ++ _enabled ++ True + + + _coordinate +- (707, 176) ++ (890, 44) + + + _rotation + 0 + +- +- +- blocks_throttle + + id +- blocks_throttle_0 ++ blocks_delay_0_0 + + +- _enabled +- True ++ maxoutbuf ++ 0 + + +- type +- complex ++ minoutbuf ++ 0 + + +- samples_per_second +- 50e3 ++ num_ports ++ 1 ++ ++ ++ type ++ complex + + + vlen + 1 + ++ ++ ++ blocks_tags_strobe ++ ++ alias ++ ++ ++ ++ comment ++ ++ + + affinity + + + +- minoutbuf +- 0 ++ _enabled ++ True + + + _coordinate +- (266, 149) ++ (16, 232) + + + _rotation + 0 + +- +- +- variable_qtgui_range + + id +- ntaps ++ blocks_tags_strobe_0 + + +- _enabled +- True ++ key ++ pmt.intern("strobe") + + +- label +- Num Taps ++ maxoutbuf ++ 0 + + +- value +- 30 ++ minoutbuf ++ 0 + + +- start +- 1 ++ nsamps ++ 10000 + + +- stop +- 100 ++ type ++ complex + + +- step +- 1 ++ value ++ pmt.intern("TEST") + + +- widget +- counter_slider ++ vlen ++ 1 + ++ ++ ++ blocks_throttle + +- orient +- Qt.Horizontal ++ alias ++ + + +- min_len +- 200 ++ comment ++ + + +- gui_hint ++ affinity + + + ++ _enabled ++ True ++ ++ + _coordinate +- (936, 392) ++ (266, 149) + + + _rotation + 0 + +- +- +- qtgui_time_sink_x + + id +- qtgui_time_sink_x_0_1_0 ++ blocks_throttle_0 + + +- _enabled ++ ignoretag + True + + ++ maxoutbuf ++ 0 ++ ++ ++ minoutbuf ++ 0 ++ ++ ++ samples_per_second ++ 50e3 ++ ++ + type + complex + + +- name ++ vlen ++ 1 ++ ++ ++ ++ blocks_throttle ++ ++ alias + + + +- size +- 5100 ++ comment ++ + + +- srate +- samp_rate ++ affinity ++ + + +- ymin +- -0.1 ++ _enabled ++ False + + +- ymax +- 1.5 ++ _coordinate ++ (267, 414) + + +- nconnections +- 1 ++ _rotation ++ 0 + + +- update_time +- 0.001 ++ id ++ blocks_throttle_0_0 + + +- tr_mode +- qtgui.TRIG_MODE_TAG ++ ignoretag ++ True + + +- tr_slope +- qtgui.TRIG_SLOPE_POS ++ maxoutbuf ++ 0 + + +- tr_level +- .5 ++ minoutbuf ++ 0 + + +- tr_delay +- 0.06 ++ samples_per_second ++ samp_rate + + +- tr_chan +- 0 ++ type ++ float + + +- tr_tag +- strobe ++ vlen ++ 1 + ++ ++ ++ blocks_vector_source_x + +- entags +- True ++ alias ++ + + +- gui_hint +- 1,1,1,1 ++ comment ++ + + + affinity + + + ++ _enabled ++ True ++ ++ + _coordinate +- (857, 173) ++ (13, 132) ++ ++ ++ _rotation ++ 0 ++ ++ ++ id ++ blocks_vector_source_x_0 ++ ++ ++ maxoutbuf ++ 0 ++ ++ ++ minoutbuf ++ 0 ++ ++ ++ type ++ complex ++ ++ ++ repeat ++ True ++ ++ ++ tags ++ tagged_streams.make_lengthtags((1024,), (0,), "testing tags 0") ++ ++ ++ vlen ++ 1 ++ ++ ++ vector ++ [0.85+0.5j, 0.85, 0.85, 0.85+0.5j] + (10000-4)*[0,] ++ ++ ++ ++ blocks_vector_source_x ++ ++ alias ++ ++ ++ ++ comment ++ ++ ++ ++ affinity ++ ++ ++ ++ _enabled ++ True ++ ++ ++ _coordinate ++ (15, 315) ++ ++ ++ _rotation ++ 0 ++ ++ ++ id ++ blocks_vector_source_x_0_0 ++ ++ ++ maxoutbuf ++ 0 ++ ++ ++ minoutbuf ++ 0 ++ ++ ++ type ++ complex ++ ++ ++ repeat ++ True ++ ++ ++ tags ++ tagged_streams.make_lengthtags((128,), (1500,), "second stream") ++ ++ ++ vlen ++ 1 ++ ++ ++ vector ++ 1500*[0,] + [0.25+0j,] + (10000-1500-1)*[0,] ++ ++ ++ ++ blocks_vector_source_x ++ ++ alias ++ ++ ++ ++ comment ++ ++ ++ ++ affinity ++ ++ ++ ++ _enabled ++ False ++ ++ ++ _coordinate ++ (15, 489) ++ ++ ++ _rotation ++ 0 ++ ++ ++ id ++ blocks_vector_source_x_0_0_0 ++ ++ ++ maxoutbuf ++ 0 ++ ++ ++ minoutbuf ++ 0 ++ ++ ++ type ++ float ++ ++ ++ repeat ++ True ++ ++ ++ tags ++ tagged_streams.make_lengthtags((128,), (110,), "second stream") ++ ++ ++ vlen ++ 1 ++ ++ ++ vector ++ 10*[0,] + [0.5,] + (100-10-1)*[0,] ++ ++ ++ ++ blocks_vector_source_x ++ ++ alias ++ ++ ++ ++ comment ++ ++ ++ ++ affinity ++ ++ ++ ++ _enabled ++ False ++ ++ ++ _coordinate ++ (15, 398) ++ ++ ++ _rotation ++ 0 ++ ++ ++ id ++ blocks_vector_source_x_0_1 ++ ++ ++ maxoutbuf ++ 0 ++ ++ ++ minoutbuf ++ 0 ++ ++ ++ type ++ float ++ ++ ++ repeat ++ True ++ ++ ++ tags ++ tagged_streams.make_lengthtags((1024,), (0,), "testing tags") ++ ++ ++ vlen ++ 1 ++ ++ ++ vector ++ [-0.85,] + (100-1)*[0,] ++ ++ ++ ++ fir_filter_xxx ++ ++ alias ++ ++ ++ ++ comment ++ ++ ++ ++ affinity ++ ++ ++ ++ decim ++ 1 ++ ++ ++ _enabled ++ True ++ ++ ++ _coordinate ++ (660, 76) ++ ++ ++ _rotation ++ 0 ++ ++ ++ id ++ fir_filter_xxx_0 ++ ++ ++ maxoutbuf ++ 0 ++ ++ ++ minoutbuf ++ 0 ++ ++ ++ samp_delay ++ int(ntaps) ++ ++ ++ taps ++ int(ntaps)*[1,]+[1,] ++ ++ ++ type ++ ccc ++ ++ ++ ++ import ++ ++ alias ++ ++ ++ ++ comment ++ ++ ++ ++ _enabled ++ True ++ ++ ++ _coordinate ++ (9, 71) ++ ++ ++ _rotation ++ 0 ++ ++ ++ id ++ import_0 ++ ++ ++ import ++ import scipy ++ ++ ++ ++ import ++ ++ alias ++ ++ ++ ++ comment ++ ++ ++ ++ _enabled ++ True ++ ++ ++ _coordinate ++ (99, 72) ++ ++ ++ _rotation ++ 0 ++ ++ ++ id ++ import_1 ++ ++ ++ import ++ from gnuradio.digital.utils import tagged_streams ++ ++ ++ ++ import ++ ++ alias ++ ++ ++ ++ comment ++ ++ ++ ++ _enabled ++ True ++ ++ ++ _coordinate ++ (253, 71) ++ ++ ++ _rotation ++ 0 ++ ++ ++ id ++ import_2 ++ ++ ++ import ++ import time ++ ++ ++ ++ qtgui_time_sink_x ++ ++ autoscale ++ False ++ ++ ++ alias ++ ++ ++ ++ comment ++ ++ ++ ++ ctrlpanel ++ False ++ ++ ++ affinity ++ ++ ++ ++ entags ++ True ++ ++ ++ _enabled ++ True ++ ++ ++ _coordinate ++ (860, 298) ++ ++ ++ gui_hint ++ ++ ++ ++ _rotation ++ 0 ++ ++ ++ grid ++ False ++ ++ ++ id ++ qtgui_time_sink_x_0 ++ ++ ++ legend ++ True ++ ++ ++ alpha1 ++ 1.0 ++ ++ ++ color1 ++ "blue" ++ ++ ++ label1 ++ ++ ++ ++ marker1 ++ -1 ++ ++ ++ style1 ++ 1 ++ ++ ++ width1 ++ 1 ++ ++ ++ alpha10 ++ 1.0 ++ ++ ++ color10 ++ "blue" ++ ++ ++ label10 ++ ++ ++ ++ marker10 ++ -1 ++ ++ ++ style10 ++ 1 ++ ++ ++ width10 ++ 1 ++ ++ ++ alpha2 ++ 1.0 ++ ++ ++ color2 ++ "red" ++ ++ ++ label2 ++ ++ ++ ++ marker2 ++ -1 ++ ++ ++ style2 ++ 1 ++ ++ ++ width2 ++ 1 ++ ++ ++ alpha3 ++ 1.0 ++ ++ ++ color3 ++ "green" ++ ++ ++ label3 ++ ++ ++ ++ marker3 ++ -1 ++ ++ ++ style3 ++ 1 ++ ++ ++ width3 ++ 1 ++ ++ ++ alpha4 ++ 1.0 ++ ++ ++ color4 ++ "black" ++ ++ ++ label4 ++ ++ ++ ++ marker4 ++ -1 ++ ++ ++ style4 ++ 1 ++ ++ ++ width4 ++ 1 ++ ++ ++ alpha5 ++ 1.0 ++ ++ ++ color5 ++ "cyan" ++ ++ ++ label5 ++ ++ ++ ++ marker5 ++ -1 ++ ++ ++ style5 ++ 1 ++ ++ ++ width5 ++ 1 ++ ++ ++ alpha6 ++ 1.0 ++ ++ ++ color6 ++ "magenta" ++ ++ ++ label6 ++ ++ ++ ++ marker6 ++ -1 ++ ++ ++ style6 ++ 1 ++ ++ ++ width6 ++ 1 ++ ++ ++ alpha7 ++ 1.0 ++ ++ ++ color7 ++ "yellow" ++ ++ ++ label7 ++ ++ ++ ++ marker7 ++ -1 ++ ++ ++ style7 ++ 1 ++ ++ ++ width7 ++ 1 ++ ++ ++ alpha8 ++ 1.0 ++ ++ ++ color8 ++ "dark red" ++ ++ ++ label8 ++ ++ ++ ++ marker8 ++ -1 ++ ++ ++ style8 ++ 1 ++ ++ ++ width8 ++ 1 ++ ++ ++ alpha9 ++ 1.0 ++ ++ ++ color9 ++ "dark green" ++ ++ ++ label9 ++ ++ ++ ++ marker9 ++ -1 ++ ++ ++ style9 ++ 1 ++ ++ ++ width9 ++ 1 ++ ++ ++ name ++ ++ ++ ++ nconnections ++ 2 ++ ++ ++ size ++ 18000 ++ ++ ++ srate ++ samp_rate ++ ++ ++ tr_chan ++ 0 ++ ++ ++ tr_delay ++ 0 ++ ++ ++ tr_level ++ 0.1 ++ ++ ++ tr_mode ++ qtgui.TRIG_MODE_NORM ++ ++ ++ tr_slope ++ qtgui.TRIG_SLOPE_POS ++ ++ ++ tr_tag ++ "" ++ ++ ++ type ++ complex ++ ++ ++ update_time ++ 0.10 ++ ++ ++ ylabel ++ Amplitude ++ ++ ++ yunit ++ "" ++ ++ ++ ymax ++ 1.5 ++ ++ ++ ymin ++ -0.1 ++ ++ ++ ++ qtgui_time_sink_x ++ ++ autoscale ++ False ++ ++ ++ alias ++ ++ ++ ++ comment ++ ++ ++ ++ ctrlpanel ++ False ++ ++ ++ affinity ++ ++ ++ ++ entags ++ True ++ ++ ++ _enabled ++ False ++ ++ ++ _coordinate ++ (475, 444) ++ ++ ++ gui_hint ++ ++ ++ ++ _rotation ++ 0 ++ ++ ++ grid ++ False ++ ++ ++ id ++ qtgui_time_sink_x_0_0 ++ ++ ++ legend ++ True ++ ++ ++ alpha1 ++ 1.0 ++ ++ ++ color1 ++ "blue" ++ ++ ++ label1 ++ ++ ++ ++ marker1 ++ -1 ++ ++ ++ style1 ++ 1 ++ ++ ++ width1 ++ 1 ++ ++ ++ alpha10 ++ 1.0 ++ ++ ++ color10 ++ "blue" ++ ++ ++ label10 ++ ++ ++ ++ marker10 ++ -1 ++ ++ ++ style10 ++ 1 ++ ++ ++ width10 ++ 1 ++ ++ ++ alpha2 ++ 1.0 ++ ++ ++ color2 ++ "red" ++ ++ ++ label2 ++ ++ ++ ++ marker2 ++ -1 ++ ++ ++ style2 ++ 1 ++ ++ ++ width2 ++ 1 ++ ++ ++ alpha3 ++ 1.0 ++ ++ ++ color3 ++ "green" ++ ++ ++ label3 ++ ++ ++ ++ marker3 ++ -1 ++ ++ ++ style3 ++ 1 ++ ++ ++ width3 ++ 1 ++ ++ ++ alpha4 ++ 1.0 ++ ++ ++ color4 ++ "black" ++ ++ ++ label4 ++ ++ ++ ++ marker4 ++ -1 ++ ++ ++ style4 ++ 1 ++ ++ ++ width4 ++ 1 ++ ++ ++ alpha5 ++ 1.0 ++ ++ ++ color5 ++ "cyan" ++ ++ ++ label5 ++ ++ ++ ++ marker5 ++ -1 ++ ++ ++ style5 ++ 1 ++ ++ ++ width5 ++ 1 ++ ++ ++ alpha6 ++ 1.0 ++ ++ ++ color6 ++ "magenta" ++ ++ ++ label6 ++ ++ ++ ++ marker6 ++ -1 ++ ++ ++ style6 ++ 1 ++ ++ ++ width6 ++ 1 ++ ++ ++ alpha7 ++ 1.0 ++ ++ ++ color7 ++ "yellow" ++ ++ ++ label7 ++ ++ ++ ++ marker7 ++ -1 ++ ++ ++ style7 ++ 1 ++ ++ ++ width7 ++ 1 ++ ++ ++ alpha8 ++ 1.0 ++ ++ ++ color8 ++ "dark red" ++ ++ ++ label8 ++ ++ ++ ++ marker8 ++ -1 ++ ++ ++ style8 ++ 1 ++ ++ ++ width8 ++ 1 ++ ++ ++ alpha9 ++ 1.0 ++ ++ ++ color9 ++ "dark green" ++ ++ ++ label9 ++ ++ ++ ++ marker9 ++ -1 ++ ++ ++ style9 ++ 1 ++ ++ ++ width9 ++ 1 ++ ++ ++ name ++ ++ ++ ++ nconnections ++ 2 ++ ++ ++ size ++ 1024 ++ ++ ++ srate ++ samp_rate ++ ++ ++ tr_chan ++ 1 ++ ++ ++ tr_delay ++ 0 ++ ++ ++ tr_level ++ 0.0 ++ ++ ++ tr_mode ++ qtgui.TRIG_MODE_TAG ++ ++ ++ tr_slope ++ qtgui.TRIG_SLOPE_POS ++ ++ ++ tr_tag ++ second stream ++ ++ ++ type ++ float ++ ++ ++ update_time ++ 0.10 ++ ++ ++ ylabel ++ Amplitude ++ ++ ++ yunit ++ "" ++ ++ ++ ymax ++ 1 ++ ++ ++ ymin ++ -1 ++ ++ ++ ++ qtgui_time_sink_x ++ ++ autoscale ++ False ++ ++ ++ alias ++ ++ ++ ++ comment ++ ++ ++ ++ ctrlpanel ++ False ++ ++ ++ affinity ++ ++ ++ ++ entags ++ True ++ ++ ++ _enabled ++ True ++ ++ ++ _coordinate ++ (1072, 77) ++ ++ ++ gui_hint ++ 1,0,1,1 ++ ++ ++ _rotation ++ 0 ++ ++ ++ grid ++ False ++ ++ ++ id ++ qtgui_time_sink_x_0_1 ++ ++ ++ legend ++ True ++ ++ ++ alpha1 ++ 1.0 ++ ++ ++ color1 ++ "blue" ++ ++ ++ label1 ++ ++ ++ ++ marker1 ++ -1 ++ ++ ++ style1 ++ 1 ++ ++ ++ width1 ++ 1 ++ ++ ++ alpha10 ++ 1.0 ++ ++ ++ color10 ++ "blue" ++ ++ ++ label10 ++ ++ ++ ++ marker10 ++ -1 ++ ++ ++ style10 ++ 1 + + +- _rotation +- 0 ++ width10 ++ 1 + +- +- +- blocks_vector_source_x + +- id +- blocks_vector_source_x_0_0 ++ alpha2 ++ 1.0 + + +- _enabled +- True ++ color2 ++ "red" + + +- type +- complex ++ label2 ++ + + +- vector +- 1500*[0,] + [0.25+0j,] + (10000-1500-1)*[0,] ++ marker2 ++ -1 + + +- tags +- tagged_streams.make_lengthtags((128,), (1500,), "second stream") ++ style2 ++ 1 + + +- repeat +- True ++ width2 ++ 1 + + +- vlen +- 1 ++ alpha3 ++ 1.0 + + +- affinity +- ++ color3 ++ "green" + + +- minoutbuf +- 0 ++ label3 ++ + + +- _coordinate +- (15, 315) ++ marker3 ++ -1 + + +- _rotation +- 0 ++ style3 ++ 1 + +- +- +- qtgui_time_sink_x + +- id +- qtgui_time_sink_x_0 ++ width3 ++ 1 + + +- _enabled +- True ++ alpha4 ++ 1.0 + + +- type +- complex ++ color4 ++ "black" + + +- name ++ label4 + + + +- size +- 18000 ++ marker4 ++ -1 + + +- srate +- samp_rate ++ style4 ++ 1 + + +- ymin +- -0.1 ++ width4 ++ 1 + + +- ymax +- 1.5 ++ alpha5 ++ 1.0 + + +- nconnections +- 2 ++ color5 ++ "cyan" + + +- update_time +- 0.10 ++ label5 ++ + + +- tr_mode +- qtgui.TRIG_MODE_NORM ++ marker5 ++ -1 + + +- tr_slope +- qtgui.TRIG_SLOPE_POS ++ style5 ++ 1 + + +- tr_level +- 0.1 ++ width5 ++ 1 + + +- tr_delay +- 0 ++ alpha6 ++ 1.0 + + +- tr_chan +- 0 ++ color6 ++ "magenta" + + +- tr_tag +- "" ++ label6 ++ + + +- entags +- True ++ marker6 ++ -1 + + +- gui_hint +- ++ style6 ++ 1 + + +- affinity +- ++ width6 ++ 1 + + +- _coordinate +- (860, 298) ++ alpha7 ++ 1.0 + + +- _rotation +- 0 ++ color7 ++ "yellow" + +- +- +- fir_filter_xxx + +- id +- fir_filter_xxx_0 ++ label7 ++ + + +- _enabled +- True ++ marker7 ++ -1 + + +- type +- ccc ++ style7 ++ 1 + + +- decim ++ width7 + 1 + + +- taps +- int(ntaps)*[1,]+[1,] ++ alpha8 ++ 1.0 + + +- samp_delay +- int(ntaps) ++ color8 ++ "dark red" + + +- affinity ++ label8 + + + +- minoutbuf +- 0 ++ marker8 ++ -1 + + +- _coordinate +- (660, 76) ++ style8 ++ 1 + + +- _rotation +- 0 ++ width8 ++ 1 + +- +- +- qtgui_time_sink_x + +- id +- qtgui_time_sink_x_0_1 ++ alpha9 ++ 1.0 + + +- _enabled +- True ++ color9 ++ "dark green" + + +- type +- complex ++ label9 ++ ++ ++ ++ marker9 ++ -1 ++ ++ ++ style9 ++ 1 ++ ++ ++ width9 ++ 1 + + + name + + + ++ nconnections ++ 2 ++ ++ + size + 1000 + +@@ -795,20 +2083,16 @@ + samp_rate + + +- ymin +- -0.1 +- +- +- ymax +- 4.5 ++ tr_chan ++ 0 + + +- nconnections +- 2 ++ tr_delay ++ 0.015 + + +- update_time +- 0.10 ++ tr_level ++ .1 + + + tr_mode +@@ -819,379 +2103,394 @@ + qtgui.TRIG_SLOPE_POS + + +- tr_level +- .1 ++ tr_tag ++ "" + + +- tr_delay +- 0.015 ++ type ++ complex + + +- tr_chan +- 0 ++ update_time ++ 0.10 + + +- tr_tag ++ ylabel ++ Amplitude ++ ++ ++ yunit + "" + + +- entags +- True ++ ymax ++ 4.5 + + +- gui_hint +- 1,0,1,1 ++ ymin ++ -0.1 ++ ++ ++ ++ qtgui_time_sink_x ++ ++ autoscale ++ False ++ ++ ++ alias ++ ++ ++ ++ comment ++ ++ ++ ++ ctrlpanel ++ False + + + affinity + + + ++ entags ++ True ++ ++ ++ _enabled ++ True ++ ++ + _coordinate +- (1072, 77) ++ (857, 173) ++ ++ ++ gui_hint ++ 1,1,1,1 + + + _rotation + 0 + +- +- +- qtgui_time_sink_x + +- id +- qtgui_time_sink_x_0_0 ++ grid ++ False + + +- _enabled +- False ++ id ++ qtgui_time_sink_x_0_1_0 + + +- type +- float ++ legend ++ True + + +- name +- ++ alpha1 ++ 1.0 + + +- size +- 1024 ++ color1 ++ "blue" + + +- srate +- samp_rate ++ label1 ++ + + +- ymin ++ marker1 + -1 + + +- ymax ++ style1 + 1 + + +- nconnections +- 2 ++ width1 ++ 1 + + +- update_time +- 0.10 ++ alpha10 ++ 1.0 + + +- tr_mode +- qtgui.TRIG_MODE_TAG ++ color10 ++ "blue" + + +- tr_slope +- qtgui.TRIG_SLOPE_POS ++ label10 ++ + + +- tr_level +- 0.0 ++ marker10 ++ -1 ++ ++ ++ style10 ++ 1 ++ ++ ++ width10 ++ 1 ++ ++ ++ alpha2 ++ 1.0 ++ ++ ++ color2 ++ "red" ++ ++ ++ label2 ++ + + +- tr_delay +- 0 ++ marker2 ++ -1 + + +- tr_chan ++ style2 + 1 + + +- tr_tag +- second stream ++ width2 ++ 1 + + +- entags +- True ++ alpha3 ++ 1.0 + + +- gui_hint +- ++ color3 ++ "green" + + +- affinity ++ label3 + + + +- _coordinate +- (475, 444) ++ marker3 ++ -1 + + +- _rotation +- 0 ++ style3 ++ 1 + +- +- +- blocks_vector_source_x + +- id +- blocks_vector_source_x_0_0_0 ++ width3 ++ 1 + + +- _enabled +- False ++ alpha4 ++ 1.0 + + +- type +- float ++ color4 ++ "black" + + +- vector +- 10*[0,] + [0.5,] + (100-10-1)*[0,] ++ label4 ++ + + +- tags +- tagged_streams.make_lengthtags((128,), (110,), "second stream") ++ marker4 ++ -1 + + +- repeat +- True ++ style4 ++ 1 + + +- vlen ++ width4 + 1 + + +- affinity +- ++ alpha5 ++ 1.0 + + +- minoutbuf +- 0 ++ color5 ++ "cyan" + + +- _coordinate +- (15, 489) ++ label5 ++ + + +- _rotation +- 0 ++ marker5 ++ -1 + +- +- +- blocks_vector_source_x + +- id +- blocks_vector_source_x_0_1 ++ style5 ++ 1 + + +- _enabled +- False ++ width5 ++ 1 + + +- type +- float ++ alpha6 ++ 1.0 + + +- vector +- [-0.85,] + (100-1)*[0,] ++ color6 ++ "magenta" + + +- tags +- tagged_streams.make_lengthtags((1024,), (0,), "testing tags") ++ label6 ++ + + +- repeat +- True ++ marker6 ++ -1 + + +- vlen ++ style6 + 1 + + +- affinity +- ++ width6 ++ 1 + + +- minoutbuf +- 0 ++ alpha7 ++ 1.0 + + +- _coordinate +- (15, 398) ++ color7 ++ "yellow" + + +- _rotation +- 0 ++ label7 ++ + +- +- +- blocks_throttle + +- id +- blocks_throttle_0_0 ++ marker7 ++ -1 + + +- _enabled +- False ++ style7 ++ 1 + + +- type +- float ++ width7 ++ 1 + + +- samples_per_second +- samp_rate ++ alpha8 ++ 1.0 + + +- vlen +- 1 ++ color8 ++ "dark red" + + +- affinity ++ label8 + + + +- minoutbuf +- 0 ++ marker8 ++ -1 + + +- _coordinate +- (267, 414) ++ style8 ++ 1 + + +- _rotation +- 0 ++ width8 ++ 1 + +- +- +- blocks_delay + +- id +- blocks_delay_0_0 ++ alpha9 ++ 1.0 + + +- _enabled +- True ++ color9 ++ "dark green" + + +- type +- complex ++ label9 ++ + + +- delay +- int(delay) ++ marker9 ++ -1 + + +- num_ports ++ style9 + 1 + + +- vlen ++ width9 + 1 + + +- affinity ++ name + + + +- minoutbuf +- 0 +- +- +- _coordinate +- (890, 44) ++ nconnections ++ 1 + + +- _rotation +- 0 ++ size ++ 5100 + +- +- +- variable_qtgui_range + +- id +- delay ++ srate ++ samp_rate + + +- _enabled +- True ++ tr_chan ++ 0 + + +- label +- Delay ++ tr_delay ++ 0.06 + + +- value +- 300 ++ tr_level ++ .5 + + +- start +- 0 ++ tr_mode ++ qtgui.TRIG_MODE_TAG + + +- stop +- 1000 ++ tr_slope ++ qtgui.TRIG_SLOPE_POS + + +- step +- 1 ++ tr_tag ++ strobe + + +- widget +- counter_slider ++ type ++ complex + + +- orient +- Qt.Horizontal ++ update_time ++ 0.001 + + +- min_len +- 200 ++ ylabel ++ Amplitude + + +- gui_hint +- ++ yunit ++ "" + + +- _coordinate +- (814, 390) ++ ymax ++ 1.5 + + +- _rotation +- 0 ++ ymin ++ -0.1 + + + +- blocks_vector_source_x_0 +- blocks_throttle_0 +- 0 +- 0 +- +- +- blocks_throttle_0 +- blocks_add_xx_0 +- 0 +- 0 +- +- +- blocks_delay_0 +- blocks_add_xx_0 +- 0 +- 1 +- +- + analog_fastnoise_source_x_0 + blocks_add_xx_1 + 0 +@@ -1210,28 +2509,28 @@ + 0 + + +- fir_filter_xxx_0 +- blocks_delay_0_0 ++ blocks_add_xx_1 ++ qtgui_time_sink_x_0 + 0 + 0 + + +- blocks_delay_0_0 +- qtgui_time_sink_x_0_1 ++ blocks_add_xx_1 ++ qtgui_time_sink_x_0_1_0 + 0 + 0 + + +- fir_filter_xxx_0 +- qtgui_time_sink_x_0_1 ++ blocks_delay_0 ++ blocks_add_xx_0 + 0 + 1 + + +- blocks_vector_source_x_0_0 +- qtgui_time_sink_x_0 ++ blocks_delay_0_0 ++ qtgui_time_sink_x_0_1 + 0 +- 1 ++ 0 + + + blocks_tags_strobe_0 +@@ -1240,28 +2539,34 @@ + 0 + + +- blocks_add_xx_1 +- qtgui_time_sink_x_0_1_0 ++ blocks_throttle_0 ++ blocks_add_xx_0 + 0 + 0 + + +- blocks_add_xx_1 +- qtgui_time_sink_x_0 ++ blocks_throttle_0_0 ++ qtgui_time_sink_x_0_0 + 0 + 0 + + +- blocks_vector_source_x_0_0_0 +- qtgui_time_sink_x_0_0 ++ blocks_vector_source_x_0 ++ blocks_throttle_0 ++ 0 ++ 0 ++ ++ ++ blocks_vector_source_x_0_0 ++ qtgui_time_sink_x_0 + 0 + 1 + + +- blocks_throttle_0_0 ++ blocks_vector_source_x_0_0_0 + qtgui_time_sink_x_0_0 + 0 +- 0 ++ 1 + + + blocks_vector_source_x_0_1 +@@ -1269,4 +2574,16 @@ + 0 + 0 + ++ ++ fir_filter_xxx_0 ++ blocks_delay_0_0 ++ 0 ++ 0 ++ ++ ++ fir_filter_xxx_0 ++ qtgui_time_sink_x_0_1 ++ 0 ++ 1 ++ + +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0007-qtgui-Fixes-for-edit_box_msg-to-work-with-QT5.patch gnuradio-3.7.11/debian/patches/qt5-maint-0007-qtgui-Fixes-for-edit_box_msg-to-work-with-QT5.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0007-qtgui-Fixes-for-edit_box_msg-to-work-with-QT5.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0007-qtgui-Fixes-for-edit_box_msg-to-work-with-QT5.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,82 @@ +From 1dae9e033016f35416cb433a8a129b4f011eb8c1 Mon Sep 17 00:00:00 2001 +From: Tom Rondeau +Date: Thu, 28 Apr 2016 10:53:12 -0400 +Subject: [PATCH 07/22] qtgui: Fixes for edit_box_msg to work with QT5. + +--- + gr-qtgui/examples/c++/CMakeLists.txt | 20 +++++++++++--------- + gr-qtgui/grc/qtgui_edit_box_msg.xml | 2 +- + gr-qtgui/lib/edit_box_msg_impl.cc | 4 ---- + 3 files changed, 12 insertions(+), 14 deletions(-) + +diff --git a/gr-qtgui/examples/c++/CMakeLists.txt b/gr-qtgui/examples/c++/CMakeLists.txt +index 239b5dbf42..796c292b81 100644 +--- a/gr-qtgui/examples/c++/CMakeLists.txt ++++ b/gr-qtgui/examples/c++/CMakeLists.txt +@@ -18,14 +18,14 @@ + # Boston, MA 02110-1301, USA. + + include_directories( +- ${GR_QTGUI_INCLUDE_DIRS} +- ${GR_ANALOG_INCLUDE_DIRS} +- ${GR_FILTER_INCLUDE_DIRS} +- ${GR_BLOCKS_INCLUDE_DIRS} +- ${GR_FFT_INCLUDE_DIRS} +- ${GNURADIO_RUNTIME_INCLUDE_DIRS} +- ${QT_INCLUDE_DIRS} +- ${Boost_INCLUDE_DIRS} ++ ${GR_QTGUI_INCLUDE_DIRS} ++ ${GR_ANALOG_INCLUDE_DIRS} ++ ${GR_FILTER_INCLUDE_DIRS} ++ ${GR_BLOCKS_INCLUDE_DIRS} ++ ${GR_FFT_INCLUDE_DIRS} ++ ${GNURADIO_RUNTIME_INCLUDE_DIRS} ++ ${Qt5Widgets_INCLUDE_DIRS} ++ ${Boost_INCLUDE_DIRS} + ) + + list(APPEND QTGUI_LIBRARIES +@@ -35,9 +35,11 @@ list(APPEND QTGUI_LIBRARIES + gnuradio-blocks + gnuradio-fft + gnuradio-runtime ++ ${QWT_LIBRARY_DIRS} ++ ${Qt5Widgets_LIBRARIES} + ) + +-QT4_WRAP_CPP(qtgui_moc_sources display_qt.h) ++QT5_WRAP_CPP(qtgui_moc_sources display_qt.h) + add_executable(display_qt display_qt.cc ${qtgui_moc_sources}) + target_link_libraries(display_qt ${QTGUI_LIBRARIES}) + +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 @@ + + QT GUI Message Edit Box + qtgui_edit_box_msg +- from PyQt4 import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #set $win = 'self._%s_win'%$id +diff --git a/gr-qtgui/lib/edit_box_msg_impl.cc b/gr-qtgui/lib/edit_box_msg_impl.cc +index 084e2d4f34..0dee1fa18b 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); + } + +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0008-gr-qtgui-Allow-build-with-Qt4-or-Qt5-default.patch gnuradio-3.7.11/debian/patches/qt5-maint-0008-gr-qtgui-Allow-build-with-Qt4-or-Qt5-default.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0008-gr-qtgui-Allow-build-with-Qt4-or-Qt5-default.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0008-gr-qtgui-Allow-build-with-Qt4-or-Qt5-default.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,155 @@ +From aa06972a708d3559eae667dd9484edadf722d73c Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Mon, 20 Jun 2016 18:37:43 +0200 +Subject: [PATCH 08/22] gr-qtgui: Allow build with Qt4 or Qt5 (default) + +Signed-off-by: Paul Cercueil +--- + gr-qtgui/CMakeLists.txt | 27 ++++++++++++++++++++------- + gr-qtgui/examples/c++/CMakeLists.txt | 11 ++++++++--- + gr-qtgui/include/gnuradio/qtgui/form_menus.h | 4 ++++ + gr-qtgui/lib/CMakeLists.txt | 14 ++++++++++---- + 4 files changed, 42 insertions(+), 14 deletions(-) + +diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt +index e3dcf7b86b..c06e516917 100644 +--- a/gr-qtgui/CMakeLists.txt ++++ b/gr-qtgui/CMakeLists.txt +@@ -22,14 +22,27 @@ + ######################################################################## + include(GrBoost) + +-find_package(Qt5Widgets) +- +-find_package(Qwt) +- + find_package(PythonLibs 2) + + include(GrPython) +-GR_PYTHON_CHECK_MODULE("PyQt5" PyQt5 True PYQT5_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("PyQt5" PyQt5 True PYQT5_FOUND) + include(GrComponent) + if(NOT CMAKE_CROSSCOMPILING) + set(qt_gui_python_deps +- PYQT5_FOUND ++ PYQT${DESIRED_QT_VERSION}_FOUND + ) + endif(NOT CMAKE_CROSSCOMPILING) + + GR_REGISTER_COMPONENT("gr-qtgui" ENABLE_GR_QTGUI + Boost_FOUND +- Qt5Widgets_FOUND ++ QT_FOUND + QWT_FOUND + ENABLE_VOLK + ENABLE_GNURADIO_RUNTIME +diff --git a/gr-qtgui/examples/c++/CMakeLists.txt b/gr-qtgui/examples/c++/CMakeLists.txt +index 796c292b81..89b4baef71 100644 +--- a/gr-qtgui/examples/c++/CMakeLists.txt ++++ b/gr-qtgui/examples/c++/CMakeLists.txt +@@ -24,7 +24,7 @@ include_directories( + ${GR_BLOCKS_INCLUDE_DIRS} + ${GR_FFT_INCLUDE_DIRS} + ${GNURADIO_RUNTIME_INCLUDE_DIRS} +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${QT_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} + ) + +@@ -36,10 +36,15 @@ list(APPEND QTGUI_LIBRARIES + gnuradio-fft + gnuradio-runtime + ${QWT_LIBRARY_DIRS} +- ${Qt5Widgets_LIBRARIES} ++ ${QT_LIBRARIES} + ) + +-QT5_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/include/gnuradio/qtgui/form_menus.h b/gr-qtgui/include/gnuradio/qtgui/form_menus.h +index ed27d747d9..26c63c2d75 100644 +--- a/gr-qtgui/include/gnuradio/qtgui/form_menus.h ++++ b/gr-qtgui/include/gnuradio/qtgui/form_menus.h +@@ -28,7 +28,11 @@ + #include + #include + #include ++ ++#if QT_VERSION >= 0x050000 + #include ++#endif ++ + #include + #include + #include +diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt +index 4827ec4f3f..a5e63b232e 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 + ) +-QT5_WRAP_CPP(qtgui_moc_sources ${qtgui_moc_hdrs}) +-QT5_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 .ui.h, but the macros generate ui_foo.h + #avoid changing the sources by generating the header with the include +@@ -127,7 +133,7 @@ include_directories( + ${GNURADIO_RUNTIME_INCLUDE_DIRS} + ${VOLK_INCLUDE_DIRS} + ${QWT_INCLUDE_DIRS} +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${QT_INCLUDE_DIRS} + ${FFTW3F_INCLUDE_DIRS} + ${LOG4CPP_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} +@@ -156,7 +162,7 @@ list(APPEND qtgui_libs + gnuradio-filter + ${VOLK_LIBRARIES} + ${QWT_LIBRARIES} +- ${Qt5Widgets_LIBRARIES} ++ ${QT_LIBRARIES} + ${FFTW3F_LIBRARIES} + ${LOG4CPP_LIBRARIES} + ) +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0009-gr-qtgui-Fix-PyQt-4-5-include-in-XMLs-for-GRC.patch gnuradio-3.7.11/debian/patches/qt5-maint-0009-gr-qtgui-Fix-PyQt-4-5-include-in-XMLs-for-GRC.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0009-gr-qtgui-Fix-PyQt-4-5-include-in-XMLs-for-GRC.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0009-gr-qtgui-Fix-PyQt-4-5-include-in-XMLs-for-GRC.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,351 @@ +From dc3db3b5ac29769aa4ab571a670d26e2fc7b6bf6 Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Tue, 21 Jun 2016 17:42:45 +0200 +Subject: [PATCH 09/22] gr-qtgui: Fix PyQt[4,5] include in XMLs for GRC + +Signed-off-by: Paul Cercueil +--- + gr-qtgui/grc/CMakeLists.txt | 9 ++++++++- + .../grc/{qtgui_ber_sink_b.xml => qtgui_ber_sink_b.xml.cmakein} | 2 +- + .../grc/{qtgui_block_tree.xml => qtgui_block_tree.xml.cmakein} | 0 + .../grc/{qtgui_check_box.xml => qtgui_check_box.xml.cmakein} | 2 +- + gr-qtgui/grc/{qtgui_chooser.xml => qtgui_chooser.xml.cmakein} | 4 ++-- + .../{qtgui_const_sink_x.xml => qtgui_const_sink_x.xml.cmakein} | 2 +- + .../{qtgui_edit_box_msg.xml => qtgui_edit_box_msg.xml.cmakein} | 2 +- + gr-qtgui/grc/{qtgui_entry.xml => qtgui_entry.xml.cmakein} | 2 +- + .../grc/{qtgui_freq_sink_x.xml => qtgui_freq_sink_x.xml.cmakein} | 2 +- + ...i_histogram_sink_x.xml => qtgui_histogram_sink_x.xml.cmakein} | 2 +- + gr-qtgui/grc/{qtgui_label.xml => qtgui_label.xml.cmakein} | 2 +- + .../grc/{qtgui_number_sink.xml => qtgui_number_sink.xml.cmakein} | 2 +- + .../grc/{qtgui_push_button.xml => qtgui_push_button.xml.cmakein} | 2 +- + gr-qtgui/grc/{qtgui_range.xml => qtgui_range.xml.cmakein} | 0 + gr-qtgui/grc/{qtgui_sink_x.xml => qtgui_sink_x.xml.cmakein} | 2 +- + .../grc/{qtgui_tab_widget.xml => qtgui_tab_widget.xml.cmakein} | 2 +- + .../{qtgui_time_raster_x.xml => qtgui_time_raster_x.xml.cmakein} | 2 +- + .../grc/{qtgui_time_sink_x.xml => qtgui_time_sink_x.xml.cmakein} | 2 +- + .../{qtgui_vector_sink_f.xml => qtgui_vector_sink_f.xml.cmakein} | 2 +- + ...i_waterfall_sink_x.xml => qtgui_waterfall_sink_x.xml.cmakein} | 2 +- + 20 files changed, 26 insertions(+), 19 deletions(-) + rename gr-qtgui/grc/{qtgui_ber_sink_b.xml => qtgui_ber_sink_b.xml.cmakein} (99%) + rename gr-qtgui/grc/{qtgui_block_tree.xml => qtgui_block_tree.xml.cmakein} (100%) + rename gr-qtgui/grc/{qtgui_check_box.xml => qtgui_check_box.xml.cmakein} (97%) + rename gr-qtgui/grc/{qtgui_chooser.xml => qtgui_chooser.xml.cmakein} (98%) + rename gr-qtgui/grc/{qtgui_const_sink_x.xml => qtgui_const_sink_x.xml.cmakein} (99%) + rename gr-qtgui/grc/{qtgui_edit_box_msg.xml => qtgui_edit_box_msg.xml.cmakein} (98%) + rename gr-qtgui/grc/{qtgui_entry.xml => qtgui_entry.xml.cmakein} (97%) + rename gr-qtgui/grc/{qtgui_freq_sink_x.xml => qtgui_freq_sink_x.xml.cmakein} (99%) + rename gr-qtgui/grc/{qtgui_histogram_sink_x.xml => qtgui_histogram_sink_x.xml.cmakein} (99%) + rename gr-qtgui/grc/{qtgui_label.xml => qtgui_label.xml.cmakein} (97%) + rename gr-qtgui/grc/{qtgui_number_sink.xml => qtgui_number_sink.xml.cmakein} (99%) + rename gr-qtgui/grc/{qtgui_push_button.xml => qtgui_push_button.xml.cmakein} (97%) + rename gr-qtgui/grc/{qtgui_range.xml => qtgui_range.xml.cmakein} (100%) + rename gr-qtgui/grc/{qtgui_sink_x.xml => qtgui_sink_x.xml.cmakein} (98%) + rename gr-qtgui/grc/{qtgui_tab_widget.xml => qtgui_tab_widget.xml.cmakein} (99%) + rename gr-qtgui/grc/{qtgui_time_raster_x.xml => qtgui_time_raster_x.xml.cmakein} (99%) + rename gr-qtgui/grc/{qtgui_time_sink_x.xml => qtgui_time_sink_x.xml.cmakein} (99%) + rename gr-qtgui/grc/{qtgui_vector_sink_f.xml => qtgui_vector_sink_f.xml.cmakein} (99%) + rename gr-qtgui/grc/{qtgui_waterfall_sink_x.xml => qtgui_waterfall_sink_x.xml.cmakein} (99%) + +diff --git a/gr-qtgui/grc/CMakeLists.txt b/gr-qtgui/grc/CMakeLists.txt +index d56158ac70..d01bcc52c4 100644 +--- a/gr-qtgui/grc/CMakeLists.txt ++++ b/gr-qtgui/grc/CMakeLists.txt +@@ -18,5 +18,12 @@ + # Boston, MA 02110-1301, USA. + + ######################################################################## +-file(GLOB xml_files "*.xml") ++file(GLOB xml_cmakein_files "*.xml.cmakein") ++ ++foreach(xml_cmakein_file IN ITEMS ${xml_cmakein_files}) ++ get_filename_component(FILE_NAME ${xml_cmakein_file} NAME_WE) ++ configure_file(${xml_cmakein_file} "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.xml" @ONLY) ++ set(xml_files ${xml_files} "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.xml") ++endforeach(xml_cmakein_file) ++ + install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "qtgui_python") +diff --git a/gr-qtgui/grc/qtgui_ber_sink_b.xml b/gr-qtgui/grc/qtgui_ber_sink_b.xml.cmakein +similarity index 99% +rename from gr-qtgui/grc/qtgui_ber_sink_b.xml +rename to gr-qtgui/grc/qtgui_ber_sink_b.xml.cmakein +index 085bf282be..91a87ce595 100644 +--- a/gr-qtgui/grc/qtgui_ber_sink_b.xml ++++ b/gr-qtgui/grc/qtgui_ber_sink_b.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Bercurve Sink + qtgui_bercurve_sink +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import qtgui + import sip + import numpy +diff --git a/gr-qtgui/grc/qtgui_block_tree.xml b/gr-qtgui/grc/qtgui_block_tree.xml.cmakein +similarity index 100% +rename from gr-qtgui/grc/qtgui_block_tree.xml +rename to gr-qtgui/grc/qtgui_block_tree.xml.cmakein +diff --git a/gr-qtgui/grc/qtgui_check_box.xml b/gr-qtgui/grc/qtgui_check_box.xml.cmakein +similarity index 97% +rename from gr-qtgui/grc/qtgui_check_box.xml +rename to gr-qtgui/grc/qtgui_check_box.xml.cmakein +index ccee59dd92..9edacb24d8 100644 +--- a/gr-qtgui/grc/qtgui_check_box.xml ++++ b/gr-qtgui/grc/qtgui_check_box.xml.cmakein +@@ -8,7 +8,7 @@ + + QT GUI Check Box + variable_qtgui_check_box +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + self.$(id) = $(id) = $value + #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.cmakein +similarity index 98% +rename from gr-qtgui/grc/qtgui_chooser.xml +rename to gr-qtgui/grc/qtgui_chooser.xml.cmakein +index f79bb8ccb3..40c782bede 100644 +--- a/gr-qtgui/grc/qtgui_chooser.xml ++++ b/gr-qtgui/grc/qtgui_chooser.xml.cmakein +@@ -8,8 +8,8 @@ + + QT GUI Chooser + variable_qtgui_chooser +- from PyQt5 import Qt +- from PyQt5.QtCore import QObject, pyqtSlot ++ from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt@DESIRED_QT_VERSION@.QtCore import QObject, pyqtSlot + self.$(id) = $(id) = $value + #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.cmakein +similarity index 99% +rename from gr-qtgui/grc/qtgui_const_sink_x.xml +rename to gr-qtgui/grc/qtgui_const_sink_x.xml.cmakein +index 10f82cce82..6fa725acb1 100644 +--- a/gr-qtgui/grc/qtgui_const_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_const_sink_x.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Constellation Sink + qtgui_const_sink_x +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import qtgui + import sip + #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.cmakein +similarity index 98% +rename from gr-qtgui/grc/qtgui_edit_box_msg.xml +rename to gr-qtgui/grc/qtgui_edit_box_msg.xml.cmakein +index d77a4b3e1b..75ff93349f 100644 +--- a/gr-qtgui/grc/qtgui_edit_box_msg.xml ++++ b/gr-qtgui/grc/qtgui_edit_box_msg.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Message Edit Box + qtgui_edit_box_msg +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import qtgui + import sip + #set $win = 'self._%s_win'%$id +diff --git a/gr-qtgui/grc/qtgui_entry.xml b/gr-qtgui/grc/qtgui_entry.xml.cmakein +similarity index 97% +rename from gr-qtgui/grc/qtgui_entry.xml +rename to gr-qtgui/grc/qtgui_entry.xml.cmakein +index fc0f4089d1..da61ee723a 100644 +--- a/gr-qtgui/grc/qtgui_entry.xml ++++ b/gr-qtgui/grc/qtgui_entry.xml.cmakein +@@ -8,7 +8,7 @@ + + QT GUI Entry + variable_qtgui_entry +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import eng_notation + self.$(id) = $(id) = $value + #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.cmakein +similarity index 99% +rename from gr-qtgui/grc/qtgui_freq_sink_x.xml +rename to gr-qtgui/grc/qtgui_freq_sink_x.xml.cmakein +index ed39db7781..aaf0d75271 100644 +--- a/gr-qtgui/grc/qtgui_freq_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_freq_sink_x.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Frequency Sink + qtgui_freq_sink_x +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +diff --git a/gr-qtgui/grc/qtgui_histogram_sink_x.xml b/gr-qtgui/grc/qtgui_histogram_sink_x.xml.cmakein +similarity index 99% +rename from gr-qtgui/grc/qtgui_histogram_sink_x.xml +rename to gr-qtgui/grc/qtgui_histogram_sink_x.xml.cmakein +index 9e3dcb104f..d04a44da13 100644 +--- a/gr-qtgui/grc/qtgui_histogram_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_histogram_sink_x.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Histogram Sink + qtgui_histogram_sink_x +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import qtgui + import sip + #set $win = 'self._%s_win'%$id +diff --git a/gr-qtgui/grc/qtgui_label.xml b/gr-qtgui/grc/qtgui_label.xml.cmakein +similarity index 97% +rename from gr-qtgui/grc/qtgui_label.xml +rename to gr-qtgui/grc/qtgui_label.xml.cmakein +index 946cee36ab..c546e09dcc 100644 +--- a/gr-qtgui/grc/qtgui_label.xml ++++ b/gr-qtgui/grc/qtgui_label.xml.cmakein +@@ -9,7 +9,7 @@ + + QT GUI Label + variable_qtgui_label +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import eng_notation + self.$(id) = $(id) = $value + #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.cmakein +similarity index 99% +rename from gr-qtgui/grc/qtgui_number_sink.xml +rename to gr-qtgui/grc/qtgui_number_sink.xml.cmakein +index 06837493c3..d4b4c5808f 100644 +--- a/gr-qtgui/grc/qtgui_number_sink.xml ++++ b/gr-qtgui/grc/qtgui_number_sink.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Number Sink + qtgui_number_sink +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import qtgui + import sip + #set $win = 'self._%s_win'%$id +diff --git a/gr-qtgui/grc/qtgui_push_button.xml b/gr-qtgui/grc/qtgui_push_button.xml.cmakein +similarity index 97% +rename from gr-qtgui/grc/qtgui_push_button.xml +rename to gr-qtgui/grc/qtgui_push_button.xml.cmakein +index 49c2e9d6f0..d99f230acf 100644 +--- a/gr-qtgui/grc/qtgui_push_button.xml ++++ b/gr-qtgui/grc/qtgui_push_button.xml.cmakein +@@ -8,7 +8,7 @@ + + QT GUI Push Button + variable_qtgui_push_button +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + self.$(id) = $(id) = $value + #set $win = '_%s_push_button'%$id + #if not $label() +diff --git a/gr-qtgui/grc/qtgui_range.xml b/gr-qtgui/grc/qtgui_range.xml.cmakein +similarity index 100% +rename from gr-qtgui/grc/qtgui_range.xml +rename to gr-qtgui/grc/qtgui_range.xml.cmakein +diff --git a/gr-qtgui/grc/qtgui_sink_x.xml b/gr-qtgui/grc/qtgui_sink_x.xml.cmakein +similarity index 98% +rename from gr-qtgui/grc/qtgui_sink_x.xml +rename to gr-qtgui/grc/qtgui_sink_x.xml.cmakein +index a9bc469cd2..1c75921a75 100644 +--- a/gr-qtgui/grc/qtgui_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_sink_x.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Sink + qtgui_sink_x +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +diff --git a/gr-qtgui/grc/qtgui_tab_widget.xml b/gr-qtgui/grc/qtgui_tab_widget.xml.cmakein +similarity index 99% +rename from gr-qtgui/grc/qtgui_tab_widget.xml +rename to gr-qtgui/grc/qtgui_tab_widget.xml.cmakein +index 805542cc8b..f5a1a73cdc 100644 +--- a/gr-qtgui/grc/qtgui_tab_widget.xml ++++ b/gr-qtgui/grc/qtgui_tab_widget.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Tab Widget + qtgui_tab_widget +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + #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.cmakein +similarity index 99% +rename from gr-qtgui/grc/qtgui_time_raster_x.xml +rename to gr-qtgui/grc/qtgui_time_raster_x.xml.cmakein +index d458f67eb9..94b7ef136a 100644 +--- a/gr-qtgui/grc/qtgui_time_raster_x.xml ++++ b/gr-qtgui/grc/qtgui_time_raster_x.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Time Raster Sink + qtgui_time_raster_sink_x +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import qtgui + import sip + #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.cmakein +similarity index 99% +rename from gr-qtgui/grc/qtgui_time_sink_x.xml +rename to gr-qtgui/grc/qtgui_time_sink_x.xml.cmakein +index d4347950ea..d239917907 100644 +--- a/gr-qtgui/grc/qtgui_time_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_time_sink_x.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Time Sink + qtgui_time_sink_x +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +diff --git a/gr-qtgui/grc/qtgui_vector_sink_f.xml b/gr-qtgui/grc/qtgui_vector_sink_f.xml.cmakein +similarity index 99% +rename from gr-qtgui/grc/qtgui_vector_sink_f.xml +rename to gr-qtgui/grc/qtgui_vector_sink_f.xml.cmakein +index 0f456323bf..8b928eb7ea 100644 +--- a/gr-qtgui/grc/qtgui_vector_sink_f.xml ++++ b/gr-qtgui/grc/qtgui_vector_sink_f.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Vector Sink + qtgui_vector_sink_f +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import qtgui + import sip + #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.cmakein +similarity index 99% +rename from gr-qtgui/grc/qtgui_waterfall_sink_x.xml +rename to gr-qtgui/grc/qtgui_waterfall_sink_x.xml.cmakein +index a684492246..d198ca084a 100644 +--- a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml.cmakein +@@ -7,7 +7,7 @@ + + QT GUI Waterfall Sink + qtgui_waterfall_sink_x +- from PyQt5 import Qt ++ from PyQt@DESIRED_QT_VERSION@ import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0010-gr-qtgui-Fix-range.py-to-work-with-both-Qt4-and-Qt5.patch gnuradio-3.7.11/debian/patches/qt5-maint-0010-gr-qtgui-Fix-range.py-to-work-with-both-Qt4-and-Qt5.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0010-gr-qtgui-Fix-range.py-to-work-with-both-Qt4-and-Qt5.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0010-gr-qtgui-Fix-range.py-to-work-with-both-Qt4-and-Qt5.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,54 @@ +From 7df8c4ea6559ba211222e7d7cfb152f71dbc815b Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Tue, 21 Jun 2016 18:16:06 +0200 +Subject: [PATCH 10/22] gr-qtgui: Fix range.py to work with both Qt4 and Qt5 + +Signed-off-by: Paul Cercueil +--- + gr-qtgui/python/qtgui/CMakeLists.txt | 10 +++++++++- + gr-qtgui/python/qtgui/{range.py => range.py.cmakein} | 2 +- + 2 files changed, 10 insertions(+), 2 deletions(-) + rename gr-qtgui/python/qtgui/{range.py => range.py.cmakein} (99%) + +diff --git a/gr-qtgui/python/qtgui/CMakeLists.txt b/gr-qtgui/python/qtgui/CMakeLists.txt +index 1c20033db2..7e2d0321c4 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" + util.py + DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui + COMPONENT "qtgui_python" +diff --git a/gr-qtgui/python/qtgui/range.py b/gr-qtgui/python/qtgui/range.py.cmakein +similarity index 99% +rename from gr-qtgui/python/qtgui/range.py +rename to gr-qtgui/python/qtgui/range.py.cmakein +index f972844114..9ed7706195 100755 +--- a/gr-qtgui/python/qtgui/range.py ++++ b/gr-qtgui/python/qtgui/range.py.cmakein +@@ -21,7 +21,7 @@ + # Boston, MA 02110-1301, USA. + # + +-from PyQt5 import Qt, QtCore, QtWidgets ++@PY_QT_IMPORT@ + import util + + class Range(object): +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0011-gr-qtgui-Re-introduce-some-Qt4-specific-code.patch gnuradio-3.7.11/debian/patches/qt5-maint-0011-gr-qtgui-Re-introduce-some-Qt4-specific-code.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0011-gr-qtgui-Re-introduce-some-Qt4-specific-code.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0011-gr-qtgui-Re-introduce-some-Qt4-specific-code.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,220 @@ +From 988c1520d5b6f763caa0164faef404185e7dbc85 Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Tue, 21 Jun 2016 18:30:21 +0200 +Subject: [PATCH 11/22] gr-qtgui: Re-introduce some Qt4-specific code + +Signed-off-by: Paul Cercueil +--- + gr-qtgui/lib/const_sink_c_impl.cc | 4 ++++ + gr-qtgui/lib/freq_sink_c_impl.cc | 4 ++++ + gr-qtgui/lib/freq_sink_f_impl.cc | 4 ++++ + gr-qtgui/lib/histogram_sink_f_impl.cc | 4 ++++ + gr-qtgui/lib/sink_c_impl.cc | 4 ++++ + gr-qtgui/lib/sink_f_impl.cc | 4 ++++ + gr-qtgui/lib/time_raster_sink_b_impl.cc | 4 ++++ + gr-qtgui/lib/time_raster_sink_f_impl.cc | 4 ++++ + gr-qtgui/lib/time_sink_c_impl.cc | 4 ++++ + gr-qtgui/lib/time_sink_f_impl.cc | 4 ++++ + gr-qtgui/lib/vector_sink_f_impl.cc | 4 ++++ + gr-qtgui/lib/waterfall_sink_c_impl.cc | 4 ++++ + gr-qtgui/lib/waterfall_sink_f_impl.cc | 4 ++++ + 13 files changed, 52 insertions(+) + +diff --git a/gr-qtgui/lib/const_sink_c_impl.cc b/gr-qtgui/lib/const_sink_c_impl.cc +index b2ec9c7de2..3f3bbf4405 100644 +--- a/gr-qtgui/lib/const_sink_c_impl.cc ++++ b/gr-qtgui/lib/const_sink_c_impl.cc +@@ -127,6 +127,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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 9d8e0370a5..c697e8c269 100644 +--- a/gr-qtgui/lib/freq_sink_c_impl.cc ++++ b/gr-qtgui/lib/freq_sink_c_impl.cc +@@ -154,6 +154,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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_f_impl.cc b/gr-qtgui/lib/freq_sink_f_impl.cc +index 49918e806a..046414ffaf 100644 +--- a/gr-qtgui/lib/freq_sink_f_impl.cc ++++ b/gr-qtgui/lib/freq_sink_f_impl.cc +@@ -153,6 +153,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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/histogram_sink_f_impl.cc b/gr-qtgui/lib/histogram_sink_f_impl.cc +index 6ad56c8e02..13e50b217c 100644 +--- a/gr-qtgui/lib/histogram_sink_f_impl.cc ++++ b/gr-qtgui/lib/histogram_sink_f_impl.cc +@@ -115,6 +115,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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/sink_c_impl.cc b/gr-qtgui/lib/sink_c_impl.cc +index 1c2823601b..ba1be4b7c3 100644 +--- a/gr-qtgui/lib/sink_c_impl.cc ++++ b/gr-qtgui/lib/sink_c_impl.cc +@@ -130,6 +130,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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/sink_f_impl.cc b/gr-qtgui/lib/sink_f_impl.cc +index 2964783f62..73b6fcad83 100644 +--- a/gr-qtgui/lib/sink_f_impl.cc ++++ b/gr-qtgui/lib/sink_f_impl.cc +@@ -130,6 +130,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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/time_raster_sink_b_impl.cc b/gr-qtgui/lib/time_raster_sink_b_impl.cc +index bd26e12f97..1e2fe360b1 100644 +--- a/gr-qtgui/lib/time_raster_sink_b_impl.cc ++++ b/gr-qtgui/lib/time_raster_sink_b_impl.cc +@@ -130,6 +130,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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/time_raster_sink_f_impl.cc b/gr-qtgui/lib/time_raster_sink_f_impl.cc +index 322ffdbbb3..e4cbb0d38f 100644 +--- a/gr-qtgui/lib/time_raster_sink_f_impl.cc ++++ b/gr-qtgui/lib/time_raster_sink_f_impl.cc +@@ -128,6 +128,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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/time_sink_c_impl.cc b/gr-qtgui/lib/time_sink_c_impl.cc +index 4d13b674f0..b23a5468fc 100644 +--- a/gr-qtgui/lib/time_sink_c_impl.cc ++++ b/gr-qtgui/lib/time_sink_c_impl.cc +@@ -132,6 +132,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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/time_sink_f_impl.cc b/gr-qtgui/lib/time_sink_f_impl.cc +index 477c2ae435..2b39b5536c 100644 +--- a/gr-qtgui/lib/time_sink_f_impl.cc ++++ b/gr-qtgui/lib/time_sink_f_impl.cc +@@ -129,6 +129,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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/vector_sink_f_impl.cc b/gr-qtgui/lib/vector_sink_f_impl.cc +index e4259e7ffc..fedef9654d 100644 +--- a/gr-qtgui/lib/vector_sink_f_impl.cc ++++ b/gr-qtgui/lib/vector_sink_f_impl.cc +@@ -139,6 +139,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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/waterfall_sink_c_impl.cc b/gr-qtgui/lib/waterfall_sink_c_impl.cc +index f17407cfa9..4306b97d71 100644 +--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc ++++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc +@@ -154,6 +154,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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/waterfall_sink_f_impl.cc b/gr-qtgui/lib/waterfall_sink_f_impl.cc +index e4284bab32..9789c2cf6d 100644 +--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc ++++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc +@@ -154,6 +154,10 @@ namespace gr { + d_qApplication = qApp; + } + else { ++#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000 ++ 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); + } + +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0012-grc-Fix-generation-of-Python-code-for-Qt4-and-Qt5.patch gnuradio-3.7.11/debian/patches/qt5-maint-0012-grc-Fix-generation-of-Python-code-for-Qt4-and-Qt5.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0012-grc-Fix-generation-of-Python-code-for-Qt4-and-Qt5.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0012-grc-Fix-generation-of-Python-code-for-Qt4-and-Qt5.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,113 @@ +From 6cd8e365b7e519f49c81cfeb7137200d7b5e8b2f Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Tue, 21 Jun 2016 19:27:19 +0200 +Subject: [PATCH 12/22] grc: Fix generation of Python code for Qt4 and Qt5 + +Signed-off-by: Paul Cercueil +--- + CMakeLists.txt | 2 +- + grc/blocks/CMakeLists.txt | 4 +++- + grc/blocks/{options.xml => options.xml.cmakein} | 2 +- + grc/core/generator/flow_graph.tmpl | 13 ++++++++++++- + 4 files changed, 17 insertions(+), 4 deletions(-) + rename grc/blocks/{options.xml => options.xml.cmakein} (99%) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ae6c1e1d49..f79cc10635 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -470,7 +470,6 @@ list(APPEND GR_TEST_PYTHON_DIRS + add_subdirectory(docs) + add_subdirectory(gnuradio-runtime) + add_subdirectory(gr-blocks) +-add_subdirectory(grc) + add_subdirectory(gr-fec) + add_subdirectory(gr-fft) + add_subdirectory(gr-filter) +@@ -493,6 +492,7 @@ add_subdirectory(gr-fcd) + add_subdirectory(gr-wavelet) + add_subdirectory(gr-wxgui) + add_subdirectory(gr-zeromq) ++add_subdirectory(grc) + + # Defining GR_CTRLPORT for gnuradio/config.h + if(ENABLE_GR_CTRLPORT) +diff --git a/grc/blocks/CMakeLists.txt b/grc/blocks/CMakeLists.txt +index 0c2a1f7901..a2207fa928 100644 +--- a/grc/blocks/CMakeLists.txt ++++ b/grc/blocks/CMakeLists.txt +@@ -22,6 +22,8 @@ include(GrPython) + + file(GLOB xml_files "*.xml") + ++configure_file(options.xml.cmakein "${CMAKE_CURRENT_BINARY_DIR}/options.xml" @ONLY) ++ + macro(GEN_BLOCK_XML _generator _xml_block) + set(generator ${CMAKE_CURRENT_SOURCE_DIR}/${_generator}) + set(xml_block ${CMAKE_CURRENT_BINARY_DIR}/${_xml_block}) +@@ -37,7 +39,7 @@ GEN_BLOCK_XML(variable_struct.xml.py variable_struct.xml) + add_custom_target(grc_generated_xml ALL DEPENDS ${generated_xml_files}) + + install( +- FILES ${xml_files} ${generated_xml_files} ++ FILES ${xml_files} "${CMAKE_CURRENT_BINARY_DIR}/options.xml" ${generated_xml_files} + DESTINATION ${GRC_BLOCKS_DIR} + COMPONENT "grc" + ) +diff --git a/grc/blocks/options.xml b/grc/blocks/options.xml.cmakein +similarity index 99% +rename from grc/blocks/options.xml +rename to grc/blocks/options.xml.cmakein +index 1ef1e9df5d..95ca41e216 100644 +--- a/grc/blocks/options.xml ++++ b/grc/blocks/options.xml.cmakein +@@ -16,7 +16,7 @@ from grc_gnuradio import wxgui as grc_wxgui + import wx + #end if + #if $generate_options() == 'qt_gui' +-from PyQt5 import Qt ++from PyQt@DESIRED_QT_VERSION@ import Qt + import sys + #end if + #if not $generate_options().startswith('hb') +diff --git a/grc/core/generator/flow_graph.tmpl b/grc/core/generator/flow_graph.tmpl +index 1d657701c1..80bf5cfbf7 100644 +--- a/grc/core/generator/flow_graph.tmpl ++++ b/grc/core/generator/flow_graph.tmpl +@@ -36,6 +36,10 @@ $DIVIDER + import threading + #end if + ++#if $generate_options == 'qt_gui' ++from distutils.version import StrictVersion ++#end if ++ + ## Call XInitThreads as the _very_ first thing. + ## After some Qt import, it's too late + #if $generate_options in ('wx_gui', 'qt_gui') +@@ -118,7 +122,11 @@ class $(class_name)(gr.top_block, Qt.QWidget): + self.top_layout.addLayout(self.top_grid_layout) + + self.settings = Qt.QSettings("GNU Radio", "$class_name") +- self.restoreGeometry(self.settings.value("geometry")) ++ ++ if StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"): ++ self.restoreGeometry(self.settings.value("geometry").toByteArray()) ++ else: ++ self.restoreGeometry(self.settings.value("geometry")) + #elif $generate_options == 'no_gui' + + +@@ -379,6 +387,9 @@ def main(top_block_cls=$(class_name), options=None): + tb.Wait() + #end if + #elif $generate_options == 'qt_gui' ++ if StrictVersion("4.5.0") <= StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"): ++ style = gr.prefs().get_string('qtgui', 'style', 'raster') ++ Qt.QApplication.setGraphicsSystem(style) + qapp = Qt.QApplication(sys.argv) + + tb = top_block_cls($(', '.join($params_eq_list))) +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0013-grc-replace-templated-xml-files-with-search-and-repl.patch gnuradio-3.7.11/debian/patches/qt5-maint-0013-grc-replace-templated-xml-files-with-search-and-repl.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0013-grc-replace-templated-xml-files-with-search-and-repl.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0013-grc-replace-templated-xml-files-with-search-and-repl.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,77 @@ +From ab58fcfd12be3e60a9dfaac757a3b8c663c2fc4b Mon Sep 17 00:00:00 2001 +From: Sebastian Koslowski +Date: Tue, 30 Aug 2016 09:49:58 +0200 +Subject: [PATCH 13/22] grc: replace templated xml files with search and + replace for qt4 + +--- + grc/blocks/CMakeLists.txt | 23 +++++++++++++++++++---- + grc/blocks/{options.xml.cmakein => options.xml} | 2 +- + 2 files changed, 20 insertions(+), 5 deletions(-) + rename grc/blocks/{options.xml.cmakein => options.xml} (99%) + +diff --git a/grc/blocks/CMakeLists.txt b/grc/blocks/CMakeLists.txt +index a2207fa928..bc3197de97 100644 +--- a/grc/blocks/CMakeLists.txt ++++ b/grc/blocks/CMakeLists.txt +@@ -22,7 +22,18 @@ include(GrPython) + + file(GLOB xml_files "*.xml") + +-configure_file(options.xml.cmakein "${CMAKE_CURRENT_BINARY_DIR}/options.xml" @ONLY) ++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() + + macro(GEN_BLOCK_XML _generator _xml_block) + set(generator ${CMAKE_CURRENT_SOURCE_DIR}/${_generator}) +@@ -32,14 +43,18 @@ macro(GEN_BLOCK_XML _generator _xml_block) + DEPENDS ${generator} OUTPUT ${xml_block} + COMMAND ${PYTHON_EXECUTABLE} ${generator} ${xml_block} + ) +-endmacro(GEN_BLOCK_XML) ++endmacro() ++ ++GEN_BLOCK_XML(variable_struct.xml.py variable_struct.xml) + +-GEN_BLOCK_XML(variable_struct.xml.py variable_struct.xml) ++if(DESIRED_QT_VERSION EQUAL 4) ++ REPLACE_IN_FILE(options.xml PyQt5 PyQt4) ++endif() + + add_custom_target(grc_generated_xml ALL DEPENDS ${generated_xml_files}) + + install( +- FILES ${xml_files} "${CMAKE_CURRENT_BINARY_DIR}/options.xml" ${generated_xml_files} ++ FILES ${xml_files} ${generated_xml_files} + DESTINATION ${GRC_BLOCKS_DIR} + COMPONENT "grc" + ) +diff --git a/grc/blocks/options.xml.cmakein b/grc/blocks/options.xml +similarity index 99% +rename from grc/blocks/options.xml.cmakein +rename to grc/blocks/options.xml +index 95ca41e216..1ef1e9df5d 100644 +--- a/grc/blocks/options.xml.cmakein ++++ b/grc/blocks/options.xml +@@ -16,7 +16,7 @@ from grc_gnuradio import wxgui as grc_wxgui + import wx + #end if + #if $generate_options() == 'qt_gui' +-from PyQt@DESIRED_QT_VERSION@ import Qt ++from PyQt5 import Qt + import sys + #end if + #if not $generate_options().startswith('hb') +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0014-qtgui-replace-templated-xml-files-with-search-and-re.patch gnuradio-3.7.11/debian/patches/qt5-maint-0014-qtgui-replace-templated-xml-files-with-search-and-re.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0014-qtgui-replace-templated-xml-files-with-search-and-re.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0014-qtgui-replace-templated-xml-files-with-search-and-re.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,375 @@ +From d796f30a241ed29831d597ee27df01556a80d2f1 Mon Sep 17 00:00:00 2001 +From: Sebastian Koslowski +Date: Tue, 30 Aug 2016 17:52:09 +0200 +Subject: [PATCH 14/22] qtgui: replace templated xml files with search and + replace for qt4 + +--- + gr-qtgui/grc/CMakeLists.txt | 32 +++++++++++++++++----- + ...ber_sink_b.xml.cmakein => qtgui_ber_sink_b.xml} | 2 +- + ...block_tree.xml.cmakein => qtgui_block_tree.xml} | 0 + ...i_check_box.xml.cmakein => qtgui_check_box.xml} | 2 +- + ...qtgui_chooser.xml.cmakein => qtgui_chooser.xml} | 4 +-- + ...t_sink_x.xml.cmakein => qtgui_const_sink_x.xml} | 2 +- + ..._box_msg.xml.cmakein => qtgui_edit_box_msg.xml} | 2 +- + .../{qtgui_entry.xml.cmakein => qtgui_entry.xml} | 2 +- + ...eq_sink_x.xml.cmakein => qtgui_freq_sink_x.xml} | 2 +- + ...nk_x.xml.cmakein => qtgui_histogram_sink_x.xml} | 2 +- + .../{qtgui_label.xml.cmakein => qtgui_label.xml} | 2 +- + ...mber_sink.xml.cmakein => qtgui_number_sink.xml} | 2 +- + ...sh_button.xml.cmakein => qtgui_push_button.xml} | 2 +- + .../{qtgui_range.xml.cmakein => qtgui_range.xml} | 0 + .../{qtgui_sink_x.xml.cmakein => qtgui_sink_x.xml} | 2 +- + ...tab_widget.xml.cmakein => qtgui_tab_widget.xml} | 2 +- + ...aster_x.xml.cmakein => qtgui_time_raster_x.xml} | 2 +- + ...me_sink_x.xml.cmakein => qtgui_time_sink_x.xml} | 2 +- + ..._sink_f.xml.cmakein => qtgui_vector_sink_f.xml} | 2 +- + ...nk_x.xml.cmakein => qtgui_waterfall_sink_x.xml} | 2 +- + 20 files changed, 43 insertions(+), 25 deletions(-) + rename gr-qtgui/grc/{qtgui_ber_sink_b.xml.cmakein => qtgui_ber_sink_b.xml} (99%) + rename gr-qtgui/grc/{qtgui_block_tree.xml.cmakein => qtgui_block_tree.xml} (100%) + rename gr-qtgui/grc/{qtgui_check_box.xml.cmakein => qtgui_check_box.xml} (97%) + rename gr-qtgui/grc/{qtgui_chooser.xml.cmakein => qtgui_chooser.xml} (98%) + rename gr-qtgui/grc/{qtgui_const_sink_x.xml.cmakein => qtgui_const_sink_x.xml} (99%) + rename gr-qtgui/grc/{qtgui_edit_box_msg.xml.cmakein => qtgui_edit_box_msg.xml} (98%) + rename gr-qtgui/grc/{qtgui_entry.xml.cmakein => qtgui_entry.xml} (97%) + rename gr-qtgui/grc/{qtgui_freq_sink_x.xml.cmakein => qtgui_freq_sink_x.xml} (99%) + rename gr-qtgui/grc/{qtgui_histogram_sink_x.xml.cmakein => qtgui_histogram_sink_x.xml} (99%) + rename gr-qtgui/grc/{qtgui_label.xml.cmakein => qtgui_label.xml} (97%) + rename gr-qtgui/grc/{qtgui_number_sink.xml.cmakein => qtgui_number_sink.xml} (99%) + rename gr-qtgui/grc/{qtgui_push_button.xml.cmakein => qtgui_push_button.xml} (97%) + rename gr-qtgui/grc/{qtgui_range.xml.cmakein => qtgui_range.xml} (100%) + rename gr-qtgui/grc/{qtgui_sink_x.xml.cmakein => qtgui_sink_x.xml} (98%) + rename gr-qtgui/grc/{qtgui_tab_widget.xml.cmakein => qtgui_tab_widget.xml} (99%) + rename gr-qtgui/grc/{qtgui_time_raster_x.xml.cmakein => qtgui_time_raster_x.xml} (99%) + rename gr-qtgui/grc/{qtgui_time_sink_x.xml.cmakein => qtgui_time_sink_x.xml} (99%) + rename gr-qtgui/grc/{qtgui_vector_sink_f.xml.cmakein => qtgui_vector_sink_f.xml} (99%) + rename gr-qtgui/grc/{qtgui_waterfall_sink_x.xml.cmakein => qtgui_waterfall_sink_x.xml} (99%) + +diff --git a/gr-qtgui/grc/CMakeLists.txt b/gr-qtgui/grc/CMakeLists.txt +index d01bcc52c4..74e6958639 100644 +--- a/gr-qtgui/grc/CMakeLists.txt ++++ b/gr-qtgui/grc/CMakeLists.txt +@@ -18,12 +18,30 @@ + # Boston, MA 02110-1301, USA. + + ######################################################################## +-file(GLOB xml_cmakein_files "*.xml.cmakein") ++file(GLOB xml_files "*.xml") + +-foreach(xml_cmakein_file IN ITEMS ${xml_cmakein_files}) +- get_filename_component(FILE_NAME ${xml_cmakein_file} NAME_WE) +- configure_file(${xml_cmakein_file} "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.xml" @ONLY) +- set(xml_files ${xml_files} "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.xml") +-endforeach(xml_cmakein_file) ++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}") + +-install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "qtgui_python") ++ 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.cmakein b/gr-qtgui/grc/qtgui_ber_sink_b.xml +similarity index 99% +rename from gr-qtgui/grc/qtgui_ber_sink_b.xml.cmakein +rename to gr-qtgui/grc/qtgui_ber_sink_b.xml +index 91a87ce595..05a36dfbc0 100644 +--- a/gr-qtgui/grc/qtgui_ber_sink_b.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_ber_sink_b.xml +@@ -7,7 +7,7 @@ + + QT GUI Bercurve Sink + qtgui_bercurve_sink +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5import Qt + from gnuradio import qtgui + import sip + import numpy +diff --git a/gr-qtgui/grc/qtgui_block_tree.xml.cmakein b/gr-qtgui/grc/qtgui_block_tree.xml +similarity index 100% +rename from gr-qtgui/grc/qtgui_block_tree.xml.cmakein +rename to gr-qtgui/grc/qtgui_block_tree.xml +diff --git a/gr-qtgui/grc/qtgui_check_box.xml.cmakein b/gr-qtgui/grc/qtgui_check_box.xml +similarity index 97% +rename from gr-qtgui/grc/qtgui_check_box.xml.cmakein +rename to gr-qtgui/grc/qtgui_check_box.xml +index 9edacb24d8..ccee59dd92 100644 +--- a/gr-qtgui/grc/qtgui_check_box.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_check_box.xml +@@ -8,7 +8,7 @@ + + QT GUI Check Box + variable_qtgui_check_box +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + self.$(id) = $(id) = $value + #set $win = '_%s_check_box'%$id + #if not $label() +diff --git a/gr-qtgui/grc/qtgui_chooser.xml.cmakein b/gr-qtgui/grc/qtgui_chooser.xml +similarity index 98% +rename from gr-qtgui/grc/qtgui_chooser.xml.cmakein +rename to gr-qtgui/grc/qtgui_chooser.xml +index 40c782bede..f79bb8ccb3 100644 +--- a/gr-qtgui/grc/qtgui_chooser.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_chooser.xml +@@ -8,8 +8,8 @@ + + QT GUI Chooser + variable_qtgui_chooser +- from PyQt@DESIRED_QT_VERSION@ import Qt +- from PyQt@DESIRED_QT_VERSION@.QtCore import QObject, pyqtSlot ++ from PyQt5 import Qt ++ from PyQt5.QtCore import QObject, pyqtSlot + self.$(id) = $(id) = $value + #slurp + #set $all_options = [$option0, $option1, $option2, $option3, $option4][:int($num_opts())] +diff --git a/gr-qtgui/grc/qtgui_const_sink_x.xml.cmakein b/gr-qtgui/grc/qtgui_const_sink_x.xml +similarity index 99% +rename from gr-qtgui/grc/qtgui_const_sink_x.xml.cmakein +rename to gr-qtgui/grc/qtgui_const_sink_x.xml +index 6fa725acb1..10f82cce82 100644 +--- a/gr-qtgui/grc/qtgui_const_sink_x.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_const_sink_x.xml +@@ -7,7 +7,7 @@ + + QT GUI Constellation Sink + qtgui_const_sink_x +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #set $win = 'self._%s_win'%$id +diff --git a/gr-qtgui/grc/qtgui_edit_box_msg.xml.cmakein b/gr-qtgui/grc/qtgui_edit_box_msg.xml +similarity index 98% +rename from gr-qtgui/grc/qtgui_edit_box_msg.xml.cmakein +rename to gr-qtgui/grc/qtgui_edit_box_msg.xml +index 75ff93349f..d77a4b3e1b 100644 +--- a/gr-qtgui/grc/qtgui_edit_box_msg.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_edit_box_msg.xml +@@ -7,7 +7,7 @@ + + QT GUI Message Edit Box + qtgui_edit_box_msg +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #set $win = 'self._%s_win'%$id +diff --git a/gr-qtgui/grc/qtgui_entry.xml.cmakein b/gr-qtgui/grc/qtgui_entry.xml +similarity index 97% +rename from gr-qtgui/grc/qtgui_entry.xml.cmakein +rename to gr-qtgui/grc/qtgui_entry.xml +index da61ee723a..fc0f4089d1 100644 +--- a/gr-qtgui/grc/qtgui_entry.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_entry.xml +@@ -8,7 +8,7 @@ + + QT GUI Entry + variable_qtgui_entry +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import eng_notation + self.$(id) = $(id) = $value + #set $win = 'self._%s_tool_bar'%$id +diff --git a/gr-qtgui/grc/qtgui_freq_sink_x.xml.cmakein b/gr-qtgui/grc/qtgui_freq_sink_x.xml +similarity index 99% +rename from gr-qtgui/grc/qtgui_freq_sink_x.xml.cmakein +rename to gr-qtgui/grc/qtgui_freq_sink_x.xml +index aaf0d75271..ed39db7781 100644 +--- a/gr-qtgui/grc/qtgui_freq_sink_x.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_freq_sink_x.xml +@@ -7,7 +7,7 @@ + + QT GUI Frequency Sink + qtgui_freq_sink_x +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +diff --git a/gr-qtgui/grc/qtgui_histogram_sink_x.xml.cmakein b/gr-qtgui/grc/qtgui_histogram_sink_x.xml +similarity index 99% +rename from gr-qtgui/grc/qtgui_histogram_sink_x.xml.cmakein +rename to gr-qtgui/grc/qtgui_histogram_sink_x.xml +index d04a44da13..9e3dcb104f 100644 +--- a/gr-qtgui/grc/qtgui_histogram_sink_x.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_histogram_sink_x.xml +@@ -7,7 +7,7 @@ + + QT GUI Histogram Sink + qtgui_histogram_sink_x +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #set $win = 'self._%s_win'%$id +diff --git a/gr-qtgui/grc/qtgui_label.xml.cmakein b/gr-qtgui/grc/qtgui_label.xml +similarity index 97% +rename from gr-qtgui/grc/qtgui_label.xml.cmakein +rename to gr-qtgui/grc/qtgui_label.xml +index c546e09dcc..946cee36ab 100644 +--- a/gr-qtgui/grc/qtgui_label.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_label.xml +@@ -9,7 +9,7 @@ + + QT GUI Label + variable_qtgui_label +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import eng_notation + self.$(id) = $(id) = $value + #set $win = 'self._%s_tool_bar'%$id +diff --git a/gr-qtgui/grc/qtgui_number_sink.xml.cmakein b/gr-qtgui/grc/qtgui_number_sink.xml +similarity index 99% +rename from gr-qtgui/grc/qtgui_number_sink.xml.cmakein +rename to gr-qtgui/grc/qtgui_number_sink.xml +index d4b4c5808f..06837493c3 100644 +--- a/gr-qtgui/grc/qtgui_number_sink.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_number_sink.xml +@@ -7,7 +7,7 @@ + + QT GUI Number Sink + qtgui_number_sink +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #set $win = 'self._%s_win'%$id +diff --git a/gr-qtgui/grc/qtgui_push_button.xml.cmakein b/gr-qtgui/grc/qtgui_push_button.xml +similarity index 97% +rename from gr-qtgui/grc/qtgui_push_button.xml.cmakein +rename to gr-qtgui/grc/qtgui_push_button.xml +index d99f230acf..49c2e9d6f0 100644 +--- a/gr-qtgui/grc/qtgui_push_button.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_push_button.xml +@@ -8,7 +8,7 @@ + + QT GUI Push Button + variable_qtgui_push_button +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + self.$(id) = $(id) = $value + #set $win = '_%s_push_button'%$id + #if not $label() +diff --git a/gr-qtgui/grc/qtgui_range.xml.cmakein b/gr-qtgui/grc/qtgui_range.xml +similarity index 100% +rename from gr-qtgui/grc/qtgui_range.xml.cmakein +rename to gr-qtgui/grc/qtgui_range.xml +diff --git a/gr-qtgui/grc/qtgui_sink_x.xml.cmakein b/gr-qtgui/grc/qtgui_sink_x.xml +similarity index 98% +rename from gr-qtgui/grc/qtgui_sink_x.xml.cmakein +rename to gr-qtgui/grc/qtgui_sink_x.xml +index 1c75921a75..a9bc469cd2 100644 +--- a/gr-qtgui/grc/qtgui_sink_x.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_sink_x.xml +@@ -7,7 +7,7 @@ + + QT GUI Sink + qtgui_sink_x +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +diff --git a/gr-qtgui/grc/qtgui_tab_widget.xml.cmakein b/gr-qtgui/grc/qtgui_tab_widget.xml +similarity index 99% +rename from gr-qtgui/grc/qtgui_tab_widget.xml.cmakein +rename to gr-qtgui/grc/qtgui_tab_widget.xml +index f5a1a73cdc..805542cc8b 100644 +--- a/gr-qtgui/grc/qtgui_tab_widget.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_tab_widget.xml +@@ -7,7 +7,7 @@ + + QT GUI Tab Widget + qtgui_tab_widget +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + #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.cmakein b/gr-qtgui/grc/qtgui_time_raster_x.xml +similarity index 99% +rename from gr-qtgui/grc/qtgui_time_raster_x.xml.cmakein +rename to gr-qtgui/grc/qtgui_time_raster_x.xml +index 94b7ef136a..d458f67eb9 100644 +--- a/gr-qtgui/grc/qtgui_time_raster_x.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_time_raster_x.xml +@@ -7,7 +7,7 @@ + + QT GUI Time Raster Sink + qtgui_time_raster_sink_x +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #set $win = 'self._%s_win'%$id +diff --git a/gr-qtgui/grc/qtgui_time_sink_x.xml.cmakein b/gr-qtgui/grc/qtgui_time_sink_x.xml +similarity index 99% +rename from gr-qtgui/grc/qtgui_time_sink_x.xml.cmakein +rename to gr-qtgui/grc/qtgui_time_sink_x.xml +index d239917907..d4347950ea 100644 +--- a/gr-qtgui/grc/qtgui_time_sink_x.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_time_sink_x.xml +@@ -7,7 +7,7 @@ + + QT GUI Time Sink + qtgui_time_sink_x +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +diff --git a/gr-qtgui/grc/qtgui_vector_sink_f.xml.cmakein b/gr-qtgui/grc/qtgui_vector_sink_f.xml +similarity index 99% +rename from gr-qtgui/grc/qtgui_vector_sink_f.xml.cmakein +rename to gr-qtgui/grc/qtgui_vector_sink_f.xml +index 8b928eb7ea..0f456323bf 100644 +--- a/gr-qtgui/grc/qtgui_vector_sink_f.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_vector_sink_f.xml +@@ -7,7 +7,7 @@ + + QT GUI Vector Sink + qtgui_vector_sink_f +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + import sip + #set $win = 'self._%s_win'%$id +diff --git a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml.cmakein b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml +similarity index 99% +rename from gr-qtgui/grc/qtgui_waterfall_sink_x.xml.cmakein +rename to gr-qtgui/grc/qtgui_waterfall_sink_x.xml +index d198ca084a..a684492246 100644 +--- a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml.cmakein ++++ b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml +@@ -7,7 +7,7 @@ + + QT GUI Waterfall Sink + qtgui_waterfall_sink_x +- from PyQt@DESIRED_QT_VERSION@ import Qt ++ from PyQt5 import Qt + from gnuradio import qtgui + from gnuradio.filter import firdes + import sip +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0015-fixed-the-FindQwt-to-prefer-pkgconfig-for-qt5-qwt.patch gnuradio-3.7.11/debian/patches/qt5-maint-0015-fixed-the-FindQwt-to-prefer-pkgconfig-for-qt5-qwt.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0015-fixed-the-FindQwt-to-prefer-pkgconfig-for-qt5-qwt.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0015-fixed-the-FindQwt-to-prefer-pkgconfig-for-qt5-qwt.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,48 @@ +From 1bd3700c2333b86e5374c1bb753270b50e0ecc2c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marcus=20M=C3=BCller?= +Date: Wed, 14 Sep 2016 16:48:16 -0600 +Subject: [PATCH 15/22] fixed the FindQwt to prefer pkgconfig for qt5-qwt + +--- + cmake/Modules/FindQwt.cmake | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake +index 2cffbe66f4..971578fd23 100644 +--- a/cmake/Modules/FindQwt.cmake ++++ b/cmake/Modules/FindQwt.cmake +@@ -5,6 +5,14 @@ + # qwt_global.h holds a string with the QWT version; + # test to make sure it's at least 5.2 + ++if (${DESIRED_QT_VERSION} MATCHES 5) ++ set(QWT_QT_VERSION qt5) ++ message(STATUS "Looking for Qt5Qwt6") ++ pkg_check_modules(QWT Qt5Qwt6) ++ message(STATUS "found ${QWT_FOUND}") ++else() ++ set(QWT_QT_VERSION qt4) ++ + find_path(QWT_INCLUDE_DIRS + NAMES qwt_global.h + HINTS +@@ -36,9 +44,15 @@ find_library (QWT_LIBRARIES + /usr/local/lib/qwt.framework + ) + ++endif() + set(QWT_FOUND FALSE) + if(QWT_INCLUDE_DIRS) +- file(STRINGS "${QWT_INCLUDE_DIRS}/qwt_global.h" ++ find_path(QWT_GLOBAL_DIR ++ NAMES qwt_global.h ++ HINTS ++ ${QWT_INCLUDE_DIRS} ++ ) ++ file(STRINGS "${QWT_GLOBAL_DIR}/qwt_global.h" + QWT_STRING_VERSION REGEX "QWT_VERSION_STR") + set(QWT_WRONG_VERSION True) + set(QWT_VERSION "No Version") +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0016-Revert-fixed-the-FindQwt-to-prefer-pkgconfig-for-qt5.patch gnuradio-3.7.11/debian/patches/qt5-maint-0016-Revert-fixed-the-FindQwt-to-prefer-pkgconfig-for-qt5.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0016-Revert-fixed-the-FindQwt-to-prefer-pkgconfig-for-qt5.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0016-Revert-fixed-the-FindQwt-to-prefer-pkgconfig-for-qt5.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,48 @@ +From 0eaf5c46e85d34ce4c527315141fc5c8a9381acd Mon Sep 17 00:00:00 2001 +From: Johnathan Corgan +Date: Tue, 20 Sep 2016 06:44:31 -0700 +Subject: [PATCH 16/22] Revert "fixed the FindQwt to prefer pkgconfig for + qt5-qwt" + +This reverts commit 222fd4391a39873b5e114f3d30d47608a658b090. +--- + cmake/Modules/FindQwt.cmake | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) + +diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake +index 971578fd23..2b83fbf2a4 100644 +--- a/cmake/Modules/FindQwt.cmake ++++ b/cmake/Modules/FindQwt.cmake +@@ -7,11 +7,9 @@ + + if (${DESIRED_QT_VERSION} MATCHES 5) + set(QWT_QT_VERSION qt5) +- message(STATUS "Looking for Qt5Qwt6") +- pkg_check_modules(QWT Qt5Qwt6) +- message(STATUS "found ${QWT_FOUND}") + else() + set(QWT_QT_VERSION qt4) ++endif() + + find_path(QWT_INCLUDE_DIRS + NAMES qwt_global.h +@@ -44,15 +42,9 @@ find_library (QWT_LIBRARIES + /usr/local/lib/qwt.framework + ) + +-endif() + set(QWT_FOUND FALSE) + if(QWT_INCLUDE_DIRS) +- find_path(QWT_GLOBAL_DIR +- NAMES qwt_global.h +- HINTS +- ${QWT_INCLUDE_DIRS} +- ) +- file(STRINGS "${QWT_GLOBAL_DIR}/qwt_global.h" ++ file(STRINGS "${QWT_INCLUDE_DIRS}/qwt_global.h" + QWT_STRING_VERSION REGEX "QWT_VERSION_STR") + set(QWT_WRONG_VERSION True) + set(QWT_VERSION "No Version") +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0017-qtgui-fix-stylesheet-for-qt5.patch gnuradio-3.7.11/debian/patches/qt5-maint-0017-qtgui-fix-stylesheet-for-qt5.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0017-qtgui-fix-stylesheet-for-qt5.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0017-qtgui-fix-stylesheet-for-qt5.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,25 @@ +From ae10f7b4f1ec25fc2e800d42a061603a08c0283b Mon Sep 17 00:00:00 2001 +From: Bastian Bloessl +Date: Fri, 11 Nov 2016 13:27:55 +0100 +Subject: [PATCH 17/22] qtgui: fix stylesheet for qt5 + +--- + gr-qtgui/python/qtgui/util.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gr-qtgui/python/qtgui/util.py b/gr-qtgui/python/qtgui/util.py +index d2e9495ac6..fffc482615 100644 +--- a/gr-qtgui/python/qtgui/util.py ++++ b/gr-qtgui/python/qtgui/util.py +@@ -25,7 +25,7 @@ from PyQt4 import Qt, QtCore, QtGui + from gnuradio import gr + + def check_set_qss(): +- app = QtGui.qApp ++ app = QtWidgets.qApp + qssfile = gr.prefs().get_string("qtgui","qss","") + if(len(qssfile)>0): + try: +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0018-qtgui-Expose-qt-time-sink-stem-plot-option.patch gnuradio-3.7.11/debian/patches/qt5-maint-0018-qtgui-Expose-qt-time-sink-stem-plot-option.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0018-qtgui-Expose-qt-time-sink-stem-plot-option.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0018-qtgui-Expose-qt-time-sink-stem-plot-option.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,48 @@ +From b261843acc2c9d2e849e4f3800f69efbfdcd115f Mon Sep 17 00:00:00 2001 +From: Derek Kozel +Date: Sun, 12 Nov 2017 23:38:40 +0000 +Subject: [PATCH 18/22] qtgui: Expose qt time sink stem plot option + +--- + gr-qtgui/grc/qtgui_time_sink_x.xml | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/gr-qtgui/grc/qtgui_time_sink_x.xml b/gr-qtgui/grc/qtgui_time_sink_x.xml +index d4347950ea..7358c78856 100644 +--- a/gr-qtgui/grc/qtgui_time_sink_x.xml ++++ b/gr-qtgui/grc/qtgui_time_sink_x.xml +@@ -29,6 +29,7 @@ self.$(id).enable_autoscale($autoscale) + self.$(id).enable_grid($grid) + self.$(id).enable_axis_labels($axislabels) + self.$(id).enable_control_panel($ctrlpanel) ++self.$(id).enable_stem_plot($stemplot) + + if not $legend: + self.$(id).disable_legend() +@@ -381,6 +382,23 @@ $(gui_hint()($win)) + + + ++ Stem Plot ++ stemplot ++ False ++ enum ++ part ++ ++ ++ Config ++ ++ ++ + Line 1 Label + label1 + string +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0019-qtgui-fixed-apps-for-Qt5-compatibility.patch gnuradio-3.7.11/debian/patches/qt5-maint-0019-qtgui-fixed-apps-for-Qt5-compatibility.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0019-qtgui-fixed-apps-for-Qt5-compatibility.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0019-qtgui-fixed-apps-for-Qt5-compatibility.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,2382 @@ +From 2cf36532281caf6cf7ee54d92b3f22537819e012 Mon Sep 17 00:00:00 2001 +From: "A. Maitland Bottoms" +Date: Sun, 25 Feb 2018 13:25:55 -0500 +Subject: [PATCH 19/22] qtgui fixed apps for Qt5 compatibility + +--- + gr-qtgui/apps/gr_constellation_plot | 12 +-- + gr-qtgui/apps/gr_psd_plot_b | 7 +- + gr-qtgui/apps/gr_psd_plot_c | 7 +- + gr-qtgui/apps/gr_psd_plot_f | 7 +- + gr-qtgui/apps/gr_psd_plot_i | 7 +- + gr-qtgui/apps/gr_psd_plot_s | 7 +- + gr-qtgui/apps/gr_spectrogram_plot | 6 +- + gr-qtgui/apps/gr_spectrogram_plot_b | 7 +- + gr-qtgui/apps/gr_spectrogram_plot_c | 7 +- + gr-qtgui/apps/gr_spectrogram_plot_f | 7 +- + gr-qtgui/apps/gr_spectrogram_plot_i | 7 +- + gr-qtgui/apps/gr_spectrogram_plot_s | 7 +- + gr-qtgui/apps/gr_time_plot_b | 7 +- + gr-qtgui/apps/gr_time_plot_c | 7 +- + gr-qtgui/apps/gr_time_plot_f | 7 +- + gr-qtgui/apps/gr_time_plot_i | 7 +- + gr-qtgui/apps/gr_time_plot_s | 7 +- + gr-qtgui/apps/gr_time_raster_b | 7 +- + gr-qtgui/apps/gr_time_raster_f | 7 +- + gr-qtgui/apps/plot_base.py | 8 +- + gr-qtgui/apps/plot_constellation_form.py | 16 +-- + gr-qtgui/apps/plot_form.py | 160 +++++++++++++--------------- + gr-qtgui/apps/plot_psd_base.py | 12 +-- + gr-qtgui/apps/plot_psd_form.py | 34 +++--- + gr-qtgui/apps/plot_spectrogram_base.py | 12 +-- + gr-qtgui/apps/plot_spectrogram_form.py | 67 ++++++------ + gr-qtgui/apps/plot_time_base.py | 12 +-- + gr-qtgui/apps/plot_time_form.py | 21 ++-- + gr-qtgui/apps/plot_time_raster_base.py | 14 +-- + gr-qtgui/apps/plot_time_raster_form.py | 60 +++++------ + gr-qtgui/apps/qt_digital.py | 58 +++++------ + gr-qtgui/apps/qt_digital_window.py | 148 +++++++++++++------------- + gr-qtgui/apps/uhd_display.py | 58 +++++------ + gr-qtgui/apps/usrp_display_qtgui.py | 172 +++++++++++++++---------------- + 34 files changed, 473 insertions(+), 516 deletions(-) + +diff --git a/gr-qtgui/apps/gr_constellation_plot b/gr-qtgui/apps/gr_constellation_plot +index 528bb97e5a..80d02d31ca 100755 +--- a/gr-qtgui/apps/gr_constellation_plot ++++ b/gr-qtgui/apps/gr_constellation_plot +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012 Free Software Foundation, Inc. ++# Copyright 2012,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -28,16 +28,16 @@ import os, 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." ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + try: + import scipy + except ImportError: +- print "Error: Scipy required (www.scipy.org)." ++ sys.stderr.write("Error: Scipy required (www.scipy.org).\n") + sys.exit(1) + + try: +@@ -66,7 +66,7 @@ class my_top_block(gr.top_block): + self._y_value = 2 + self.gui_y_axis = None + +- self.qapp = QtGui.QApplication(sys.argv) ++ self.qapp = QtWidgets.QApplication(sys.argv) + + self.skip = blocks.skiphead(gr.sizeof_gr_complex, self._start) + self.gui_snk = qtgui.const_sink_c(self._nsamps, "", self._nsigs) +@@ -98,7 +98,7 @@ class my_top_block(gr.top_block): + + # Get Python Qt references + pyQt = self.gui_snk.pyqwidget() +- self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget) ++ self.pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget) + + def get_gui(self): + return self.pyWin +diff --git a/gr-qtgui/apps/gr_psd_plot_b b/gr-qtgui/apps/gr_psd_plot_b +index 606311af48..70b9eabe38 100755 +--- a/gr-qtgui/apps/gr_psd_plot_b ++++ b/gr-qtgui/apps/gr_psd_plot_b +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -31,10 +31,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class psd_plot_b(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_psd_plot_c b/gr-qtgui/apps/gr_psd_plot_c +index 6df9fae190..7d827ac995 100755 +--- a/gr-qtgui/apps/gr_psd_plot_c ++++ b/gr-qtgui/apps/gr_psd_plot_c +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012 Free Software Foundation, Inc. ++# Copyright 2012,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -32,10 +32,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class psd_plot_c(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_psd_plot_f b/gr-qtgui/apps/gr_psd_plot_f +index f07e3e8b50..abb66f013b 100755 +--- a/gr-qtgui/apps/gr_psd_plot_f ++++ b/gr-qtgui/apps/gr_psd_plot_f +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -32,10 +32,11 @@ except ImportError: + + 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." ++ import sys ++ sys.sterr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class psd_plot_f(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_psd_plot_i b/gr-qtgui/apps/gr_psd_plot_i +index 1852345823..17d4970ec2 100755 +--- a/gr-qtgui/apps/gr_psd_plot_i ++++ b/gr-qtgui/apps/gr_psd_plot_i +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -31,10 +31,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class psd_plot_i(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_psd_plot_s b/gr-qtgui/apps/gr_psd_plot_s +index c06076f1f9..5f99c70209 100755 +--- a/gr-qtgui/apps/gr_psd_plot_s ++++ b/gr-qtgui/apps/gr_psd_plot_s +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -31,10 +31,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class psd_plot_s(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_spectrogram_plot b/gr-qtgui/apps/gr_spectrogram_plot +index db79f9dbad..5f5b8ba431 100755 +--- a/gr-qtgui/apps/gr_spectrogram_plot ++++ b/gr-qtgui/apps/gr_spectrogram_plot +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -36,10 +36,10 @@ except ImportError: + + 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." ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class spectrogram_plot_c(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_spectrogram_plot_b b/gr-qtgui/apps/gr_spectrogram_plot_b +index 0d7a16ea6e..29feaa33f5 100755 +--- a/gr-qtgui/apps/gr_spectrogram_plot_b ++++ b/gr-qtgui/apps/gr_spectrogram_plot_b +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -31,10 +31,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class spectrogram_plot_b(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_spectrogram_plot_c b/gr-qtgui/apps/gr_spectrogram_plot_c +index 52b0d4dff7..b5a7686da6 100755 +--- a/gr-qtgui/apps/gr_spectrogram_plot_c ++++ b/gr-qtgui/apps/gr_spectrogram_plot_c +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -32,10 +32,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class spectrogram_plot_c(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_spectrogram_plot_f b/gr-qtgui/apps/gr_spectrogram_plot_f +index 6ea5afc4ef..26346945f1 100755 +--- a/gr-qtgui/apps/gr_spectrogram_plot_f ++++ b/gr-qtgui/apps/gr_spectrogram_plot_f +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -32,10 +32,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class spectrogram_plot_f(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_spectrogram_plot_i b/gr-qtgui/apps/gr_spectrogram_plot_i +index 893df2a234..693d961d0d 100755 +--- a/gr-qtgui/apps/gr_spectrogram_plot_i ++++ b/gr-qtgui/apps/gr_spectrogram_plot_i +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -31,10 +31,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class spectrogram_plot_i(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_spectrogram_plot_s b/gr-qtgui/apps/gr_spectrogram_plot_s +index 82a22f740d..270bacbcaf 100755 +--- a/gr-qtgui/apps/gr_spectrogram_plot_s ++++ b/gr-qtgui/apps/gr_spectrogram_plot_s +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -31,10 +31,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class spectrogram_plot_s(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_time_plot_b b/gr-qtgui/apps/gr_time_plot_b +index d822557f1b..ae240561e6 100755 +--- a/gr-qtgui/apps/gr_time_plot_b ++++ b/gr-qtgui/apps/gr_time_plot_b +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -30,10 +30,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class plot_time_b(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_time_plot_c b/gr-qtgui/apps/gr_time_plot_c +index 202e0f88f4..af184304d4 100755 +--- a/gr-qtgui/apps/gr_time_plot_c ++++ b/gr-qtgui/apps/gr_time_plot_c +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -31,10 +31,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class plot_time_c(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_time_plot_f b/gr-qtgui/apps/gr_time_plot_f +index 8f5ad9f60d..e9892ac302 100755 +--- a/gr-qtgui/apps/gr_time_plot_f ++++ b/gr-qtgui/apps/gr_time_plot_f +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -31,10 +31,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class plot_time_f(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_time_plot_i b/gr-qtgui/apps/gr_time_plot_i +index 8a7888b451..be995897c1 100755 +--- a/gr-qtgui/apps/gr_time_plot_i ++++ b/gr-qtgui/apps/gr_time_plot_i +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -30,10 +30,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class plot_time_i(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_time_plot_s b/gr-qtgui/apps/gr_time_plot_s +index 7cee262379..7eff341225 100755 +--- a/gr-qtgui/apps/gr_time_plot_s ++++ b/gr-qtgui/apps/gr_time_plot_s +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012,2013 Free Software Foundation, Inc. ++# Copyright 2012,2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -30,10 +30,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class plot_time_s(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_time_raster_b b/gr-qtgui/apps/gr_time_raster_b +index ad8691489c..dc361832e6 100755 +--- a/gr-qtgui/apps/gr_time_raster_b ++++ b/gr-qtgui/apps/gr_time_raster_b +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -31,10 +31,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class plot_time_raster_b(plot_base.plot_base): +diff --git a/gr-qtgui/apps/gr_time_raster_f b/gr-qtgui/apps/gr_time_raster_f +index 5d6a8389cf..ccd5a79069 100755 +--- a/gr-qtgui/apps/gr_time_raster_f ++++ b/gr-qtgui/apps/gr_time_raster_f +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -31,10 +31,11 @@ except ImportError: + + 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class plot_time_raster_f(plot_base.plot_base): +diff --git a/gr-qtgui/apps/plot_base.py b/gr-qtgui/apps/plot_base.py +index eaab7599c7..a08f460c9c 100644 +--- a/gr-qtgui/apps/plot_base.py ++++ b/gr-qtgui/apps/plot_base.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -29,16 +29,16 @@ os.environ['GR_CONF_CONTROLPORT_ON'] = 'False' + + 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." ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + try: + import scipy + except ImportError: +- print "Error: Scipy required (www.scipy.org)." ++ sys.stderr.write("Error: Scipy required (www.scipy.org).\n") + sys.exit(1) + + try: +diff --git a/gr-qtgui/apps/plot_constellation_form.py b/gr-qtgui/apps/plot_constellation_form.py +index 01c6ed1865..dc62e09f13 100644 +--- a/gr-qtgui/apps/plot_constellation_form.py ++++ b/gr-qtgui/apps/plot_constellation_form.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -24,10 +24,11 @@ import sys + from gnuradio import filter + + try: +- from PyQt4 import QtGui, QtCore ++ from PyQt5 import QtWidgets, Qt + import sip + except ImportError: +- print "Error: Program requires PyQt4." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5.\n") + sys.exit(1) + + try: +@@ -39,8 +40,8 @@ class plot_constellation_form(plot_form): + def __init__(self, top_block, title='', scale=1): + plot_form.__init__(self, top_block, title, scale) + +- self.right_col_layout = QtGui.QVBoxLayout() +- self.right_col_form = QtGui.QFormLayout() ++ self.right_col_layout = QtWidgets.QVBoxLayout() ++ self.right_col_form = QtWidgets.QFormLayout() + self.right_col_layout.addLayout(self.right_col_form) + self.layout.addLayout(self.right_col_layout, 1,4,1,1) + +@@ -51,12 +52,11 @@ class plot_constellation_form(plot_form): + self.ybar.setSingleStep(self._pos_scale*(max(self.top_block._y_range/10, 0.010))) + self.ybar.setPageStep(self._pos_scale*(max(self.top_block._y_range/2, 0.010))) + +- self.auto_scale = QtGui.QCheckBox("Auto Scale", self) ++ self.auto_scale = QtWidgets.QCheckBox("Auto Scale", self) + if(self.top_block._auto_scale): + self.auto_scale.setChecked(self.top_block._auto_scale) + self.set_auto_scale(self.top_block._auto_scale) +- self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"), +- self.set_auto_scale) ++ self.auto_scale.stateChanged.connect(self.set_auto_scale) + self.right_col_layout.addWidget(self.auto_scale) + + self.ybar.setValue(1000*self.top_block._y_value) +diff --git a/gr-qtgui/apps/plot_form.py b/gr-qtgui/apps/plot_form.py +index 931565bd3e..39e3e1a928 100644 +--- a/gr-qtgui/apps/plot_form.py ++++ b/gr-qtgui/apps/plot_form.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2012 Free Software Foundation, Inc. ++# Copyright 2012,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -21,17 +21,18 @@ + # + + try: +- from PyQt4 import QtGui, QtCore ++ from PyQt5 import QtWidgets, Qt + import sip + except ImportError: +- print "Error: Program requires PyQt4." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5.\n") + sys.exit(1) + + import numpy + +-class plot_form(QtGui.QWidget): ++class plot_form(QtWidgets.QWidget): + def __init__(self, top_block, title='', scale=1): +- QtGui.QWidget.__init__(self, None) ++ QtWidgets.QWidget.__init__(self, None) + + self._start = 0 + self._end = 0 +@@ -44,81 +45,73 @@ class plot_form(QtGui.QWidget): + + self.setWindowTitle(title) + +- self.layout = QtGui.QGridLayout(self) ++ self.layout = QtWidgets.QGridLayout(self) + self.layout.addWidget(top_block.get_gui(), 1,2,1,2) + + # Create a save action +- self.save_act = QtGui.QAction("Save", self) +- self.save_act.setShortcut(QtGui.QKeySequence.Save) +- self.connect(self.save_act, QtCore.SIGNAL("triggered()"), +- self.save_figure) ++ self.save_act = QtWidgets.QAction("Save", self) ++ self.save_act.setShortcut(QtWidgets.QKeySequence.Save) ++ self.save_act.triggered.connect(self.save_figure) + + # Create an exit action +- self.exit_act = QtGui.QAction("Exit", self) +- self.exit_act.setShortcut(QtGui.QKeySequence.Close) +- self.connect(self.exit_act, QtCore.SIGNAL("triggered()"), +- self.close) ++ self.exit_act = QtWidgets.QAction("Exit", self) ++ self.exit_act.setShortcut(QtWidgets.QKeySequence.Close) ++ self.exit_act.triggered.connect(self.close) + + # Create a menu for the window +- self.menu = QtGui.QToolBar("Menu", self) ++ self.menu = QtWidgets.QToolBar("Menu", self) + self.menu.addAction(self.save_act) + self.menu.addAction(self.exit_act) + + self.layout.addWidget(self.menu, 0,0,1,4) + +- self.left_col_form = QtGui.QFormLayout() ++ self.left_col_form = QtWidgets.QFormLayout() + self.layout.addLayout(self.left_col_form, 1,0,1,1) + self.layout.setColumnStretch(0, 0) + self.layout.setColumnStretch(2, 1) + + # Create Edit boxes for X-axis start/stop +- self.size_val = QtGui.QIntValidator(0, top_block._max_nsamps, self) ++ self.size_val = QtWidgets.QIntValidator(0, top_block._max_nsamps, self) + +- self.start_edit = QtGui.QLineEdit(self) ++ self.start_edit = QtWidgets.QLineEdit(self) + self.start_edit.setMinimumWidth(100) + self.start_edit.setMaximumWidth(100) +- self.start_edit.setText(QtCore.QString("%1").arg(top_block._start)) ++ self.start_edit.setText("{0}".format(top_block._start)) + self.start_edit.setValidator(self.size_val) + self.left_col_form.addRow("Start:", self.start_edit) +- self.connect(self.start_edit, QtCore.SIGNAL("returnPressed()"), +- self.update_xaxis_pos) ++ self.start_edit.returnPressed.connect(self.update_xaxis_pos) + + end = top_block._start + top_block._nsamps +- self.end_edit = QtGui.QLineEdit(self) ++ self.end_edit = QtWidgets.QLineEdit(self) + self.end_edit.setMinimumWidth(100) + self.end_edit.setMaximumWidth(100) +- self.end_edit.setText(QtCore.QString("%1").arg(end)) ++ self.end_edit.setText("{0}".format(end)) + self.end_edit.setValidator(self.size_val) + self.left_col_form.addRow("End:", self.end_edit) +- self.connect(self.end_edit, QtCore.SIGNAL("returnPressed()"), +- self.update_xaxis_pos) ++ self.end_edit.returnPressed.connect(self.update_xaxis_pos) + + # Create a slider to move the position in the file +- self.posbar = QtGui.QSlider(QtCore.Qt.Horizontal, self) ++ self.posbar = QtWidgets.QSlider(Qt.Qt.Horizontal, self) + self.posbar.setMaximum(self.top_block._max_nsamps) + self.posbar.setPageStep(self.top_block._nsamps) +- self.connect(self.posbar, QtCore.SIGNAL("valueChanged(int)"), +- self.update_xaxis_slider) ++ self.posbar.valueChanged.connect(self.update_xaxis_slider) + self.layout.addWidget(self.posbar, 2,2,1,1) + + # Create Edit boxes for Y-axis min/max +- self.y_max_edit = QtGui.QLineEdit(self) ++ self.y_max_edit = QtWidgets.QLineEdit(self) + self.y_max_edit.setMinimumWidth(100) + self.y_max_edit.setMaximumWidth(100) + self.left_col_form.addRow("Y Max:", self.y_max_edit) +- self.connect(self.y_max_edit, QtCore.SIGNAL("editingFinished()"), +- self.update_yaxis_pos) ++ self.y_max_edit.editingFinished.connect(self.update_yaxis_pos) + +- self.y_min_edit = QtGui.QLineEdit(self) ++ self.y_min_edit = QtWidgets.QLineEdit(self) + self.y_min_edit.setMinimumWidth(100) + self.y_min_edit.setMaximumWidth(100) + self.left_col_form.addRow("Y Min:", self.y_min_edit) +- self.connect(self.y_min_edit, QtCore.SIGNAL("editingFinished()"), +- self.update_yaxis_pos) ++ self.y_min_edit.editingFinished.connect(self.update_yaxis_pos) + +- self.grid_check = QtGui.QCheckBox("Grid", self) +- self.connect(self.grid_check, QtCore.SIGNAL("stateChanged(int)"), +- self.set_grid_check) ++ self.grid_check = QtWidgets.QCheckBox("Grid", self) ++ self.grid_check.stateChanged.connect(self.set_grid_check) + self.left_col_form.addWidget(self.grid_check) + + # Create a slider to move the plot's y-axis offset +@@ -126,42 +119,39 @@ class plot_form(QtGui.QWidget): + _ymin = numpy.int32(max(numpy.iinfo(numpy.int32).min, self.top_block._y_min)) + _yrng = numpy.int32(min(numpy.iinfo(numpy.int32).max, self.top_block._y_range)) + _yval = numpy.int32(min(numpy.iinfo(numpy.int32).max, self.top_block._y_value)) +- self.ybar = QtGui.QSlider(QtCore.Qt.Vertical, self) ++ self.ybar = QtWidgets.QSlider(Qt.Qt.Vertical, self) + self.ybar.setMinimum(self._pos_scale*_ymin) + self.ybar.setMaximum(self._pos_scale*_ymax) + self.ybar.setSingleStep(self._pos_scale*(_yrng/10)) + self.ybar.setPageStep(self._pos_scale*(_yrng/2)) + self.ybar.setValue(self._pos_scale*_ymax) +- self.connect(self.ybar, QtCore.SIGNAL("valueChanged(int)"), +- self.update_yaxis_slider) ++ self.ybar.valueChanged.connect(self.update_yaxis_slider) + self.layout.addWidget(self.ybar, 1,1,1,1) + + self.gui_y_axis(top_block._y_value-top_block._y_range, top_block._y_value) + + # Create an edit box for the Sample Rate + sr = top_block._samp_rate +- self.samp_rate_edit = QtGui.QLineEdit(self) ++ self.samp_rate_edit = QtWidgets.QLineEdit(self) + self.samp_rate_edit.setMinimumWidth(100) + self.samp_rate_edit.setMaximumWidth(100) +- self.samp_rate_edit.setText(QtCore.QString("%1").arg(sr)) ++ self.samp_rate_edit.setText("{0}".format(sr)) + self.left_col_form.addRow("Sample Rate:", self.samp_rate_edit) +- self.connect(self.samp_rate_edit, QtCore.SIGNAL("returnPressed()"), +- self.update_samp_rate) ++ self.samp_rate_edit.returnPressed.connect(self.update_samp_rate) + + # Create an edit box for the center frequency + freq = top_block._center_freq +- self.freq_edit = QtGui.QLineEdit(self) ++ self.freq_edit = QtWidgets.QLineEdit(self) + self.freq_edit.setMinimumWidth(100) + self.freq_edit.setMaximumWidth(100) +- self.freq_edit.setText(QtCore.QString("%1").arg(freq)) ++ self.freq_edit.setText("{0}".format(freq)) + self.left_col_form.addRow("Frequency:", self.freq_edit) +- self.connect(self.freq_edit, QtCore.SIGNAL("returnPressed()"), +- self.update_samp_rate) ++ self.freq_edit.returnPressed.connect(self.update_samp_rate) + + self.resize(1000, 500) + + def add_line_control(self, layout): +- self._line_tabs = QtGui.QTabWidget() ++ self._line_tabs = QtWidgets.QTabWidget() + + self._line_pages = [] + self._line_forms = [] +@@ -172,51 +162,46 @@ class plot_form(QtGui.QWidget): + self._marker_edit = [] + self._alpha_edit = [] + for n in xrange(self.top_block._nsigs): +- self._line_pages.append(QtGui.QDialog()) +- self._line_forms.append(QtGui.QFormLayout(self._line_pages[-1])) ++ self._line_pages.append(QtWidgets.QDialog()) ++ self._line_forms.append(QtWidgets.QFormLayout(self._line_pages[-1])) + + label = self.top_block.gui_snk.line_label(n) +- self._label_edit.append(QtGui.QLineEdit(self)) ++ self._label_edit.append(QtWidgets.QLineEdit(self)) + self._label_edit[-1].setMinimumWidth(125) + self._label_edit[-1].setMaximumWidth(125) +- self._label_edit[-1].setText(QtCore.QString("%1").arg(label)) ++ self._label_edit[-1].setText("{0}".format(label)) + self._line_forms[-1].addRow("Label:", self._label_edit[-1]) +- self.connect(self._label_edit[-1], QtCore.SIGNAL("returnPressed()"), +- self.update_line_label) ++ self._label_edit[-1].returnPressed.connect(self.update_line_label) + +- width_val = QtGui.QIntValidator(1, 20, self) +- self._size_edit.append(QtGui.QLineEdit(self)) ++ width_val = QtWidgets.QIntValidator(1, 20, self) ++ self._size_edit.append(QtWidgets.QLineEdit(self)) + self._size_edit[-1].setValidator(width_val) + self._size_edit[-1].setMinimumWidth(100) + self._size_edit[-1].setMaximumWidth(100) +- self._size_edit[-1].setText(QtCore.QString("%1").arg(1)) ++ self._size_edit[-1].setText("{0}".format(1)) + self._line_forms[-1].addRow("Width:", self._size_edit[-1]) +- self.connect(self._size_edit[-1], QtCore.SIGNAL("returnPressed()"), +- self.update_line_size) ++ self._size_edit[-1].returnPressed.connect(self.update_line_size) + + color = self.top_block.gui_snk.line_color(n) +- self._color_edit.append(QtGui.QLineEdit(self)) ++ self._color_edit.append(QtWidgets.QLineEdit(self)) + self._color_edit[-1].setMinimumWidth(100) + self._color_edit[-1].setMaximumWidth(100) +- self._color_edit[-1].setText(QtCore.QString("%1").arg(color)) ++ self._color_edit[-1].setText("{0}".format(color)) + self._line_forms[-1].addRow("Color:", self._color_edit[-1]) +- self.connect(self._color_edit[-1], QtCore.SIGNAL("returnPressed()"), +- self.update_line_color) +- +- self._qtstyles = {"None": QtCore.Qt.NoPen, +- "Solid": QtCore.Qt.SolidLine, +- "Dash": QtCore.Qt.DashLine, +- "Dot": QtCore.Qt.DotLine, +- "DashDot": QtCore.Qt.DashDotLine, +- "DashDotDot": QtCore.Qt.DashDotDotLine} +- self._style_edit.append(QtGui.QComboBox(self)) ++ self._color_edit[-1].returnPressed.connect(self.update_line_color) ++ ++ self._qtstyles = {"None": Qt.Qt.NoPen, ++ "Solid": Qt.Qt.SolidLine, ++ "Dash": Qt.Qt.DashLine, ++ "Dot": Qt.Qt.DotLine, ++ "DashDot": Qt.Qt.DashDotLine, ++ "DashDotDot": Qt.Qt.DashDotDotLine} ++ self._style_edit.append(QtWidgets.QComboBox(self)) + self._style_edit[-1].addItems(["None", "Solid", "Dash", + "Dot", "DashDot", "DashDotDot"]) + self._style_edit[-1].setCurrentIndex(1) + self._line_forms[-1].addRow("Style:", self._style_edit[-1]) +- self.connect(self._style_edit[-1], +- QtCore.SIGNAL("currentIndexChanged(int)"), +- self.update_line_style) ++ self._style_edit[-1].currentIndexChanged.connect(self.update_line_style) + + # A bit dangerous, this. If QWT ever changes the lineup, + # we will have to adjust this, too. But we also can't +@@ -236,28 +221,25 @@ class plot_form(QtGui.QWidget): + "Star 1": 12, + "Star 2": 13, + "Hexagon": 14} +- self._marker_edit.append(QtGui.QComboBox(self)) ++ self._marker_edit.append(QtWidgets.QComboBox(self)) + self._marker_edit[-1].addItems(["None", "Circle", "Rectangle", "Diamond", + "Triangle", "Down Triangle", "Left Triangle", + "Right Triangle", "Cross", "X-Cross", + "Horiz. Line", "Vert. Line", "Star 1", + "Star 2", "Hexagon"]) + self._line_forms[-1].addRow("Marker:", self._marker_edit[-1]) +- self.connect(self._marker_edit[-1], +- QtCore.SIGNAL("currentIndexChanged(int)"), +- self.update_line_marker) ++ self._marker_edit[-1].currentIndexChanged.connect(self.update_line_marker) + +- alpha_val = QtGui.QDoubleValidator(0, 1.0, 2, self) ++ alpha_val = QtWidgets.QDoubleValidator(0, 1.0, 2, self) + alpha_val.setTop(1.0) + alpha = self.top_block.gui_snk.line_alpha(n) +- self._alpha_edit.append(QtGui.QLineEdit(self)) ++ self._alpha_edit.append(QtWidgets.QLineEdit(self)) + self._alpha_edit[-1].setMinimumWidth(50) + self._alpha_edit[-1].setMaximumWidth(100) +- self._alpha_edit[-1].setText(QtCore.QString("%1").arg(alpha)) ++ self._alpha_edit[-1].setText("{0]".format(alpha)) + self._alpha_edit[-1].setValidator(alpha_val) + self._line_forms[-1].addRow("Alpha:", self._alpha_edit[-1]) +- self.connect(self._alpha_edit[-1], QtCore.SIGNAL("returnPressed()"), +- self.update_line_alpha) ++ self._alpha_edit[-1].returnPressed.connect(self.update_line_alpha) + + self._line_tabs.addTab(self._line_pages[-1], "{0}".format(label)) + +@@ -303,10 +285,10 @@ class plot_form(QtGui.QWidget): + newend = self.end_edit.text().toUInt()[0] + if(newstart != self._start or newend != self._end): + if(newend < newstart): +- QtGui.QMessageBox.information( ++ QtWidgets.QMessageBox.information( + self, "Warning", + "End sample is less than start sample.", +- QtGui.QMessageBox.Ok); ++ QtWidgets.QMessageBox.Ok); + else: + newnsamps = newend - newstart + self.top_block.reset(newstart, newnsamps) +@@ -377,13 +359,13 @@ class plot_form(QtGui.QWidget): + self.top_block.gui_snk.enable_grid(False) + + def save_figure(self): +- qpix = QtGui.QPixmap.grabWidget(self.top_block.pyWin) ++ qpix = QtWidgets.QPixmap.grabWidget(self.top_block.pyWin) + types = "JPEG file (*.jpg);;" + \ + "Portable Network Graphics file (*.png);;" + \ + "Bitmap file (*.bmp);;" + \ + "TIFF file (*.tiff)" +- filebox = QtGui.QFileDialog(self, "Save Image", "./", types) +- filebox.setViewMode(QtGui.QFileDialog.Detail) ++ filebox = QtWidgets.QFileDialog(self, "Save Image", "./", types) ++ filebox.setViewMode(QtWidgets.QFileDialog.Detail) + if(filebox.exec_()): + filename = filebox.selectedFiles()[0] + filetype = filebox.selectedNameFilter() +diff --git a/gr-qtgui/apps/plot_psd_base.py b/gr-qtgui/apps/plot_psd_base.py +index 46f903e1b5..bf070f2c1c 100644 +--- a/gr-qtgui/apps/plot_psd_base.py ++++ b/gr-qtgui/apps/plot_psd_base.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -27,16 +27,16 @@ import os, 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." ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + try: + import scipy + except ImportError: +- print "Error: Scipy required (www.scipy.org)." ++ sys.stderr.write("Error: Scipy required (www.scipy.org).\n") + sys.exit(1) + + try: +@@ -69,7 +69,7 @@ class plot_base(gr.top_block): + + self._is_setup = False + +- self.qapp = QtGui.QApplication(sys.argv) ++ self.qapp = QtWidgets.QApplication(sys.argv) + + def setup(self): + self.skip = blocks.skiphead(self.dsize, self._start) +@@ -104,7 +104,7 @@ class plot_base(gr.top_block): + + # Get Python Qt references + pyQt = self.gui_snk.pyqwidget() +- self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget) ++ self.pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget) + + self._is_setup = True + +diff --git a/gr-qtgui/apps/plot_psd_form.py b/gr-qtgui/apps/plot_psd_form.py +index 2d1fcd10bc..3109fb2b0c 100644 +--- a/gr-qtgui/apps/plot_psd_form.py ++++ b/gr-qtgui/apps/plot_psd_form.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -24,10 +24,10 @@ import sys + from gnuradio import filter + + try: +- from PyQt4 import QtGui, QtCore ++ from PyQt5 import QtWidgets, Qt + import sip + except ImportError: +- print "Error: Program requires PyQt4." ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + try: +@@ -39,39 +39,35 @@ class plot_psd_form(plot_form): + def __init__(self, top_block, title=''): + plot_form.__init__(self, top_block, title) + +- self.right_col_layout = QtGui.QVBoxLayout() +- self.right_col_form = QtGui.QFormLayout() ++ self.right_col_layout = QtWidgets.QVBoxLayout() ++ self.right_col_form = QtWidgets.QFormLayout() + self.right_col_layout.addLayout(self.right_col_form) + self.layout.addLayout(self.right_col_layout, 1,4,1,1) + +- self.psd_size_val = QtGui.QIntValidator(0, 2**18, self) +- self.psd_size_edit = QtGui.QLineEdit(self) ++ self.psd_size_val = QtWidgets.QIntValidator(0, 2**18, self) ++ self.psd_size_edit = QtWidgets.QLineEdit(self) + self.psd_size_edit.setMinimumWidth(50) + self.psd_size_edit.setMaximumWidth(100) +- self.psd_size_edit.setText(QtCore.QString("%1").arg(top_block._psd_size)) ++ self.psd_size_edit.setText("{0}".format(top_block._psd_size)) + self.psd_size_edit.setValidator(self.psd_size_val) + self.right_col_form.addRow("FFT:", self.psd_size_edit) +- self.connect(self.psd_size_edit, QtCore.SIGNAL("returnPressed()"), +- self.update_psd_size) ++ self.psd_size_edit.returnPressed.connect(self.update_psd_size) + +- self.psd_win_combo = QtGui.QComboBox(self) ++ self.psd_win_combo = QtWidgets.QComboBox(self) + self.psd_win_combo.addItems(["None", "Hamming", "Hann", "Blackman", + "Rectangular", "Kaiser", "Blackman-harris"]) + self.psd_win_combo.setCurrentIndex(self.top_block.gui_snk.fft_window()+1) + self.right_col_form.addRow("Window:", self.psd_win_combo) +- self.connect(self.psd_win_combo, +- QtCore.SIGNAL("currentIndexChanged(int)"), +- self.update_psd_win) ++ self.psd_win_combo.currentIndexChanged.connect(self.update_psd_win) + +- self.psd_avg_val = QtGui.QDoubleValidator(0, 1.0, 4, self) +- self.psd_avg_edit = QtGui.QLineEdit(self) ++ self.psd_avg_val = QtWidgets.QDoubleValidator(0, 1.0, 4, self) ++ self.psd_avg_edit = QtWidgets.QLineEdit(self) + self.psd_avg_edit.setMinimumWidth(50) + self.psd_avg_edit.setMaximumWidth(100) +- self.psd_avg_edit.setText(QtCore.QString("%1").arg(top_block._avg)) ++ self.psd_avg_edit.setText("{0}".format(top_block._avg)) + self.psd_avg_edit.setValidator(self.psd_avg_val) + self.right_col_form.addRow("Average:", self.psd_avg_edit) +- self.connect(self.psd_avg_edit, QtCore.SIGNAL("returnPressed()"), +- self.update_psd_avg) ++ self.psd_avg_edit.returnPressed.connect(self.update_psd_avg) + + self.add_line_control(self.right_col_layout) + +diff --git a/gr-qtgui/apps/plot_spectrogram_base.py b/gr-qtgui/apps/plot_spectrogram_base.py +index b252bb8863..295ef4a753 100644 +--- a/gr-qtgui/apps/plot_spectrogram_base.py ++++ b/gr-qtgui/apps/plot_spectrogram_base.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -27,16 +27,16 @@ import os, 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." ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + try: + import scipy + except ImportError: +- print "Error: Scipy required (www.scipy.org)." ++ sys.stderr.write("Error: Scipy required (www.scipy.org).\n") + sys.exit(1) + + try: +@@ -69,7 +69,7 @@ class plot_base(gr.top_block): + + self._is_setup = False + +- self.qapp = QtGui.QApplication(sys.argv) ++ self.qapp = QtWidgets.QApplication(sys.argv) + + def setup(self): + self.skip = blocks.skiphead(self.dsize, self._start) +@@ -106,7 +106,7 @@ class plot_base(gr.top_block): + + # Get Python Qt references + pyQt = self.gui_snk.pyqwidget() +- self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget) ++ self.pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget) + + self._is_setup = True + +diff --git a/gr-qtgui/apps/plot_spectrogram_form.py b/gr-qtgui/apps/plot_spectrogram_form.py +index 17cb0335bd..ab4685106d 100644 +--- a/gr-qtgui/apps/plot_spectrogram_form.py ++++ b/gr-qtgui/apps/plot_spectrogram_form.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -24,10 +24,10 @@ import sys + from gnuradio import filter + + try: +- from PyQt4 import QtGui, QtCore ++ from PyQt5 import QtWidgets, Qt + import sip + except ImportError: +- print "Error: Program requires PyQt4." ++ sys.stderr.write("Error: Program requires PyQt5.\n") + sys.exit(1) + + try: +@@ -39,45 +39,40 @@ class plot_spectrogram_form(plot_form): + def __init__(self, top_block, title=''): + plot_form.__init__(self, top_block, title) + +- self.right_col_layout = QtGui.QVBoxLayout() +- self.right_col_form = QtGui.QFormLayout() ++ self.right_col_layout = QtWidgets.QVBoxLayout() ++ self.right_col_form = QtWidgets.QFormLayout() + self.right_col_layout.addLayout(self.right_col_form) + self.layout.addLayout(self.right_col_layout, 1,4,1,1) + +- self.psd_size_val = QtGui.QIntValidator(0, 2**18, self) +- self.psd_size_edit = QtGui.QLineEdit(self) ++ self.psd_size_val = QtWidgets.QIntValidator(0, 2**18, self) ++ self.psd_size_edit = QtWidgets.QLineEdit(self) + self.psd_size_edit.setMinimumWidth(50) + self.psd_size_edit.setMaximumWidth(100) +- self.psd_size_edit.setText(QtCore.QString("%1").arg(top_block._psd_size)) ++ self.psd_size_edit.setText("{0}".format(top_block._psd_size)) + self.psd_size_edit.setValidator(self.psd_size_val) + self.right_col_form.addRow("FFT Size:", self.psd_size_edit) +- self.connect(self.psd_size_edit, QtCore.SIGNAL("returnPressed()"), +- self.update_psd_size) ++ self.psd_size_edit.returnPressed.connect(self.update_psd_size) + +- self.psd_win_combo = QtGui.QComboBox(self) ++ self.psd_win_combo = QtWidgets.QComboBox(self) + self.psd_win_combo.addItems(["None", "Hamming", "Hann", "Blackman", + "Rectangular", "Kaiser", "Blackman-harris"]) + self.psd_win_combo.setCurrentIndex(self.top_block.gui_snk.fft_window()+1) + self.right_col_form.addRow("Window:", self.psd_win_combo) +- self.connect(self.psd_win_combo, +- QtCore.SIGNAL("currentIndexChanged(int)"), +- self.update_psd_win) ++ self.psd_win_combo.currentIndexChanged.connect(self.update_psd_win) + +- self.psd_avg_val = QtGui.QDoubleValidator(0, 1.0, 4, self) +- self.psd_avg_edit = QtGui.QLineEdit(self) ++ self.psd_avg_val = QtWidgets.QDoubleValidator(0, 1.0, 4, self) ++ self.psd_avg_edit = QtWidgets.QLineEdit(self) + self.psd_avg_edit.setMinimumWidth(50) + self.psd_avg_edit.setMaximumWidth(100) +- self.psd_avg_edit.setText(QtCore.QString("%1").arg(top_block._avg)) ++ self.psd_avg_edit.setText("{0}".format(top_block._avg)) + self.psd_avg_edit.setValidator(self.psd_avg_val) + self.right_col_form.addRow("Average:", self.psd_avg_edit) +- self.connect(self.psd_avg_edit, QtCore.SIGNAL("returnPressed()"), +- self.update_psd_avg) ++ self.psd_avg_edit.returnPressed.connect(self.update_psd_avg) + +- self.autoscale_button = QtGui.QPushButton("Auto Scale", self) ++ self.autoscale_button = QtWidgets.QPushButton("Auto Scale", self) + self.autoscale_button.setMaximumWidth(100) + self.right_col_layout.addWidget(self.autoscale_button) +- self.connect(self.autoscale_button, QtCore.SIGNAL("clicked()"), +- self.spectrogram_auto_scale) ++ self.autoscale_button.clicked.connect(self.spectrogram_auto_scale) + + self.add_spectrogram_control(self.right_col_layout) + +@@ -103,7 +98,7 @@ class plot_spectrogram_form(plot_form): + self.top_block._nsamps) + + def add_spectrogram_control(self, layout): +- self._line_tabs = QtGui.QTabWidget() ++ self._line_tabs = QtWidgets.QTabWidget() + + self._line_pages = [] + self._line_forms = [] +@@ -114,38 +109,34 @@ class plot_spectrogram_form(plot_form): + self._marker_edit = [] + self._alpha_edit = [] + for n in xrange(self.top_block._nsigs): +- self._line_pages.append(QtGui.QDialog()) +- self._line_forms.append(QtGui.QFormLayout(self._line_pages[-1])) ++ self._line_pages.append(QtWidgets.QDialog()) ++ self._line_forms.append(QtWidgets.QFormLayout(self._line_pages[-1])) + + label = self.top_block.gui_snk.line_label(n) +- self._label_edit.append(QtGui.QLineEdit(self)) ++ self._label_edit.append(QtWidgets.QLineEdit(self)) + self._label_edit[-1].setMinimumWidth(125) + self._label_edit[-1].setMaximumWidth(125) +- self._label_edit[-1].setText(QtCore.QString("%1").arg(label)) ++ self._label_edit[-1].setText("{0}".format(label)) + self._line_forms[-1].addRow("Label:", self._label_edit[-1]) +- self.connect(self._label_edit[-1], QtCore.SIGNAL("returnPressed()"), +- self.update_line_label) ++ self._label_edit[-1].returnPressed.connect(self.update_line_label) + + self._qtcolormaps = ["Multi Color", "White Hot", + "Black Hot", "Incandescent"] +- self._color_edit.append(QtGui.QComboBox(self)) ++ self._color_edit.append(QtWidgets.QComboBox(self)) + self._color_edit[-1].addItems(self._qtcolormaps) + self._line_forms[-1].addRow("Color Map:", self._color_edit[-1]) +- self.connect(self._color_edit[-1], +- QtCore.SIGNAL("currentIndexChanged(int)"), +- self.update_color_map) ++ self._color_edit[-1].currentIndexChanged.connect(self.update_color_map) + +- alpha_val = QtGui.QDoubleValidator(0, 1.0, 2, self) ++ alpha_val = QtWidgets.QDoubleValidator(0, 1.0, 2, self) + alpha_val.setTop(1.0) + alpha = self.top_block.gui_snk.line_alpha(n) +- self._alpha_edit.append(QtGui.QLineEdit(self)) ++ self._alpha_edit.append(QtWidgets.QLineEdit(self)) + self._alpha_edit[-1].setMinimumWidth(50) + self._alpha_edit[-1].setMaximumWidth(100) +- self._alpha_edit[-1].setText(QtCore.QString("%1").arg(alpha)) ++ self._alpha_edit[-1].setText("{0}".format(alpha)) + self._alpha_edit[-1].setValidator(alpha_val) + self._line_forms[-1].addRow("Alpha:", self._alpha_edit[-1]) +- self.connect(self._alpha_edit[-1], QtCore.SIGNAL("returnPressed()"), +- self.update_line_alpha) ++ self._alpha_edit[-1].returnPressed.connect(self.update_line_alpha) + + self._line_tabs.addTab(self._line_pages[-1], "{0}".format(label)) + +diff --git a/gr-qtgui/apps/plot_time_base.py b/gr-qtgui/apps/plot_time_base.py +index 007c94d044..82e7d75cae 100644 +--- a/gr-qtgui/apps/plot_time_base.py ++++ b/gr-qtgui/apps/plot_time_base.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -27,16 +27,16 @@ import os, 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." ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + try: + import scipy + except ImportError: +- print "Error: Scipy required (www.scipy.org)." ++ sys.stderr.write("Error: Scipy required (www.scipy.org).\n") + sys.exit(1) + + try: +@@ -68,7 +68,7 @@ class plot_base(gr.top_block): + self._y_value = 1 + self.gui_y_axis = None + +- self.qapp = QtGui.QApplication(sys.argv) ++ self.qapp = QtWidgets.QApplication(sys.argv) + + def setup(self): + self.skip = blocks.skiphead(self.dsize, self._start) +@@ -108,7 +108,7 @@ class plot_base(gr.top_block): + + # Get Python Qt references + pyQt = self.gui_snk.pyqwidget() +- self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget) ++ self.pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget) + + self._is_setup = True + +diff --git a/gr-qtgui/apps/plot_time_form.py b/gr-qtgui/apps/plot_time_form.py +index 0ab94e6cfe..0e650813ff 100644 +--- a/gr-qtgui/apps/plot_time_form.py ++++ b/gr-qtgui/apps/plot_time_form.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -24,10 +24,10 @@ import sys + from gnuradio import filter + + try: +- from PyQt4 import QtGui, QtCore ++ from PyQt5 import QtWidgets, Qt + import sip + except ImportError: +- print "Error: Program requires PyQt4." ++ sys.stderr.write("Error: Program requires PyQt5.\n") + sys.exit(1) + + try: +@@ -39,21 +39,19 @@ class plot_time_form(plot_form): + def __init__(self, top_block, title='', scale=1): + plot_form.__init__(self, top_block, title, scale) + +- self.right_col_layout = QtGui.QVBoxLayout() +- self.right_col_form = QtGui.QFormLayout() ++ self.right_col_layout = QtWidgets.QVBoxLayout() ++ self.right_col_form = QtWidgets.QFormLayout() + self.right_col_layout.addLayout(self.right_col_form) + self.layout.addLayout(self.right_col_layout, 1,4,1,1) + +- self.auto_scale = QtGui.QCheckBox("Auto Scale", self) ++ self.auto_scale = QtWidgets.QCheckBox("Auto Scale", self) + if(self.top_block._auto_scale): + self.auto_scale.setChecked(self.top_block._auto_scale) +- self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"), +- self.set_auto_scale) ++ self.auto_scale.stateChanged.connect(self.set_auto_scale) + self.right_col_layout.addWidget(self.auto_scale) + +- self.stem = QtGui.QCheckBox("Stem", self) +- self.connect(self.stem, QtCore.SIGNAL("stateChanged(int)"), +- self.enable_stem) ++ self.stem = QtWidgets.QCheckBox("Stem", self) ++ self.stem.stateChanged.connect(self.enable_stem) + self.right_col_layout.addWidget(self.stem) + + self.add_line_control(self.right_col_layout) +@@ -76,4 +74,3 @@ class plot_time_form(plot_form): + def update_samp_rate(self): + sr = self.samp_rate_edit.text().toDouble()[0] + self.top_block.gui_snk.set_samp_rate(sr) +- +diff --git a/gr-qtgui/apps/plot_time_raster_base.py b/gr-qtgui/apps/plot_time_raster_base.py +index 856c8c8945..f1d4db8523 100644 +--- a/gr-qtgui/apps/plot_time_raster_base.py ++++ b/gr-qtgui/apps/plot_time_raster_base.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -27,16 +27,18 @@ import os, 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." ++ import sys ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + try: + import scipy + except ImportError: +- print "Error: Scipy required (www.scipy.org)." ++ import sys ++ sys.stderr.write("Error: Scipy required (www.scipy.org).\n") + sys.exit(1) + + try: +@@ -68,7 +70,7 @@ class plot_base(gr.top_block): + self._y_value = 1 + self.gui_y_axis = None + +- self.qapp = QtGui.QApplication(sys.argv) ++ self.qapp = QtWidgets.QApplication(sys.argv) + + def setup(self): + self.skip = blocks.skiphead(self.dsize, self._start) +@@ -103,7 +105,7 @@ class plot_base(gr.top_block): + + # Get Python Qt references + pyQt = self.gui_snk.pyqwidget() +- self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget) ++ self.pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget) + + self._is_setup = True + +diff --git a/gr-qtgui/apps/plot_time_raster_form.py b/gr-qtgui/apps/plot_time_raster_form.py +index 32fbba0765..ffd2975042 100644 +--- a/gr-qtgui/apps/plot_time_raster_form.py ++++ b/gr-qtgui/apps/plot_time_raster_form.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2013 Free Software Foundation, Inc. ++# Copyright 2013,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -24,10 +24,10 @@ import sys, math + from gnuradio import filter + + try: +- from PyQt4 import QtGui, QtCore ++ from PyQt5 import QtWidgets, Qt + import sip + except ImportError: +- print "Error: Program requires PyQt4." ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + try: +@@ -39,39 +39,35 @@ class plot_time_raster_form(plot_form): + def __init__(self, top_block, title='', scale=1): + plot_form.__init__(self, top_block, title, scale) + +- self.right_col_layout = QtGui.QVBoxLayout() +- self.right_col_form = QtGui.QFormLayout() ++ self.right_col_layout = QtWidgets.QVBoxLayout() ++ self.right_col_form = QtWidgets.QFormLayout() + self.right_col_layout.addLayout(self.right_col_form) + self.layout.addLayout(self.right_col_layout, 1,4,1,1) + +- self.auto_scale = QtGui.QCheckBox("Auto Scale", self) ++ self.auto_scale = QtWidgets.QCheckBox("Auto Scale", self) + if(self.top_block._auto_scale): + self.auto_scale.setChecked(self.top_block._auto_scale) +- self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"), +- self.set_auto_scale) ++ self.auto_scale.stateChanged.connect(self.set_auto_scale) + self.right_col_layout.addWidget(self.auto_scale) + +- self.ncols_edit = QtGui.QLineEdit(self) ++ self.ncols_edit = QtWidgets.QLineEdit(self) + self.ncols_edit.setMinimumWidth(100) + self.ncols_edit.setMaximumWidth(100) +- self.ncols_edit.setText(QtCore.QString("%1").arg(top_block._ncols)) ++ self.ncols_edit.setText("{0}".format(top_block._ncols)) + self.right_col_form.addRow("Num. Cols.", self.ncols_edit) +- self.connect(self.ncols_edit, QtCore.SIGNAL("returnPressed()"), +- self.ncols_update) ++ self.ncols_edit.returnPressed.connect(self.ncols_update) + +- self.nrows_edit = QtGui.QLineEdit(self) ++ self.nrows_edit = QtWidgets.QLineEdit(self) + self.nrows_edit.setMinimumWidth(100) + self.nrows_edit.setMaximumWidth(100) +- self.nrows_edit.setText(QtCore.QString("%1").arg(top_block._nrows)) ++ self.nrows_edit.setText("{0}".format(top_block._nrows)) + self.right_col_form.addRow("Num. Rows.", self.nrows_edit) +- self.connect(self.nrows_edit, QtCore.SIGNAL("returnPressed()"), +- self.nrows_update) +- ++ self.nrows_edit.returnPressed.connect(self.nrows_update) + + self.add_raster_control(self.right_col_layout) + + def add_raster_control(self, layout): +- self._line_tabs = QtGui.QTabWidget() ++ self._line_tabs = QtWidgets.QTabWidget() + + self._line_pages = [] + self._line_forms = [] +@@ -82,39 +78,35 @@ class plot_time_raster_form(plot_form): + self._marker_edit = [] + self._alpha_edit = [] + for n in xrange(self.top_block._nsigs): +- self._line_pages.append(QtGui.QDialog()) +- self._line_forms.append(QtGui.QFormLayout(self._line_pages[-1])) ++ self._line_pages.append(QtWidgets.QDialog()) ++ self._line_forms.append(QtWidgets.QFormLayout(self._line_pages[-1])) + + label = self.top_block.gui_snk.line_label(n) +- self._label_edit.append(QtGui.QLineEdit(self)) ++ self._label_edit.append(QtWidgets.QLineEdit(self)) + self._label_edit[-1].setMinimumWidth(125) + self._label_edit[-1].setMaximumWidth(125) +- self._label_edit[-1].setText(QtCore.QString("%1").arg(label)) ++ self._label_edit[-1].setText("{0}".format(label)) + self._line_forms[-1].addRow("Label:", self._label_edit[-1]) +- self.connect(self._label_edit[-1], QtCore.SIGNAL("returnPressed()"), +- self.update_line_label) ++ self._label_edit[-1].returnPressed.connect(self.update_line_label) + + self._qtcolormaps = ["Multi Color", "White Hot", + "Black Hot", "Incandescent"] +- self._color_edit.append(QtGui.QComboBox(self)) ++ self._color_edit.append(QtWidgets.QComboBox(self)) + self._color_edit[-1].addItems(self._qtcolormaps) + self._color_edit[-1].setCurrentIndex(1) + self._line_forms[-1].addRow("Color Map:", self._color_edit[-1]) +- self.connect(self._color_edit[-1], +- QtCore.SIGNAL("currentIndexChanged(int)"), +- self.update_color_map) ++ self._color_edit[-1].currentIndexChanged.connect(self.update_color_map) + +- alpha_val = QtGui.QDoubleValidator(0, 1.0, 2, self) ++ alpha_val = QtWidgets.QDoubleValidator(0, 1.0, 2, self) + alpha_val.setTop(1.0) + alpha = self.top_block.gui_snk.line_alpha(n) +- self._alpha_edit.append(QtGui.QLineEdit(self)) ++ self._alpha_edit.append(QtWidgets.QLineEdit(self)) + self._alpha_edit[-1].setMinimumWidth(50) + self._alpha_edit[-1].setMaximumWidth(100) +- self._alpha_edit[-1].setText(QtCore.QString("%1").arg(alpha)) ++ self._alpha_edit[-1].setText("{0}".format(alpha)) + self._alpha_edit[-1].setValidator(alpha_val) + self._line_forms[-1].addRow("Alpha:", self._alpha_edit[-1]) +- self.connect(self._alpha_edit[-1], QtCore.SIGNAL("returnPressed()"), +- self.update_line_alpha) ++ self._alpha_edit[-1].returnPressed.connect(self.update_line_alpha) + + self._line_tabs.addTab(self._line_pages[-1], "{0}".format(label)) + +@@ -153,5 +145,3 @@ class plot_time_raster_form(plot_form): + + nsamps = int(math.ceil(self.top_block._ncols*(n+1))) + self.top_block.reset(self._start, nsamps) +- +- +diff --git a/gr-qtgui/apps/qt_digital.py b/gr-qtgui/apps/qt_digital.py +index fef4f448b4..fbaeacd462 100755 +--- a/gr-qtgui/apps/qt_digital.py ++++ b/gr-qtgui/apps/qt_digital.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2011 Free Software Foundation, Inc. ++# Copyright 2011,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -29,28 +29,28 @@ 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." ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + try: + import scipy + except ImportError: +- print "Error: Program requires scipy (see: www.scipy.org)." ++ sys.stderr.write("Error: Program requires scipy (see: www.scipy.org).\n") + sys.exit(1) + + try: + from qt_digital_window import Ui_DigitalWindow + except ImportError: +- print "Error: could not find qt_digital_window.py:" +- print "\t\"Please run: pyuic4 qt_digital_window.ui -o qt_digital_window.py\"" ++ sys.stderr.write("Error: could not find qt_digital_window.py:\n") ++ sys.stderr.write("\t\"Please run: pyuic5 qt_digital_window.ui -o qt_digital_window.py\"\n") + sys.exit(1) + +-class dialog_box(QtGui.QMainWindow): ++class dialog_box(QtWidgets.QMainWindow): + def __init__(self, snkTx, snkRx, fg, parent=None): +- QtGui.QWidget.__init__(self, parent) ++ QtWidgets.QWidget.__init__(self, parent) + self.gui = Ui_DigitalWindow() + self.gui.setupUi(self) + +@@ -71,23 +71,13 @@ class dialog_box(QtGui.QMainWindow): + + + # Connect up some signals +- self.connect(self.gui.pauseButton, QtCore.SIGNAL("clicked()"), +- self.pauseFg) +- +- self.connect(self.gui.sampleRateEdit, QtCore.SIGNAL("editingFinished()"), +- self.sampleRateEditText) +- +- self.connect(self.gui.snrEdit, QtCore.SIGNAL("editingFinished()"), +- self.snrEditText) +- self.connect(self.gui.freqEdit, QtCore.SIGNAL("editingFinished()"), +- self.freqEditText) +- self.connect(self.gui.timeEdit, QtCore.SIGNAL("editingFinished()"), +- self.timeEditText) +- +- self.connect(self.gui.gainMuEdit, QtCore.SIGNAL("editingFinished()"), +- self.gainMuEditText) +- self.connect(self.gui.alphaEdit, QtCore.SIGNAL("editingFinished()"), +- self.alphaEditText) ++ self.gui.pauseButton.clicked.connect(self.pauseFg) ++ self.gui.sampleRateEdit.editingFinished.connect(self.sampleRateEditText) ++ self.gui.snrEdit.editingFinished.connect(self.snrEditText) ++ self.gui.freqEdit.editingFinished.connect(self.freqEditText) ++ self.gui.timeEdit.editingFinished.connect(self.timeEditText) ++ self.gui.gainMuEdit.editingFinished.connect(self.gainMuEditText) ++ self.gui.alphaEdit.editingFinished.connect(self.alphaEditText) + + + def pauseFg(self): +@@ -102,7 +92,7 @@ class dialog_box(QtGui.QMainWindow): + # Accessor functions for Gui to manipulate system parameters + def set_sample_rate(self, sr): + ssr = eng_notation.num_to_str(sr) +- self.gui.sampleRateEdit.setText(QtCore.QString("%1").arg(ssr)) ++ self.gui.sampleRateEdit.setText("{0}".format(ssr)) + + def sampleRateEditText(self): + try: +@@ -115,13 +105,13 @@ class dialog_box(QtGui.QMainWindow): + + # Accessor functions for Gui to manipulate channel model + def set_snr(self, snr): +- self.gui.snrEdit.setText(QtCore.QString("%1").arg(snr)) ++ self.gui.snrEdit.setText("{0}".format(snr)) + + def set_frequency(self, fo): +- self.gui.freqEdit.setText(QtCore.QString("%1").arg(fo)) ++ self.gui.freqEdit.setText("{0}".format(fo)) + + def set_time_offset(self, to): +- self.gui.timeEdit.setText(QtCore.QString("%1").arg(to)) ++ self.gui.timeEdit.setText("{0}".format(to)) + + def snrEditText(self): + try: +@@ -147,10 +137,10 @@ class dialog_box(QtGui.QMainWindow): + + # Accessor functions for Gui to manipulate receiver parameters + def set_gain_mu(self, gain): +- self.gui.gainMuEdit.setText(QtCore.QString("%1").arg(gain)) ++ self.gui.gainMuEdit.setText("{0}".format(gain)) + + def set_loop_bw(self, bw): +- self.gui.alphaEdit.setText(QtCore.QString("%1").arg(bw)) ++ self.gui.alphaEdit.setText("{0}".format(bw)) + + def alphaEditText(self): + try: +@@ -171,7 +161,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) + + self._sample_rate = 2000e3 + +@@ -231,10 +221,10 @@ class my_top_block(gr.top_block): + self.connect(self.channel, self.rx_rrc, self.receiver, self.snk_rx) + + pyTxQt = self.snk_tx.pyqwidget() +- pyTx = sip.wrapinstance(pyTxQt, QtGui.QWidget) ++ pyTx = sip.wrapinstance(pyTxQt, QtWidgets.QWidget) + + pyRxQt = self.snk_rx.pyqwidget() +- pyRx = sip.wrapinstance(pyRxQt, QtGui.QWidget) ++ pyRx = sip.wrapinstance(pyRxQt, QtWidgets.QWidget) + + self.main_box = dialog_box(pyTx, pyRx, self); + self.main_box.show() +diff --git a/gr-qtgui/apps/qt_digital_window.py b/gr-qtgui/apps/qt_digital_window.py +index 50dd53a923..90c0f29e09 100644 +--- a/gr-qtgui/apps/qt_digital_window.py ++++ b/gr-qtgui/apps/qt_digital_window.py +@@ -3,159 +3,159 @@ + # Form implementation generated from reading ui file 'qt_digital_window.ui' + # + # Created: Sat May 1 20:14:02 2010 +-# by: PyQt4 UI code generator 4.6.1 ++# by: PyQt5 UI code generator 4.6.1 + # + # WARNING! All changes made in this file will be lost! + +-from PyQt4 import QtCore, QtGui ++from PyQt5 import QtWidgets, Qt + + class Ui_DigitalWindow(object): + def setupUi(self, DigitalWindow): + DigitalWindow.setObjectName("DigitalWindow") + DigitalWindow.resize(1236, 741) +- self.centralwidget = QtGui.QWidget(DigitalWindow) ++ self.centralwidget = QtWidgets.QWidget(DigitalWindow) + self.centralwidget.setObjectName("centralwidget") +- self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget) ++ self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) + self.verticalLayout.setObjectName("verticalLayout") +- self.sinkFrame = QtGui.QFrame(self.centralwidget) +- self.sinkFrame.setMinimumSize(QtCore.QSize(0, 550)) +- self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel) +- self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised) ++ self.sinkFrame = QtWidgets.QFrame(self.centralwidget) ++ self.sinkFrame.setMinimumSize(Qt.QSize(0, 550)) ++ self.sinkFrame.setFrameShape(QtWidgets.QFrame.StyledPanel) ++ self.sinkFrame.setFrameShadow(QtWidgets.QFrame.Raised) + self.sinkFrame.setObjectName("sinkFrame") +- self.horizontalLayout_2 = QtGui.QHBoxLayout(self.sinkFrame) ++ self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.sinkFrame) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") +- self.sinkLayout = QtGui.QHBoxLayout() ++ self.sinkLayout = QtWidgets.QHBoxLayout() + self.sinkLayout.setObjectName("sinkLayout") + self.horizontalLayout_2.addLayout(self.sinkLayout) + self.verticalLayout.addWidget(self.sinkFrame) +- self.horizontalLayout = QtGui.QHBoxLayout() ++ self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") +- self.sysBox = QtGui.QGroupBox(self.centralwidget) +- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) ++ self.sysBox = QtWidgets.QGroupBox(self.centralwidget) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth()) + self.sysBox.setSizePolicy(sizePolicy) +- self.sysBox.setMinimumSize(QtCore.QSize(0, 0)) +- self.sysBox.setMaximumSize(QtCore.QSize(16777215, 120)) +- self.sysBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) ++ self.sysBox.setMinimumSize(Qt.QSize(0, 0)) ++ self.sysBox.setMaximumSize(Qt.QSize(16777215, 120)) ++ self.sysBox.setAlignment(Qt.Qt.AlignLeading|Qt.Qt.AlignLeft|Qt.Qt.AlignTop) + self.sysBox.setObjectName("sysBox") +- self.gridLayout_2 = QtGui.QGridLayout(self.sysBox) ++ self.gridLayout_2 = QtWidgets.QGridLayout(self.sysBox) + self.gridLayout_2.setObjectName("gridLayout_2") +- self.sampleRateEdit = QtGui.QLineEdit(self.sysBox) +- self.sampleRateEdit.setMaximumSize(QtCore.QSize(100, 16777215)) ++ self.sampleRateEdit = QtWidgets.QLineEdit(self.sysBox) ++ self.sampleRateEdit.setMaximumSize(Qt.QSize(100, 16777215)) + self.sampleRateEdit.setObjectName("sampleRateEdit") + self.gridLayout_2.addWidget(self.sampleRateEdit, 0, 3, 1, 1) +- self.sampleRateLabel = QtGui.QLabel(self.sysBox) ++ self.sampleRateLabel = QtWidgets.QLabel(self.sysBox) + self.sampleRateLabel.setObjectName("sampleRateLabel") + self.gridLayout_2.addWidget(self.sampleRateLabel, 0, 2, 1, 1) + self.horizontalLayout.addWidget(self.sysBox) +- self.rxBox = QtGui.QGroupBox(self.centralwidget) +- self.rxBox.setMaximumSize(QtCore.QSize(16777215, 120)) +- self.rxBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) ++ self.rxBox = QtWidgets.QGroupBox(self.centralwidget) ++ self.rxBox.setMaximumSize(Qt.QSize(16777215, 120)) ++ self.rxBox.setAlignment(Qt.Qt.AlignLeading|Qt.Qt.AlignLeft|Qt.Qt.AlignTop) + self.rxBox.setObjectName("rxBox") +- self.gridLayout_3 = QtGui.QGridLayout(self.rxBox) ++ self.gridLayout_3 = QtWidgets.QGridLayout(self.rxBox) + self.gridLayout_3.setObjectName("gridLayout_3") +- self.alphaLabel = QtGui.QLabel(self.rxBox) ++ self.alphaLabel = QtWidgets.QLabel(self.rxBox) + self.alphaLabel.setObjectName("alphaLabel") + self.gridLayout_3.addWidget(self.alphaLabel, 1, 0, 1, 1) +- self.alphaEdit = QtGui.QLineEdit(self.rxBox) +- self.alphaEdit.setMaximumSize(QtCore.QSize(100, 16777215)) ++ self.alphaEdit = QtWidgets.QLineEdit(self.rxBox) ++ self.alphaEdit.setMaximumSize(Qt.QSize(100, 16777215)) + self.alphaEdit.setObjectName("alphaEdit") + self.gridLayout_3.addWidget(self.alphaEdit, 1, 1, 1, 1) +- self.gainMuLabel = QtGui.QLabel(self.rxBox) ++ self.gainMuLabel = QtWidgets.QLabel(self.rxBox) + self.gainMuLabel.setObjectName("gainMuLabel") + self.gridLayout_3.addWidget(self.gainMuLabel, 0, 0, 1, 1) +- self.gainMuEdit = QtGui.QLineEdit(self.rxBox) +- self.gainMuEdit.setMaximumSize(QtCore.QSize(100, 16777215)) ++ self.gainMuEdit = QtWidgets.QLineEdit(self.rxBox) ++ self.gainMuEdit.setMaximumSize(Qt.QSize(100, 16777215)) + self.gainMuEdit.setObjectName("gainMuEdit") + self.gridLayout_3.addWidget(self.gainMuEdit, 0, 1, 1, 1) + self.horizontalLayout.addWidget(self.rxBox) +- self.channelModeBox = QtGui.QGroupBox(self.centralwidget) +- self.channelModeBox.setMaximumSize(QtCore.QSize(16777215, 120)) +- self.channelModeBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) ++ self.channelModeBox = QtWidgets.QGroupBox(self.centralwidget) ++ self.channelModeBox.setMaximumSize(Qt.QSize(16777215, 120)) ++ self.channelModeBox.setAlignment(Qt.Qt.AlignLeading|Qt.Qt.AlignLeft|Qt.Qt.AlignTop) + self.channelModeBox.setObjectName("channelModeBox") +- self.gridLayout = QtGui.QGridLayout(self.channelModeBox) +- self.gridLayout.setSizeConstraint(QtGui.QLayout.SetMinimumSize) ++ self.gridLayout = QtWidgets.QGridLayout(self.channelModeBox) ++ self.gridLayout.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize) + self.gridLayout.setObjectName("gridLayout") +- self.snrLabel = QtGui.QLabel(self.channelModeBox) ++ self.snrLabel = QtWidgets.QLabel(self.channelModeBox) + self.snrLabel.setObjectName("snrLabel") + self.gridLayout.addWidget(self.snrLabel, 0, 1, 1, 1) +- self.snrEdit = QtGui.QLineEdit(self.channelModeBox) +- self.snrEdit.setMaximumSize(QtCore.QSize(100, 16777215)) ++ self.snrEdit = QtWidgets.QLineEdit(self.channelModeBox) ++ self.snrEdit.setMaximumSize(Qt.QSize(100, 16777215)) + self.snrEdit.setObjectName("snrEdit") + self.gridLayout.addWidget(self.snrEdit, 0, 2, 1, 1) +- self.freqLabel = QtGui.QLabel(self.channelModeBox) ++ self.freqLabel = QtWidgets.QLabel(self.channelModeBox) + self.freqLabel.setObjectName("freqLabel") + self.gridLayout.addWidget(self.freqLabel, 1, 1, 1, 1) +- self.freqEdit = QtGui.QLineEdit(self.channelModeBox) +- self.freqEdit.setMaximumSize(QtCore.QSize(100, 16777215)) ++ self.freqEdit = QtWidgets.QLineEdit(self.channelModeBox) ++ self.freqEdit.setMaximumSize(Qt.QSize(100, 16777215)) + self.freqEdit.setObjectName("freqEdit") + self.gridLayout.addWidget(self.freqEdit, 1, 2, 1, 1) +- self.timeLabel = QtGui.QLabel(self.channelModeBox) ++ self.timeLabel = QtWidgets.QLabel(self.channelModeBox) + self.timeLabel.setObjectName("timeLabel") + self.gridLayout.addWidget(self.timeLabel, 2, 1, 1, 1) +- self.timeEdit = QtGui.QLineEdit(self.channelModeBox) +- self.timeEdit.setMaximumSize(QtCore.QSize(100, 16777215)) ++ self.timeEdit = QtWidgets.QLineEdit(self.channelModeBox) ++ self.timeEdit.setMaximumSize(Qt.QSize(100, 16777215)) + self.timeEdit.setObjectName("timeEdit") + self.gridLayout.addWidget(self.timeEdit, 2, 2, 1, 1) + self.horizontalLayout.addWidget(self.channelModeBox) +- spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) ++ spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout.addItem(spacerItem) +- self.verticalLayout_2 = QtGui.QVBoxLayout() ++ self.verticalLayout_2 = QtWidgets.QVBoxLayout() + self.verticalLayout_2.setObjectName("verticalLayout_2") +- spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) ++ spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.verticalLayout_2.addItem(spacerItem1) +- self.pauseButton = QtGui.QPushButton(self.centralwidget) +- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) ++ self.pauseButton = QtWidgets.QPushButton(self.centralwidget) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pauseButton.sizePolicy().hasHeightForWidth()) + self.pauseButton.setSizePolicy(sizePolicy) +- self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215)) ++ self.pauseButton.setMaximumSize(Qt.QSize(80, 16777215)) + self.pauseButton.setObjectName("pauseButton") + self.verticalLayout_2.addWidget(self.pauseButton) +- self.closeButton = QtGui.QPushButton(self.centralwidget) +- self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215)) ++ self.closeButton = QtWidgets.QPushButton(self.centralwidget) ++ self.closeButton.setMaximumSize(Qt.QSize(80, 16777215)) + self.closeButton.setObjectName("closeButton") + self.verticalLayout_2.addWidget(self.closeButton) + self.horizontalLayout.addLayout(self.verticalLayout_2) + self.verticalLayout.addLayout(self.horizontalLayout) + DigitalWindow.setCentralWidget(self.centralwidget) +- self.menubar = QtGui.QMenuBar(DigitalWindow) +- self.menubar.setGeometry(QtCore.QRect(0, 0, 1236, 23)) ++ self.menubar = QtWidgets.QMenuBar(DigitalWindow) ++ self.menubar.setGeometry(Qt.QRect(0, 0, 1236, 23)) + self.menubar.setObjectName("menubar") +- self.menuFile = QtGui.QMenu(self.menubar) ++ self.menuFile = QtWidgets.QMenu(self.menubar) + self.menuFile.setObjectName("menuFile") + DigitalWindow.setMenuBar(self.menubar) +- self.statusbar = QtGui.QStatusBar(DigitalWindow) ++ self.statusbar = QtWidgets.QStatusBar(DigitalWindow) + self.statusbar.setObjectName("statusbar") + DigitalWindow.setStatusBar(self.statusbar) +- self.actionExit = QtGui.QAction(DigitalWindow) ++ self.actionExit = QtWidgets.QAction(DigitalWindow) + self.actionExit.setObjectName("actionExit") + self.menuFile.addAction(self.actionExit) + self.menubar.addAction(self.menuFile.menuAction()) + + self.retranslateUi(DigitalWindow) +- QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), DigitalWindow.close) +- QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL("triggered()"), DigitalWindow.close) +- QtCore.QMetaObject.connectSlotsByName(DigitalWindow) ++ Qt.QObject.connect(self.closeButton, Qt.SIGNAL("clicked()"), DigitalWindow.close) ++ Qt.QObject.connect(self.actionExit, Qt.SIGNAL("triggered()"), DigitalWindow.close) ++ Qt.QMetaObject.connectSlotsByName(DigitalWindow) + DigitalWindow.setTabOrder(self.snrEdit, self.freqEdit) + DigitalWindow.setTabOrder(self.freqEdit, self.timeEdit) + + def retranslateUi(self, DigitalWindow): +- DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) +- self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8)) +- self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8)) +- self.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8)) +- self.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", None, QtGui.QApplication.UnicodeUTF8)) +- self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8)) +- self.channelModeBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtGui.QApplication.UnicodeUTF8)) +- self.snrLabel.setText(QtGui.QApplication.translate("DigitalWindow", "SNR (dB)", None, QtGui.QApplication.UnicodeUTF8)) +- self.freqLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Frequency Offset (Hz)", None, QtGui.QApplication.UnicodeUTF8)) +- self.timeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Timing Offset", None, QtGui.QApplication.UnicodeUTF8)) +- self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8)) +- self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8)) +- self.menuFile.setTitle(QtGui.QApplication.translate("DigitalWindow", "&File", None, QtGui.QApplication.UnicodeUTF8)) +- self.actionExit.setText(QtGui.QApplication.translate("DigitalWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8)) ++ DigitalWindow.setWindowTitle(QtWidgets.QApplication.translate("DigitalWindow", "MainWindow", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.sysBox.setTitle(QtWidgets.QApplication.translate("DigitalWindow", "System Parameters", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.sampleRateLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.rxBox.setTitle(QtWidgets.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.alphaLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "Alpha", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.gainMuLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "Gain mu", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.channelModeBox.setTitle(QtWidgets.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.snrLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "SNR (dB)", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.freqLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "Frequency Offset (Hz)", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.timeLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "Timing Offset", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.pauseButton.setText(QtWidgets.QApplication.translate("DigitalWindow", "Pause", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.closeButton.setText(QtWidgets.QApplication.translate("DigitalWindow", "Close", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.menuFile.setTitle(QtWidgets.QApplication.translate("DigitalWindow", "&File", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.actionExit.setText(QtWidgets.QApplication.translate("DigitalWindow", "E&xit", None, QtWidgets.QApplication.UnicodeUTF8)) + +diff --git a/gr-qtgui/apps/uhd_display.py b/gr-qtgui/apps/uhd_display.py +index 0e0c8a177d..e564e58c76 100755 +--- a/gr-qtgui/apps/uhd_display.py ++++ b/gr-qtgui/apps/uhd_display.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # +-# Copyright 2009,2011 Free Software Foundation, Inc. ++# Copyright 2009,2011,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -31,10 +31,10 @@ 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." ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + try: +@@ -50,10 +50,10 @@ except ImportError: + # //////////////////////////////////////////////////////////////////// + + +-class main_window(QtGui.QMainWindow): ++class main_window(QtWidgets.QMainWindow): + def __init__(self, snk, fg, parent=None): + +- QtGui.QWidget.__init__(self, parent) ++ QtWidgets.QWidget.__init__(self, parent) + self.gui = Ui_MainWindow() + self.gui.setupUi(self) + +@@ -62,28 +62,20 @@ class main_window(QtGui.QMainWindow): + # Add the qtsnk widgets to the layout box + self.gui.sinkLayout.addWidget(snk) + +- self.gui.dcGainEdit.setText(QtCore.QString("%1").arg(0.001)) ++ self.gui.dcGainEdit.setText("{0}".format(0.001)) + + # Connect up some signals +- self.connect(self.gui.pauseButton, QtCore.SIGNAL("clicked()"), +- self.pauseFg) +- self.connect(self.gui.frequencyEdit, QtCore.SIGNAL("editingFinished()"), +- self.frequencyEditText) +- self.connect(self.gui.gainEdit, QtCore.SIGNAL("editingFinished()"), +- self.gainEditText) +- self.connect(self.gui.bandwidthEdit, QtCore.SIGNAL("editingFinished()"), +- self.bandwidthEditText) +- self.connect(self.gui.amplifierEdit, QtCore.SIGNAL("editingFinished()"), +- self.amplifierEditText) +- +- self.connect(self.gui.actionSaveData, QtCore.SIGNAL("activated()"), +- self.saveData) +- self.gui.actionSaveData.setShortcut(QtGui.QKeySequence.Save) +- +- self.connect(self.gui.dcGainEdit, QtCore.SIGNAL("editingFinished()"), +- self.dcGainEditText) +- self.connect(self.gui.dcCancelCheckBox, QtCore.SIGNAL("clicked(bool)"), +- self.dcCancelClicked) ++ self.gui.pauseButton.clicked.connect(self.pauseFg) ++ self.gui.frequencyEdit.editingFinished.connect(self.frequencyEditText) ++ self.gui.gainEdit.editingFinished.connect(self.gainEditText) ++ self.gui.bandwidthEdit.editingFinished.connect(self.bandwidthEditText) ++ self.gui.amplifierEdit.editingFinished.connect(self.amplifierEditText) ++ ++ self.gui.actionSaveData.activated.connect(self.saveData) ++ self.gui.actionSaveData.setShortcut(QtWidgets.QKeySequence.Save) ++ ++ self.gui.dcGainEdit.editingFinished.connect(self.dcGainEditText) ++ self.gui.dcCancelCheckBox.clicked.connect(self.dcCancelClicked) + + def pauseFg(self): + if(self.gui.pauseButton.text() == "Pause"): +@@ -99,20 +91,20 @@ class main_window(QtGui.QMainWindow): + def set_frequency(self, freq): + self.freq = freq + sfreq = eng_notation.num_to_str(self.freq) +- self.gui.frequencyEdit.setText(QtCore.QString("%1").arg(sfreq)) ++ self.gui.frequencyEdit.setText("{0}".format(sfreq)) + + def set_gain(self, gain): + self.gain = gain +- self.gui.gainEdit.setText(QtCore.QString("%1").arg(self.gain)) ++ self.gui.gainEdit.setText("{0}".format(self.gain)) + + def set_bandwidth(self, bw): + self.bw = bw + sbw = eng_notation.num_to_str(self.bw) +- self.gui.bandwidthEdit.setText(QtCore.QString("%1").arg(sbw)) ++ self.gui.bandwidthEdit.setText("{0}".format(sbw)) + + def set_amplifier(self, amp): + self.amp = amp +- self.gui.amplifierEdit.setText(QtCore.QString("%1").arg(self.amp)) ++ self.gui.amplifierEdit.setText("{0}".format(self.amp)) + + + # Functions called when signals are triggered in the GUI +@@ -149,7 +141,7 @@ class main_window(QtGui.QMainWindow): + pass + + def saveData(self): +- fileName = QtGui.QFileDialog.getSaveFileName(self, "Save data to file", "."); ++ fileName = QtWidgets.QFileDialog.getSaveFileName(self, "Save data to file", "."); + if(len(fileName)): + self.fg.save_to_file(str(fileName)) + +@@ -170,7 +162,7 @@ class my_top_block(gr.top_block): + self.options = options + self.show_debug_info = True + +- self.qapp = QtGui.QApplication(sys.argv) ++ self.qapp = QtWidgets.QApplication(sys.argv) + + self.u = uhd.usrp_source(device_addr=options.address, stream_args=uhd.stream_args('fc32')) + +@@ -218,8 +210,8 @@ class my_top_block(gr.top_block): + + # Get the reference pointer to the SpectrumDisplayForm QWidget + # Wrap the pointer as a PyQt SIP object +- # This can now be manipulated as a PyQt4.QtGui.QWidget +- self.pysink = sip.wrapinstance(self.snk.pyqwidget(), QtGui.QWidget) ++ # This can now be manipulated as a PyQt5.QtWidgets.QWidget ++ self.pysink = sip.wrapinstance(self.snk.pyqwidget(), QtWidgets.QWidget) + + self.main_win = main_window(self.pysink, self) + +diff --git a/gr-qtgui/apps/usrp_display_qtgui.py b/gr-qtgui/apps/usrp_display_qtgui.py +index 4c9de3a53c..89591af5fc 100644 +--- a/gr-qtgui/apps/usrp_display_qtgui.py ++++ b/gr-qtgui/apps/usrp_display_qtgui.py +@@ -3,189 +3,189 @@ + # Form implementation generated from reading ui file 'usrp_display_qtgui.ui' + # + # Created: Thu Jul 16 22:06:24 2009 +-# by: PyQt4 UI code generator 4.4.3 ++# by: PyQt5 UI code generator 4.4.3 + # + # WARNING! All changes made in this file will be lost! + +-from PyQt4 import QtCore, QtGui ++from PyQt5 import Qt, QtWidgets + + class Ui_MainWindow(object): + def setupUi(self, MainWindow): + MainWindow.setObjectName("MainWindow") + MainWindow.resize(820, 774) +- self.centralwidget = QtGui.QWidget(MainWindow) ++ self.centralwidget = QtWidgets.QWidget(MainWindow) + self.centralwidget.setObjectName("centralwidget") +- self.gridLayout_2 = QtGui.QGridLayout(self.centralwidget) ++ self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget) + self.gridLayout_2.setObjectName("gridLayout_2") +- self.horizontalLayout_2 = QtGui.QHBoxLayout() ++ self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setObjectName("horizontalLayout_2") +- self.groupBox = QtGui.QGroupBox(self.centralwidget) +- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) ++ self.groupBox = QtWidgets.QGroupBox(self.centralwidget) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth()) + self.groupBox.setSizePolicy(sizePolicy) +- self.groupBox.setMinimumSize(QtCore.QSize(240, 150)) +- self.groupBox.setMaximumSize(QtCore.QSize(240, 16777215)) ++ self.groupBox.setMinimumSize(Qt.QSize(240, 150)) ++ self.groupBox.setMaximumSize(Qt.QSize(240, 16777215)) + self.groupBox.setObjectName("groupBox") +- self.formLayoutWidget = QtGui.QWidget(self.groupBox) +- self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 221, 124)) ++ self.formLayoutWidget = QtWidgets.QWidget(self.groupBox) ++ self.formLayoutWidget.setGeometry(Qt.QRect(10, 20, 221, 124)) + self.formLayoutWidget.setObjectName("formLayoutWidget") +- self.formLayout = QtGui.QFormLayout(self.formLayoutWidget) ++ self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget) + self.formLayout.setObjectName("formLayout") +- self.frequencyLabel = QtGui.QLabel(self.formLayoutWidget) ++ self.frequencyLabel = QtWidgets.QLabel(self.formLayoutWidget) + self.frequencyLabel.setObjectName("frequencyLabel") +- self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.frequencyLabel) +- self.gainLabel = QtGui.QLabel(self.formLayoutWidget) ++ self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.frequencyLabel) ++ self.gainLabel = QtWidgets.QLabel(self.formLayoutWidget) + self.gainLabel.setObjectName("gainLabel") +- self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.gainLabel) +- self.bandwidthLabel = QtGui.QLabel(self.formLayoutWidget) ++ self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.gainLabel) ++ self.bandwidthLabel = QtWidgets.QLabel(self.formLayoutWidget) + self.bandwidthLabel.setObjectName("bandwidthLabel") +- self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.bandwidthLabel) +- self.frequencyEdit = QtGui.QLineEdit(self.formLayoutWidget) +- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) ++ self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.bandwidthLabel) ++ self.frequencyEdit = QtWidgets.QLineEdit(self.formLayoutWidget) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.frequencyEdit.sizePolicy().hasHeightForWidth()) + self.frequencyEdit.setSizePolicy(sizePolicy) +- self.frequencyEdit.setMinimumSize(QtCore.QSize(120, 26)) ++ self.frequencyEdit.setMinimumSize(Qt.QSize(120, 26)) + self.frequencyEdit.setObjectName("frequencyEdit") +- self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.frequencyEdit) +- self.gainEdit = QtGui.QLineEdit(self.formLayoutWidget) +- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) ++ self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.frequencyEdit) ++ self.gainEdit = QtWidgets.QLineEdit(self.formLayoutWidget) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.gainEdit.sizePolicy().hasHeightForWidth()) + self.gainEdit.setSizePolicy(sizePolicy) +- self.gainEdit.setMinimumSize(QtCore.QSize(120, 26)) ++ self.gainEdit.setMinimumSize(Qt.QSize(120, 26)) + self.gainEdit.setObjectName("gainEdit") +- self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.gainEdit) +- self.bandwidthEdit = QtGui.QLineEdit(self.formLayoutWidget) +- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) ++ self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.gainEdit) ++ self.bandwidthEdit = QtWidgets.QLineEdit(self.formLayoutWidget) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.bandwidthEdit.sizePolicy().hasHeightForWidth()) + self.bandwidthEdit.setSizePolicy(sizePolicy) +- self.bandwidthEdit.setMinimumSize(QtCore.QSize(120, 26)) ++ self.bandwidthEdit.setMinimumSize(Qt.QSize(120, 26)) + self.bandwidthEdit.setObjectName("bandwidthEdit") +- self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.bandwidthEdit) +- self.amplifierLabel = QtGui.QLabel(self.formLayoutWidget) ++ self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.bandwidthEdit) ++ self.amplifierLabel = QtWidgets.QLabel(self.formLayoutWidget) + self.amplifierLabel.setObjectName("amplifierLabel") +- self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.amplifierLabel) +- self.amplifierEdit = QtGui.QLineEdit(self.formLayoutWidget) +- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) ++ self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.amplifierLabel) ++ self.amplifierEdit = QtWidgets.QLineEdit(self.formLayoutWidget) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.amplifierEdit.sizePolicy().hasHeightForWidth()) + self.amplifierEdit.setSizePolicy(sizePolicy) +- self.amplifierEdit.setMinimumSize(QtCore.QSize(120, 26)) ++ self.amplifierEdit.setMinimumSize(Qt.QSize(120, 26)) + self.amplifierEdit.setObjectName("amplifierEdit") +- self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.amplifierEdit) ++ self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.amplifierEdit) + self.horizontalLayout_2.addWidget(self.groupBox) +- self.frame_2 = QtGui.QFrame(self.centralwidget) +- self.frame_2.setMinimumSize(QtCore.QSize(200, 0)) +- self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel) +- self.frame_2.setFrameShadow(QtGui.QFrame.Raised) ++ self.frame_2 = QtWidgets.QFrame(self.centralwidget) ++ self.frame_2.setMinimumSize(Qt.QSize(200, 0)) ++ self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) ++ self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) + self.frame_2.setObjectName("frame_2") +- self.verticalLayoutWidget = QtGui.QWidget(self.frame_2) +- self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, -1, 191, 151)) ++ self.verticalLayoutWidget = QtWidgets.QWidget(self.frame_2) ++ self.verticalLayoutWidget.setGeometry(Qt.QRect(10, -1, 191, 151)) + self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") +- self.verticalLayout_3 = QtGui.QVBoxLayout(self.verticalLayoutWidget) ++ self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) + self.verticalLayout_3.setObjectName("verticalLayout_3") +- self.dcCancelCheckBox = QtGui.QCheckBox(self.verticalLayoutWidget) ++ self.dcCancelCheckBox = QtWidgets.QCheckBox(self.verticalLayoutWidget) + self.dcCancelCheckBox.setObjectName("dcCancelCheckBox") + self.verticalLayout_3.addWidget(self.dcCancelCheckBox) +- self.horizontalLayout = QtGui.QHBoxLayout() ++ self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") +- self.dcGainLabel = QtGui.QLabel(self.verticalLayoutWidget) ++ self.dcGainLabel = QtWidgets.QLabel(self.verticalLayoutWidget) + self.dcGainLabel.setObjectName("dcGainLabel") + self.horizontalLayout.addWidget(self.dcGainLabel) +- self.dcGainEdit = QtGui.QLineEdit(self.verticalLayoutWidget) ++ self.dcGainEdit = QtWidgets.QLineEdit(self.verticalLayoutWidget) + self.dcGainEdit.setObjectName("dcGainEdit") + self.horizontalLayout.addWidget(self.dcGainEdit) + self.verticalLayout_3.addLayout(self.horizontalLayout) +- spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) ++ spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.verticalLayout_3.addItem(spacerItem) + self.horizontalLayout_2.addWidget(self.frame_2) +- spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) ++ spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_2.addItem(spacerItem1) +- self.verticalLayout = QtGui.QVBoxLayout() ++ self.verticalLayout = QtWidgets.QVBoxLayout() + self.verticalLayout.setObjectName("verticalLayout") +- spacerItem2 = QtGui.QSpacerItem(20, 80, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) ++ spacerItem2 = QtWidgets.QSpacerItem(20, 80, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + self.verticalLayout.addItem(spacerItem2) +- self.pauseButton = QtGui.QPushButton(self.centralwidget) +- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) ++ self.pauseButton = QtWidgets.QPushButton(self.centralwidget) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pauseButton.sizePolicy().hasHeightForWidth()) + self.pauseButton.setSizePolicy(sizePolicy) + self.pauseButton.setObjectName("pauseButton") + self.verticalLayout.addWidget(self.pauseButton) +- self.closeButton = QtGui.QPushButton(self.centralwidget) +- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) ++ self.closeButton = QtWidgets.QPushButton(self.centralwidget) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.closeButton.sizePolicy().hasHeightForWidth()) + self.closeButton.setSizePolicy(sizePolicy) +- self.closeButton.setMinimumSize(QtCore.QSize(75, 0)) ++ self.closeButton.setMinimumSize(Qt.QSize(75, 0)) + self.closeButton.setObjectName("closeButton") + self.verticalLayout.addWidget(self.closeButton) + self.horizontalLayout_2.addLayout(self.verticalLayout) + self.gridLayout_2.addLayout(self.horizontalLayout_2, 1, 0, 1, 1) +- self.verticalLayout_2 = QtGui.QVBoxLayout() ++ self.verticalLayout_2 = QtWidgets.QVBoxLayout() + self.verticalLayout_2.setObjectName("verticalLayout_2") +- self.frame = QtGui.QFrame(self.centralwidget) +- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) ++ self.frame = QtWidgets.QFrame(self.centralwidget) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth()) + self.frame.setSizePolicy(sizePolicy) +- self.frame.setMinimumSize(QtCore.QSize(800, 550)) +- self.frame.setFrameShape(QtGui.QFrame.StyledPanel) +- self.frame.setFrameShadow(QtGui.QFrame.Raised) ++ self.frame.setMinimumSize(Qt.QSize(800, 550)) ++ self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) ++ self.frame.setFrameShadow(QtWidgets.QFrame.Raised) + self.frame.setObjectName("frame") +- self.gridLayout = QtGui.QGridLayout(self.frame) ++ self.gridLayout = QtWidgets.QGridLayout(self.frame) + self.gridLayout.setObjectName("gridLayout") +- self.sinkLayout = QtGui.QHBoxLayout() ++ self.sinkLayout = QtWidgets.QHBoxLayout() + self.sinkLayout.setObjectName("sinkLayout") + self.gridLayout.addLayout(self.sinkLayout, 0, 0, 1, 1) + self.verticalLayout_2.addWidget(self.frame) + self.gridLayout_2.addLayout(self.verticalLayout_2, 0, 0, 1, 1) + MainWindow.setCentralWidget(self.centralwidget) +- self.menubar = QtGui.QMenuBar(MainWindow) +- self.menubar.setGeometry(QtCore.QRect(0, 0, 820, 24)) ++ self.menubar = QtWidgets.QMenuBar(MainWindow) ++ self.menubar.setGeometry(Qt.QRect(0, 0, 820, 24)) + self.menubar.setObjectName("menubar") +- self.menuFile = QtGui.QMenu(self.menubar) ++ self.menuFile = QtWidgets.QMenu(self.menubar) + self.menuFile.setObjectName("menuFile") + MainWindow.setMenuBar(self.menubar) +- self.statusbar = QtGui.QStatusBar(MainWindow) ++ self.statusbar = QtWidgets.QStatusBar(MainWindow) + self.statusbar.setObjectName("statusbar") + MainWindow.setStatusBar(self.statusbar) +- self.actionExit = QtGui.QAction(MainWindow) ++ self.actionExit = QtWidgets.QAction(MainWindow) + self.actionExit.setObjectName("actionExit") +- self.actionSaveData = QtGui.QAction(MainWindow) ++ self.actionSaveData = QtWidgets.QAction(MainWindow) + self.actionSaveData.setObjectName("actionSaveData") + self.menuFile.addAction(self.actionSaveData) + self.menuFile.addAction(self.actionExit) + self.menubar.addAction(self.menuFile.menuAction()) + + self.retranslateUi(MainWindow) +- QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), MainWindow.close) +- QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL("triggered()"), MainWindow.close) +- QtCore.QMetaObject.connectSlotsByName(MainWindow) ++ Qt.QObject.connect(self.closeButton, Qt.SIGNAL("clicked()"), MainWindow.close) ++ Qt.QObject.connect(self.actionExit, Qt.SIGNAL("triggered()"), MainWindow.close) ++ Qt.QMetaObject.connectSlotsByName(MainWindow) + + def retranslateUi(self, MainWindow): +- MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "USRP Display", None, QtGui.QApplication.UnicodeUTF8)) +- self.groupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8)) +- self.frequencyLabel.setText(QtGui.QApplication.translate("MainWindow", "Frequency (Hz)", None, QtGui.QApplication.UnicodeUTF8)) +- self.gainLabel.setText(QtGui.QApplication.translate("MainWindow", "RF Gain", None, QtGui.QApplication.UnicodeUTF8)) +- self.bandwidthLabel.setText(QtGui.QApplication.translate("MainWindow", "Bandwidth", None, QtGui.QApplication.UnicodeUTF8)) +- self.amplifierLabel.setText(QtGui.QApplication.translate("MainWindow", "Amplifier", None, QtGui.QApplication.UnicodeUTF8)) +- self.dcCancelCheckBox.setText(QtGui.QApplication.translate("MainWindow", "Cancel DC", None, QtGui.QApplication.UnicodeUTF8)) +- self.dcGainLabel.setText(QtGui.QApplication.translate("MainWindow", "DC Canceller Gain", None, QtGui.QApplication.UnicodeUTF8)) +- self.pauseButton.setText(QtGui.QApplication.translate("MainWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8)) +- self.closeButton.setText(QtGui.QApplication.translate("MainWindow", "Close", None, QtGui.QApplication.UnicodeUTF8)) +- self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8)) +- self.actionExit.setText(QtGui.QApplication.translate("MainWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8)) +- self.actionSaveData.setText(QtGui.QApplication.translate("MainWindow", "&Save Data", None, QtGui.QApplication.UnicodeUTF8)) ++ MainWindow.setWindowTitle(QtWidgets.QApplication.translate("MainWindow", "USRP Display", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.groupBox.setTitle(QtWidgets.QApplication.translate("MainWindow", "Receiver Parameters", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.frequencyLabel.setText(QtWidgets.QApplication.translate("MainWindow", "Frequency (Hz)", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.gainLabel.setText(QtWidgets.QApplication.translate("MainWindow", "RF Gain", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.bandwidthLabel.setText(QtWidgets.QApplication.translate("MainWindow", "Bandwidth", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.amplifierLabel.setText(QtWidgets.QApplication.translate("MainWindow", "Amplifier", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.dcCancelCheckBox.setText(QtWidgets.QApplication.translate("MainWindow", "Cancel DC", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.dcGainLabel.setText(QtWidgets.QApplication.translate("MainWindow", "DC Canceller Gain", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.pauseButton.setText(QtWidgets.QApplication.translate("MainWindow", "Pause", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.closeButton.setText(QtWidgets.QApplication.translate("MainWindow", "Close", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.menuFile.setTitle(QtWidgets.QApplication.translate("MainWindow", "&File", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.actionExit.setText(QtWidgets.QApplication.translate("MainWindow", "E&xit", None, QtWidgets.QApplication.UnicodeUTF8)) ++ self.actionSaveData.setText(QtWidgets.QApplication.translate("MainWindow", "&Save Data", None, QtWidgets.QApplication.UnicodeUTF8)) + +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0020-qtgui-pc-add-qt-qwt-details.patch gnuradio-3.7.11/debian/patches/qt5-maint-0020-qtgui-pc-add-qt-qwt-details.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0020-qtgui-pc-add-qt-qwt-details.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0020-qtgui-pc-add-qt-qwt-details.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,38 @@ +From 7d82d3968ce7a84b3a1ead70be55aff980b0e1df Mon Sep 17 00:00:00 2001 +From: "A. Maitland Bottoms" +Date: Sun, 25 Feb 2018 13:27:01 -0500 +Subject: [PATCH 20/22] qtgui pc add qt qwt details + +--- + gr-qtgui/CMakeLists.txt | 2 ++ + gr-qtgui/gnuradio-qtgui.pc.in | 4 ++-- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt +index c06e516917..f1e89c97b2 100644 +--- a/gr-qtgui/CMakeLists.txt ++++ b/gr-qtgui/CMakeLists.txt +@@ -131,6 +131,8 @@ endif(ENABLE_PYTHON) + ######################################################################## + # Create Pkg Config File + ######################################################################## ++set( PC_LIBS "${QWT_LIBRARIES} ${QT_LIBRARIES}" ) ++string (REPLACE ";" " " PC_LIBS_STR "${PC_LIBS}") + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-qtgui.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-qtgui.pc +diff --git a/gr-qtgui/gnuradio-qtgui.pc.in b/gr-qtgui/gnuradio-qtgui.pc.in +index 8f0dcd53f7..2489caf214 100644 +--- a/gr-qtgui/gnuradio-qtgui.pc.in ++++ b/gr-qtgui/gnuradio-qtgui.pc.in +@@ -7,5 +7,5 @@ Name: gnuradio-qtgui + Description: GNU Radio blocks for QT GUI + Requires: gnuradio-runtime + Version: @LIBVER@ +-Libs: -L${libdir} -lgnuradio-qtgui +-Cflags: -I${includedir} ++Libs: -L${libdir} -lgnuradio-qtgui ${PC_LIBS_STR} ++Cflags: -I${includedir} -I${QWT_INCLUDE_DIRS} -I${QT_HEADERS_DIR} +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0021-gnuradio-runtime-ctrlport-qt5.patch gnuradio-3.7.11/debian/patches/qt5-maint-0021-gnuradio-runtime-ctrlport-qt5.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0021-gnuradio-runtime-ctrlport-qt5.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0021-gnuradio-runtime-ctrlport-qt5.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,61 @@ +From b12439f3f600b9d0be03189e8a82310d9ceabdd6 Mon Sep 17 00:00:00 2001 +From: "A. Maitland Bottoms" +Date: Sun, 25 Feb 2018 13:27:38 -0500 +Subject: [PATCH 21/22] gnuradio runtime ctrlport qt5 + +--- + gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py | 4 ++-- + gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor | 4 ++-- + gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py b/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py +index c5bfd0a8cb..6d78565b3b 100644 +--- a/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py ++++ b/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py +@@ -28,10 +28,10 @@ import sys, time, struct + + try: + from gnuradio import qtgui +- from PyQt4 import QtGui, QtCore ++ from PyQt5 import QtGui, QtCore + import sip + except ImportError: +- print "Error: Program requires PyQt4 and gr-qtgui." ++ sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n") + sys.exit(1) + + class GrDataPlotParent(gr.top_block, QtGui.QWidget): +diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor b/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor +index c866776355..ce53c60c0e 100644 +--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor ++++ b/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor +@@ -20,8 +20,8 @@ + # Boston, MA 02110-1301, USA. + # + +-from PyQt4 import QtCore,Qt +-import PyQt4.QtGui as QtGui ++from PyQt5 import QtCore,Qt ++import PyQt5.QtGui as QtGui + import os, sys, time, struct + + from gnuradio import gr, ctrlport +diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx +index 15a2153a0f..a9e43bff41 100644 +--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx ++++ b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx +@@ -46,8 +46,8 @@ except ImportError: + "Please check that they are installed and try again." + sys.exit(1) + +-from PyQt4 import QtCore,Qt +-import PyQt4.QtGui as QtGui ++from PyQt5 import QtCore,Qt ++import PyQt5.QtGui as QtGui + import itertools + + from gnuradio import gr, ctrlport +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0022-gr-uhd-qt5.patch gnuradio-3.7.11/debian/patches/qt5-maint-0022-gr-uhd-qt5.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0022-gr-uhd-qt5.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0022-gr-uhd-qt5.patch 2018-02-25 20:33:51.000000000 +0000 @@ -0,0 +1,79 @@ +From 18f5edf38cc6a24836f943d6976d913a4f35cab3 Mon Sep 17 00:00:00 2001 +From: "A. Maitland Bottoms" +Date: Sun, 25 Feb 2018 13:28:05 -0500 +Subject: [PATCH 22/22] gr uhd qt5 + +--- + gr-uhd/apps/uhd_fft | 8 ++++---- + gr-uhd/apps/uhd_siggen_gui | 10 +++++----- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/gr-uhd/apps/uhd_fft b/gr-uhd/apps/uhd_fft +index a04c310be3..15b68b1699 100755 +--- a/gr-uhd/apps/uhd_fft ++++ b/gr-uhd/apps/uhd_fft +@@ -40,7 +40,7 @@ import sip + import threading + import time + from distutils.version import StrictVersion +-from PyQt4 import Qt ++from PyQt5 import Qt + from gnuradio import eng_notation + from gnuradio import eng_arg + from gnuradio import gr +@@ -477,8 +477,8 @@ def main(): + Go, go, go! + """ + args = setup_argparser().parse_args() +- if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): +- Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui','style','raster')) ++ #if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): ++ # Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui','style','raster')) + qapp = Qt.QApplication(sys.argv) + tb = uhd_fft(args) + tb.start() +@@ -486,7 +486,7 @@ def main(): + def quitting(): + tb.stop() + tb.wait() +- qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting) ++ qapp.aboutToQuit.connect(quitting) + qapp.exec_() + tb = None #to clean up Qt widgets + +diff --git a/gr-uhd/apps/uhd_siggen_gui b/gr-uhd/apps/uhd_siggen_gui +index 9a57aa65ae..571cff98a3 100755 +--- a/gr-uhd/apps/uhd_siggen_gui ++++ b/gr-uhd/apps/uhd_siggen_gui +@@ -38,8 +38,8 @@ import sys + import threading + import time + from distutils.version import StrictVersion +-from PyQt4 import Qt +-from PyQt4.QtCore import pyqtSlot ++from PyQt5 import Qt ++from PyQt5.QtCore import pyqtSlot + from gnuradio import analog + from gnuradio import eng_notation + from gnuradio import gr +@@ -448,14 +448,14 @@ def main(): + """ Go, go, go! """ + parser = setup_parser() + args = parser.parse_args() +- if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): +- Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui', 'style', 'raster')) ++ #if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): ++ # Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui', 'style', 'raster')) + qapp = Qt.QApplication(sys.argv) + siggen_gui = uhd_siggen_gui(args) + siggen_gui.show() + def quitting(): + siggen_gui.stop() +- qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting) ++ qapp.aboutToQuit.connect(quitting) + qapp.exec_() + siggen_gui = None #to clean up Qt widgets + +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-maint-0023-gr-qtgui-util.patch gnuradio-3.7.11/debian/patches/qt5-maint-0023-gr-qtgui-util.patch --- gnuradio-3.7.11/debian/patches/qt5-maint-0023-gr-qtgui-util.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-maint-0023-gr-qtgui-util.patch 2018-02-27 02:37:00.000000000 +0000 @@ -0,0 +1,39 @@ +From af4ab4e0f745ef3d61effc71824b09d0c15d8b86 Mon Sep 17 00:00:00 2001 +From: "A. Maitland Bottoms" +Date: Mon, 26 Feb 2018 21:36:29 -0500 +Subject: [PATCH] gr qtgui util + +--- + gr-qtgui/python/qtgui/util.py | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/gr-qtgui/python/qtgui/util.py b/gr-qtgui/python/qtgui/util.py +index fffc482615..ca9f6f5035 100644 +--- a/gr-qtgui/python/qtgui/util.py ++++ b/gr-qtgui/python/qtgui/util.py +@@ -1,7 +1,7 @@ + #!/usr/bin/env python + # -*- coding: utf-8 -*- + # +-# Copyright 2016 Free Software Foundation, Inc. ++# Copyright 2016,2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -21,7 +21,7 @@ + # Boston, MA 02110-1301, USA. + # + +-from PyQt4 import Qt, QtCore, QtGui ++from PyQt5 import Qt, QtCore, QtGui, QtWidgets + from gnuradio import gr + + def check_set_qss(): +@@ -32,4 +32,3 @@ def check_set_qss(): + app.setStyleSheet(open(qssfile).read()) + except: + print "WARNING: bad QSS file, %s"%(qssfile) +- +-- +2.11.0 + diff -Nru gnuradio-3.7.11/debian/patches/qt5-refactor-qt5-onto-maint-branch gnuradio-3.7.11/debian/patches/qt5-refactor-qt5-onto-maint-branch --- gnuradio-3.7.11/debian/patches/qt5-refactor-qt5-onto-maint-branch 2018-02-11 00:06:32.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qt5-refactor-qt5-onto-maint-branch 1970-01-01 00:00:00.000000000 +0000 @@ -1,7135 +0,0 @@ -From b697cc7111d654dcfcf7c3dfba93de35ec329f31 Mon Sep 17 00:00:00 2001 -From: "A. Maitland Bottoms" -Date: Sun, 26 Nov 2017 18:57:28 -0500 -Subject: [PATCH 26/27] qt5 refactor qt5 onto maint branch - ---- - cmake/Modules/FindQwt.cmake | 15 +- - gr-qtgui/CMakeLists.txt | 67 +- - gr-qtgui/apps/CMakeLists.txt | 2 - - gr-qtgui/apps/gr_constellation_plot | 31 +- - gr-qtgui/apps/gr_psd_plot_b | 15 +- - gr-qtgui/apps/gr_psd_plot_c | 15 +- - gr-qtgui/apps/gr_psd_plot_f | 15 +- - gr-qtgui/apps/gr_psd_plot_i | 15 +- - gr-qtgui/apps/gr_psd_plot_s | 15 +- - gr-qtgui/apps/gr_spectrogram_plot | 57 +- - gr-qtgui/apps/gr_spectrogram_plot_b | 15 +- - gr-qtgui/apps/gr_spectrogram_plot_c | 15 +- - gr-qtgui/apps/gr_spectrogram_plot_f | 15 +- - gr-qtgui/apps/gr_spectrogram_plot_i | 15 +- - gr-qtgui/apps/gr_spectrogram_plot_s | 15 +- - gr-qtgui/apps/gr_time_plot_b | 11 +- - gr-qtgui/apps/gr_time_plot_c | 11 +- - gr-qtgui/apps/gr_time_plot_f | 11 +- - gr-qtgui/apps/gr_time_plot_i | 11 +- - gr-qtgui/apps/gr_time_plot_s | 11 +- - gr-qtgui/apps/gr_time_raster_b | 13 +- - gr-qtgui/apps/gr_time_raster_f | 13 +- - gr-qtgui/apps/plot_base.py | 2 - - gr-qtgui/apps/plot_psd_base.py | 40 +- - gr-qtgui/apps/plot_spectrogram_base.py | 43 +- - gr-qtgui/apps/plot_time_base.py | 33 +- - gr-qtgui/apps/plot_time_raster_base.py | 41 +- - gr-qtgui/apps/qt_digital.py | 6 +- - gr-qtgui/apps/qt_digital_window.py | 114 +- - gr-qtgui/apps/usrp_display_qtgui.py | 150 +- - gr-qtgui/examples/CMakeLists.txt | 2 - - gr-qtgui/examples/c++/CMakeLists.txt | 8 +- - gr-qtgui/examples/pyqt_const_c.py | 62 +- - gr-qtgui/examples/pyqt_example_c.py | 59 +- - gr-qtgui/examples/pyqt_example_f.py | 59 +- - gr-qtgui/examples/pyqt_freq_c.py | 59 +- - gr-qtgui/examples/pyqt_freq_f.py | 60 +- - gr-qtgui/examples/pyqt_histogram_f.py | 73 +- - gr-qtgui/examples/pyqt_time_c.py | 66 +- - gr-qtgui/examples/pyqt_time_f.py | 67 +- - gr-qtgui/examples/pyqt_time_raster_b.py | 19 +- - gr-qtgui/examples/pyqt_time_raster_f.py | 19 +- - gr-qtgui/examples/pyqt_waterfall_c.py | 59 +- - gr-qtgui/examples/pyqt_waterfall_f.py | 62 +- - gr-qtgui/examples/qtgui_tags_viewing.grc | 2399 +++++++++++++++----- - gr-qtgui/grc/CMakeLists.txt | 27 +- - gr-qtgui/grc/qtgui_ber_sink_b.xml | 2 +- - gr-qtgui/grc/qtgui_check_box.xml | 2 +- - gr-qtgui/grc/qtgui_chooser.xml | 4 +- - gr-qtgui/grc/qtgui_const_sink_x.xml | 2 +- - gr-qtgui/grc/qtgui_edit_box_msg.xml | 2 +- - gr-qtgui/grc/qtgui_entry.xml | 2 +- - gr-qtgui/grc/qtgui_freq_sink_x.xml | 2 +- - gr-qtgui/grc/qtgui_histogram_sink_x.xml | 2 +- - gr-qtgui/grc/qtgui_label.xml | 2 +- - gr-qtgui/grc/qtgui_number_sink.xml | 2 +- - gr-qtgui/grc/qtgui_push_button.xml | 2 +- - gr-qtgui/grc/qtgui_sink_x.xml | 2 +- - gr-qtgui/grc/qtgui_tab_widget.xml | 2 +- - gr-qtgui/grc/qtgui_time_raster_x.xml | 2 +- - gr-qtgui/grc/qtgui_time_sink_x.xml | 2 +- - gr-qtgui/grc/qtgui_vector_sink_f.xml | 2 +- - gr-qtgui/grc/qtgui_waterfall_sink_x.xml | 2 +- - gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt | 1 - - gr-qtgui/include/gnuradio/qtgui/form_menus.h | 5 + - gr-qtgui/lib/CMakeLists.txt | 17 +- - gr-qtgui/lib/SpectrumGUIClass.cc | 1 - - gr-qtgui/lib/const_sink_c_impl.cc | 2 +- - gr-qtgui/lib/edit_box_msg_impl.cc | 4 - - gr-qtgui/lib/freq_sink_c_impl.cc | 2 +- - gr-qtgui/lib/freq_sink_f_impl.cc | 2 +- - gr-qtgui/lib/histogram_sink_f_impl.cc | 2 +- - gr-qtgui/lib/sink_c_impl.cc | 2 +- - gr-qtgui/lib/sink_f_impl.cc | 2 +- - gr-qtgui/lib/time_raster_sink_b_impl.cc | 2 +- - gr-qtgui/lib/time_raster_sink_f_impl.cc | 2 +- - gr-qtgui/lib/time_sink_c_impl.cc | 2 +- - gr-qtgui/lib/time_sink_f_impl.cc | 2 +- - gr-qtgui/lib/vector_sink_f_impl.cc | 2 +- - gr-qtgui/lib/waterfall_sink_c_impl.cc | 2 +- - gr-qtgui/lib/waterfall_sink_f_impl.cc | 2 +- - gr-qtgui/python/qtgui/CMakeLists.txt | 14 +- - .../python/qtgui/{range.py => range.py.cmakein} | 28 +- - gr-qtgui/python/qtgui/{util.py => util.py.cmakein} | 5 +- - gr-qtgui/swig/CMakeLists.txt | 2 - - grc/blocks/options.xml | 2 +- - grc/core/generator/flow_graph.tmpl | 4 +- - 87 files changed, 2663 insertions(+), 1414 deletions(-) - rename gr-qtgui/python/qtgui/{range.py => range.py.cmakein} (93%) - mode change 100755 => 100644 - rename gr-qtgui/python/qtgui/{util.py => util.py.cmakein} (94%) - -diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake -index da8bbe9049..a16896aa43 100644 ---- a/cmake/Modules/FindQwt.cmake -+++ b/cmake/Modules/FindQwt.cmake -@@ -5,17 +5,24 @@ - # qwt_global.h holds a string with the QWT version; - # test to make sure it's at least 5.2 - -+if (${DESIRED_QT_VERSION} MATCHES 5) -+ set(QWT_QT_VERSION qt5) -+else() -+ set(QWT_QT_VERSION qt4) -+endif() -+ - find_path(QWT_INCLUDE_DIRS - NAMES qwt_global.h - HINTS - ${CMAKE_INSTALL_PREFIX}/include/qwt - ${CMAKE_PREFIX_PATH}/include/qwt - PATHS -- /usr/local/include/qwt-qt4 -+ /usr/local/include/qwt-${QWT_QT_VERSION} - /usr/local/include/qwt - /usr/include/qwt6 -- /usr/include/qwt-qt4 -+ /usr/include/qwt-${QWT_QT_VERSION} - /usr/include/qwt -+ /usr/include/${QWT_QT_VERSION}/qwt - /usr/include/qwt5 - /opt/local/include/qwt - /sw/include/qwt -@@ -23,11 +30,11 @@ find_path(QWT_INCLUDE_DIRS - ) - - find_library (QWT_LIBRARIES -- NAMES qwt6 qwt6-qt4 qwt qwt-qt4 qwt5 qwtd5 -+ NAMES qwt6-${QWT_QT_VERSION} qwt-${QWT_QT_VERSION} qwt6 qwt qwt5 qwtd5 - HINTS - ${CMAKE_INSTALL_PREFIX}/lib - ${CMAKE_INSTALL_PREFIX}/lib64 -- ${CMAKE_PREFIX_PATH}/lib -+ ${CMAKE_PREFIX_PATH}/lib - PATHS - /usr/local/lib - /usr/lib -diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt -index 9306a3eb50..57e9f75032 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,43 +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) -- --######################################################################## --# Setup CPack components --######################################################################## --include(GrPackage) --CPACK_SET(CPACK_COMPONENT_GROUP_QTGUI_DESCRIPTION "GNU Radio QtGUI Blocks") -- --CPACK_COMPONENT("qtgui_runtime" -- GROUP "QtGUI" -- DISPLAY_NAME "Runtime" -- DESCRIPTION "Runtime" -- DEPENDS "runtime_runtime" --) -- --CPACK_COMPONENT("qtgui_devel" -- GROUP "QtGUI" -- DISPLAY_NAME "Development" -- DESCRIPTION "C++ headers, package config, import libraries" -- DEPENDS "runtime_devel" --) -- --CPACK_COMPONENT("qtgui_python" -- GROUP "QtGUI" -- DISPLAY_NAME "Python" -- DESCRIPTION "Python modules for runtime; GRC xml files" -- DEPENDS "runtime_python;qtgui_runtime" --) -- --CPACK_COMPONENT("qtgui_swig" -- GROUP "QtGUI" -- DISPLAY_NAME "SWIG" -- DESCRIPTION "SWIG development .i files" -- DEPENDS "runtime_swig;qtgui_python;qtgui_devel" --) -- - ######################################################################## - # Add subdirectories - ######################################################################## -@@ -131,7 +107,6 @@ configure_file( - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-qtgui.pc - DESTINATION ${GR_LIBRARY_DIR}/pkgconfig -- COMPONENT "qtgui_devel" - ) - - ######################################################################## -@@ -140,7 +115,6 @@ install( - install( - FILES ${CMAKE_CURRENT_SOURCE_DIR}/gr-qtgui.conf - DESTINATION ${GR_PREFSDIR} -- COMPONENT "qtgui" - ) - - -@@ -154,7 +128,6 @@ install( - themes/alt.qss - themes/projector.qss - DESTINATION ${GR_THEMES_DIR} -- COMPONENT "qtgui" - ) - - endif(ENABLE_GR_QTGUI) -diff --git a/gr-qtgui/apps/CMakeLists.txt b/gr-qtgui/apps/CMakeLists.txt -index 3c64cb6e0a..6a8e6c51aa 100644 ---- a/gr-qtgui/apps/CMakeLists.txt -+++ b/gr-qtgui/apps/CMakeLists.txt -@@ -33,7 +33,6 @@ GR_PYTHON_INSTALL( - plot_time_form.py - plot_time_raster_form.py - DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui -- COMPONENT "qtgui_python" - ) - - GR_PYTHON_INSTALL( -@@ -58,5 +57,4 @@ GR_PYTHON_INSTALL( - gr_spectrogram_plot - gr_constellation_plot - DESTINATION ${GR_RUNTIME_DIR} -- COMPONENT "qtgui_python" - ) -diff --git a/gr-qtgui/apps/gr_constellation_plot b/gr-qtgui/apps/gr_constellation_plot -index 10f6954fb8..469908b7d4 100755 ---- a/gr-qtgui/apps/gr_constellation_plot -+++ b/gr-qtgui/apps/gr_constellation_plot -@@ -22,8 +22,8 @@ - - from gnuradio import gr - from gnuradio import blocks --from gnuradio.eng_option import eng_option --from optparse import OptionParser -+from gnuradio.eng_arg import eng_float, intx -+from argparse import ArgumentParser - import os, sys - - try: -@@ -143,32 +143,27 @@ class my_top_block(gr.top_block): - - def main(): - description = "Plots the constellations of a list of files." -- parser = OptionParser(option_class=eng_option, description=description, -+ parser = ArgumentParser(description=description, - conflict_handler="resolve") -- parser.add_option("-N", "--nsamples", type="int", default=1000000, -- help="Set the number of samples to display [default=%default]") -- parser.add_option("-S", "--start", type="int", default=0, -- help="Starting sample number [default=%default]") -- (options, args) = parser.parse_args() -+ parser.add_argument("-N", "--nsamples", type=int, default=1000000, -+ help="Set the number of samples to display [default=%(default)r]") -+ parser.add_argument("-S", "--start", type=int, default=0, -+ help="Starting sample number [default=%(default)r]") -+ parser.add_argument("files", nargs="+", metavar='FILE') -+ args = parser.parse_args() - -- if(len(args) < 1): -- parser.print_help() -- sys.exit(0) -- -- filelist = list(args) -- -- nsamples = options.nsamples -+ filelist = args.files -+ nsamples = args.nsamples - - # Find the smallest number of samples in all files and use that as - # a maximum value possible. - filesizes = [] - for f in filelist: - if(os.path.exists(f)): -- filesizes.append(os.path.getsize(f) / gr.sizeof_gr_complex) -+ filesizes.append(os.path.getsize(f) // gr.sizeof_gr_complex) - max_nsamples = min(filesizes) - -- tb = my_top_block(filelist, -- options.start, nsamples, max_nsamples); -+ tb = my_top_block(filelist, args.start, nsamples, max_nsamples); - - main_box = plot_constellation_form(tb, 'GNU Radio Constellation Plot', 10000.0) - for n in xrange(tb._nsigs): -diff --git a/gr-qtgui/apps/gr_psd_plot_b b/gr-qtgui/apps/gr_psd_plot_b -index a5a2e3f21e..10ce7e2256 100755 ---- a/gr-qtgui/apps/gr_psd_plot_b -+++ b/gr-qtgui/apps/gr_psd_plot_b -@@ -54,16 +54,15 @@ class psd_plot_b(plot_base.plot_base): - - def main(): - description = "Plots the PSDs of a list of files. Files are a binary list of bytes." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = psd_plot_b(filelist, -- options.center_frequency, options.sample_rate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average) -+ tb = psd_plot_b(args.files, -+ args.center_frequency, args.sample_rate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average) - - main_box = plot_base.plot_psd_form(tb, 'GNU Radio PSD Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_psd_plot_c b/gr-qtgui/apps/gr_psd_plot_c -index e8b83c33f5..afc024ee53 100755 ---- a/gr-qtgui/apps/gr_psd_plot_c -+++ b/gr-qtgui/apps/gr_psd_plot_c -@@ -55,16 +55,15 @@ class psd_plot_c(plot_base.plot_base): - - def main(): - description = "Plots the PSDs of a list of files. Files are a binary list of complex floats." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = psd_plot_c(filelist, -- options.center_frequency, options.sample_rate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average) -+ tb = psd_plot_c(args.files, -+ args.center_frequency, args.sample_rate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average) - - main_box = plot_base.plot_psd_form(tb, 'GNU Radio PSD Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_psd_plot_f b/gr-qtgui/apps/gr_psd_plot_f -index 8ad5a283bc..b1f0f0f34f 100755 ---- a/gr-qtgui/apps/gr_psd_plot_f -+++ b/gr-qtgui/apps/gr_psd_plot_f -@@ -55,16 +55,15 @@ class psd_plot_f(plot_base.plot_base): - - def main(): - description = "Plots the PSDs of a list of files. Files are a binary list of floats." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = psd_plot_f(filelist, -- options.center_frequency, options.sample_rate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average) -+ tb = psd_plot_f(args.files, -+ args.center_frequency, args.sample_rate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average) - - main_box = plot_base.plot_psd_form(tb, 'GNU Radio PSD Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_psd_plot_i b/gr-qtgui/apps/gr_psd_plot_i -index fda69cfbca..b52e9afb00 100755 ---- a/gr-qtgui/apps/gr_psd_plot_i -+++ b/gr-qtgui/apps/gr_psd_plot_i -@@ -54,16 +54,15 @@ class psd_plot_i(plot_base.plot_base): - - def main(): - description = "Plots the PSDs of a list of files. Files are a binary list of integers." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = psd_plot_i(filelist, -- options.center_frequency, options.sample_rate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average) -+ tb = psd_plot_i(args.files, -+ args.center_frequency, args.sample_rate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average) - - main_box = plot_base.plot_psd_form(tb, 'GNU Radio PSD Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_psd_plot_s b/gr-qtgui/apps/gr_psd_plot_s -index 02fe777dda..d62a59fd2f 100755 ---- a/gr-qtgui/apps/gr_psd_plot_s -+++ b/gr-qtgui/apps/gr_psd_plot_s -@@ -54,16 +54,15 @@ class psd_plot_s(plot_base.plot_base): - - def main(): - description = "Plots the PSDs of a list of files. Files are a binary list of shorts." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = psd_plot_s(filelist, -- options.center_frequency, options.sample_rate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average) -+ tb = psd_plot_s(args.files, -+ args.center_frequency, args.sample_rate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average) - - main_box = plot_base.plot_psd_form(tb, 'GNU Radio PSD Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_spectrogram_plot b/gr-qtgui/apps/gr_spectrogram_plot -index 6fb25651ac..31131078b6 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot -+++ b/gr-qtgui/apps/gr_spectrogram_plot -@@ -142,55 +142,54 @@ def read_header(filelist): - def main(): - description = 'Plots the spectrogram (waterfall) of a file with detached header.' - description += ' Assumes header is .hdr' -- (options, args) = plot_base.setup_options(description) -- filelist = list(args) -+ args = plot_base.setup_options(description) - # Attempt to read the header information -- info = read_header(filelist) -+ info = read_header(args.files) - # If no header, quit - if not info: - sys.stderr.write('Header not found\n') - sys.exit(1) - -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - srate = info["rx_rate"] - - # Dispatch the proper function - # Complex Types - if(info["cplx"] == True): - if( info["type"] == "float" ): -- tb = spectrogram_plot_c(filelist, -- options.center_frequency,srate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average); -+ tb = spectrogram_plot_c(args.files, -+ args.center_frequency,srate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average); - else: - sys.stderr.write("Complex File Type " + info["type"]+ " not supported.\n") - # Real Types - else: - if( info["type"] == "bytes" ): -- tb = spectrogram_plot_b(filelist, -- options.center_frequency,srate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average); -+ tb = spectrogram_plot_b(args.files, -+ args.center_frequency,srate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average); - elif( info["type"] == "int" ): -- tb = spectrogram_plot_i(filelist, -- options.center_frequency,srate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average); -+ tb = spectrogram_plot_i(args.files, -+ args.center_frequency,srate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average); - elif( info["type"] == "float" ): -- tb = spectrogram_plot_f(filelist, -- options.center_frequency,srate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average); -+ tb = spectrogram_plot_f(args.files, -+ args.center_frequency,srate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average); - elif( info["type"] == "short" ): -- tb = spectrogram_plot_s(filelist, -- options.center_frequency,srate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average); -+ tb = spectrogram_plot_s(args.files, -+ args.center_frequency,srate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average); - else: - sys.stderr.write("Real File Type " + info["type"] + " not supported\n") - main_box = plot_base.plot_spectrogram_form(tb, 'GNU Radio Spectrogram Plot') -diff --git a/gr-qtgui/apps/gr_spectrogram_plot_b b/gr-qtgui/apps/gr_spectrogram_plot_b -index 917fc4e9e9..bb3fb0deff 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot_b -+++ b/gr-qtgui/apps/gr_spectrogram_plot_b -@@ -54,16 +54,15 @@ class spectrogram_plot_b(plot_base.plot_base): - - def main(): - description = "Plots the spectrogram (waterfall) of a list of files. Files are a binary list of chars." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = spectrogram_plot_b(filelist, -- options.center_frequency, options.sample_rate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average); -+ tb = spectrogram_plot_b(args.files, -+ args.center_frequency, args.sample_rate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average); - - main_box = plot_base.plot_spectrogram_form(tb, 'GNU Radio Time Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_spectrogram_plot_c b/gr-qtgui/apps/gr_spectrogram_plot_c -index e6d7455920..822ffbdd8f 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot_c -+++ b/gr-qtgui/apps/gr_spectrogram_plot_c -@@ -55,16 +55,15 @@ class spectrogram_plot_c(plot_base.plot_base): - - def main(): - description = "Plots the spectrogram (waterfall) of a list of files. Files are a binary list of complex floats." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = spectrogram_plot_c(filelist, -- options.center_frequency, options.sample_rate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average); -+ tb = spectrogram_plot_c(args.files, -+ args.center_frequency, args.sample_rate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average); - - main_box = plot_base.plot_spectrogram_form(tb, 'GNU Radio Spectrogram Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_spectrogram_plot_f b/gr-qtgui/apps/gr_spectrogram_plot_f -index 91eb48b5e5..114bb6d378 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot_f -+++ b/gr-qtgui/apps/gr_spectrogram_plot_f -@@ -55,16 +55,15 @@ class spectrogram_plot_f(plot_base.plot_base): - - def main(): - description = "Plots the spectrogram (waterfall) of a list of files. Files are a binary list of floats." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = spectrogram_plot_f(filelist, -- options.center_frequency, options.sample_rate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average); -+ tb = spectrogram_plot_f(args.files, -+ args.center_frequency, args.sample_rate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average); - - main_box = plot_base.plot_spectrogram_form(tb, 'GNU Radio Time Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_spectrogram_plot_i b/gr-qtgui/apps/gr_spectrogram_plot_i -index 4e66585811..4c09042104 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot_i -+++ b/gr-qtgui/apps/gr_spectrogram_plot_i -@@ -54,16 +54,15 @@ class spectrogram_plot_i(plot_base.plot_base): - - def main(): - description = "Plots the spectrogram (waterfall) of a list of files. Files are a binary list of ints." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = spectrogram_plot_i(filelist, -- options.center_frequency, options.sample_rate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average); -+ tb = spectrogram_plot_i(args.files, -+ args.center_frequency, args.sample_rate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average); - - main_box = plot_base.plot_spectrogram_form(tb, 'GNU Radio Time Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_spectrogram_plot_s b/gr-qtgui/apps/gr_spectrogram_plot_s -index 014663f20f..2fb19b956e 100755 ---- a/gr-qtgui/apps/gr_spectrogram_plot_s -+++ b/gr-qtgui/apps/gr_spectrogram_plot_s -@@ -54,16 +54,15 @@ class spectrogram_plot_s(plot_base.plot_base): - - def main(): - description = "Plots the spectrogram (waterfall) of a list of files. Files are a binary list of shorts." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = spectrogram_plot_s(filelist, -- options.center_frequency, options.sample_rate, -- options.psd_size, -- options.start, options.nsamples, max_nsamples, -- options.average); -+ tb = spectrogram_plot_s(args.files, -+ args.center_frequency, args.sample_rate, -+ args.psd_size, -+ args.start, args.nsamples, max_nsamples, -+ args.average); - - main_box = plot_base.plot_spectrogram_form(tb, 'GNU Radio Time Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_time_plot_b b/gr-qtgui/apps/gr_time_plot_b -index 4a5ef3e8a8..ff94fd3f84 100755 ---- a/gr-qtgui/apps/gr_time_plot_b -+++ b/gr-qtgui/apps/gr_time_plot_b -@@ -52,14 +52,13 @@ class plot_time_b(plot_base.plot_base): - - def main(): - description = "Plots a list of files on a scope plot. Files are a binary list of chars." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = plot_time_b(filelist, options.sample_rate, -- options.start, options.nsamples, max_nsamples, -- not options.no_auto_scale) -+ tb = plot_time_b(args.files, args.sample_rate, -+ args.start, args.nsamples, max_nsamples, -+ not args.no_auto_scale) - - main_box = plot_base.plot_time_form(tb, 'GNU Radio Time Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_time_plot_c b/gr-qtgui/apps/gr_time_plot_c -index 307cf9b534..db914a49b4 100755 ---- a/gr-qtgui/apps/gr_time_plot_c -+++ b/gr-qtgui/apps/gr_time_plot_c -@@ -54,14 +54,13 @@ class plot_time_c(plot_base.plot_base): - - def main(): - description = "Plots a list of files on a scope plot. Files are a binary list of complex floats." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = plot_time_c(filelist, options.sample_rate, -- options.start, options.nsamples, max_nsamples, -- not options.no_auto_scale) -+ tb = plot_time_c(args.files, args.sample_rate, -+ args.start, args.nsamples, max_nsamples, -+ not args.no_auto_scale) - - main_box = plot_base.plot_time_form(tb, 'GNU Radio Time Plot', 10000.0) - main_box.show() -diff --git a/gr-qtgui/apps/gr_time_plot_f b/gr-qtgui/apps/gr_time_plot_f -index 95d3a8a46e..354ccc6e08 100755 ---- a/gr-qtgui/apps/gr_time_plot_f -+++ b/gr-qtgui/apps/gr_time_plot_f -@@ -53,14 +53,13 @@ class plot_time_f(plot_base.plot_base): - - def main(): - description = "Plots a list of files on a scope plot. Files are a binary list of floats." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = plot_time_f(filelist, options.sample_rate, -- options.start, options.nsamples, max_nsamples, -- not options.no_auto_scale) -+ tb = plot_time_f(args.files, args.sample_rate, -+ args.start, args.nsamples, max_nsamples, -+ not args.no_auto_scale) - - main_box = plot_base.plot_time_form(tb, 'GNU Radio Time Plot', 10000.0) - main_box.show() -diff --git a/gr-qtgui/apps/gr_time_plot_i b/gr-qtgui/apps/gr_time_plot_i -index 1d70098ee3..34af6efe6f 100755 ---- a/gr-qtgui/apps/gr_time_plot_i -+++ b/gr-qtgui/apps/gr_time_plot_i -@@ -52,14 +52,13 @@ class plot_time_i(plot_base.plot_base): - - def main(): - description = "Plots a list of files on a scope plot. Files are a binary list of integers." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = plot_time_i(filelist, options.sample_rate, -- options.start, options.nsamples, max_nsamples, -- not options.no_auto_scale) -+ tb = plot_time_i(args.files, args.sample_rate, -+ args.start, args.nsamples, max_nsamples, -+ not args.no_auto_scale) - - main_box = plot_base.plot_time_form(tb, 'GNU Radio Time Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_time_plot_s b/gr-qtgui/apps/gr_time_plot_s -index 50643e0ae2..0702362659 100755 ---- a/gr-qtgui/apps/gr_time_plot_s -+++ b/gr-qtgui/apps/gr_time_plot_s -@@ -52,14 +52,13 @@ class plot_time_s(plot_base.plot_base): - - def main(): - description = "Plots a list of files on a scope plot. Files are a binary list of shorts." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = plot_time_s(filelist, options.sample_rate, -- options.start, options.nsamples, max_nsamples, -- not options.no_auto_scale) -+ tb = plot_time_s(args.files, args.sample_rate, -+ args.start, args.nsamples, max_nsamples, -+ not args.no_auto_scale) - - main_box = plot_base.plot_time_form(tb, 'GNU Radio Time Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_time_raster_b b/gr-qtgui/apps/gr_time_raster_b -index 370008a2ab..be1d8adbe6 100755 ---- a/gr-qtgui/apps/gr_time_raster_b -+++ b/gr-qtgui/apps/gr_time_raster_b -@@ -56,15 +56,14 @@ class plot_time_raster_b(plot_base.plot_base): - - def main(): - description = "Plots a list of files on a scope plot. Files are a binary list of chars." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = plot_time_raster_b(filelist, options.sample_rate, -- options.start, options.nsamples, max_nsamples, -- options.nrows, options.ncols, -- not options.no_auto_scale) -+ tb = plot_time_raster_b(args.files, args.sample_rate, -+ args.start, args.nsamples, max_nsamples, -+ args.nrows, args.ncols, -+ not args.no_auto_scale) - - main_box = plot_base.plot_time_raster_form(tb, 'GNU Radio Time Plot') - main_box.show() -diff --git a/gr-qtgui/apps/gr_time_raster_f b/gr-qtgui/apps/gr_time_raster_f -index 7512348e86..768313601b 100755 ---- a/gr-qtgui/apps/gr_time_raster_f -+++ b/gr-qtgui/apps/gr_time_raster_f -@@ -56,15 +56,14 @@ class plot_time_raster_f(plot_base.plot_base): - - def main(): - description = "Plots a list of files on a scope plot. Files are a binary list of floats." -- (options, args) = plot_base.setup_options(description) -+ args = plot_base.setup_options(description) - -- filelist = list(args) -- max_nsamples = plot_base.find_max_nsamples(filelist) -+ max_nsamples = plot_base.find_max_nsamples(args.files) - -- tb = plot_time_raster_f(filelist, options.sample_rate, -- options.start, options.nsamples, max_nsamples, -- options.nrows, options.ncols, -- not options.no_auto_scale) -+ tb = plot_time_raster_f(args.files, args.sample_rate, -+ args.start, args.nsamples, max_nsamples, -+ args.nrows, args.ncols, -+ not args.no_auto_scale) - - main_box = plot_base.plot_time_raster_form(tb, 'GNU Radio Time Plot', 10000.0) - main_box.show() -diff --git a/gr-qtgui/apps/plot_base.py b/gr-qtgui/apps/plot_base.py -index 4b57291e06..306c06ff47 100644 ---- a/gr-qtgui/apps/plot_base.py -+++ b/gr-qtgui/apps/plot_base.py -@@ -21,8 +21,6 @@ - # - - from gnuradio import gr, blocks --from gnuradio.eng_option import eng_option --from optparse import OptionParser - import os, sys - - os.environ['GR_CONF_CONTROLPORT_ON'] = 'False' -diff --git a/gr-qtgui/apps/plot_psd_base.py b/gr-qtgui/apps/plot_psd_base.py -index 0990e439bb..c0ba7c9fba 100644 ---- a/gr-qtgui/apps/plot_psd_base.py -+++ b/gr-qtgui/apps/plot_psd_base.py -@@ -21,8 +21,8 @@ - # - - from gnuradio import gr, blocks --from gnuradio.eng_option import eng_option --from optparse import OptionParser -+from gnuradio.eng_arg import eng_float, intx -+from argparse import ArgumentParser - import os, sys - - try: -@@ -141,23 +141,21 @@ class plot_base(gr.top_block): - self.start() - - def setup_options(desc): -- parser = OptionParser(option_class=eng_option, description=desc, -- conflict_handler="resolve") -- parser.add_option("-N", "--nsamples", type="int", default=1000000, -+ parser = ArgumentParser(description=desc, conflict_handler="resolve") -+ parser.add_argument("-N", "--nsamples", type=int, default=1000000, - help="Set the number of samples to display [default=prints entire file]") -- parser.add_option("-S", "--start", type="int", default=0, -- help="Starting sample number [default=%default]") -- parser.add_option("-L", "--psd-size", type="int", default=2048, -- help="Set the FFT size of the PSD [default=%default]") -- parser.add_option("-f", "--center-frequency", type="eng_float", default=0.0, -- help="Set the center frequency of the signal [default=%default]") -- parser.add_option("-r", "--sample-rate", type="eng_float", default=1.0, -- help="Set the sample rate of the signal [default=%default]") -- parser.add_option("-a", "--average", type="float", default=1.0, -- help="Set amount of averaging (smaller=more averaging) [default=%default]") -- (options, args) = parser.parse_args() -- -- if(len(args) < 1): -- parser.print_help() -- sys.exit(0) -- return (options,args) -+ parser.add_argument("-S", "--start", type=int, default=0, -+ help="Starting sample number [default=%(default)r]") -+ parser.add_argument("-L", "--psd-size", type=int, default=2048, -+ help="Set the FFT size of the PSD [default=%(default)r]") -+ parser.add_argument("-f", "--center-frequency", type=eng_float, default=0.0, -+ help="Set the center frequency of the signal [default=%(default)r]") -+ parser.add_argument("-r", "--sample-rate", type=eng_float, default=1.0, -+ help="Set the sample rate of the signal [default=%(default)r]") -+ parser.add_argument("-a", "--average", type=float, default=1.0, -+ help="Set amount of averaging (smaller=more averaging) [default=%(default)r]") -+ parser.add_argument("files", nargs='+', metavar='FILE', -+ help="Complex samples") -+ args = parser.parse_args() -+ -+ return args -diff --git a/gr-qtgui/apps/plot_spectrogram_base.py b/gr-qtgui/apps/plot_spectrogram_base.py -index 3fae5c252a..5021be8f82 100644 ---- a/gr-qtgui/apps/plot_spectrogram_base.py -+++ b/gr-qtgui/apps/plot_spectrogram_base.py -@@ -21,8 +21,8 @@ - # - - from gnuradio import gr, blocks --from gnuradio.eng_option import eng_option --from optparse import OptionParser -+from gnuradio.eng_arg import eng_float, intx -+from argparse import ArgumentParser - import os, sys - - try: -@@ -146,25 +146,22 @@ class plot_base(gr.top_block): - self.start() - - def setup_options(desc): -- parser = OptionParser(option_class=eng_option, description=desc, -- conflict_handler="resolve") -- parser.add_option("-N", "--nsamples", type="int", default=1000000, -- help="Set the number of samples to display [default=%default]") -- parser.add_option("-S", "--start", type="int", default=0, -- help="Starting sample number [default=%default]") -- parser.add_option("-L", "--psd-size", type="int", default=2048, -- help="Set the FFT size of the PSD [default=%default]") -- parser.add_option("-f", "--center-frequency", type="eng_float", default=0.0, -- help="Set the center frequency of the signal [default=%default]") -- parser.add_option("-r", "--sample-rate", type="eng_float", default=1.0, -- help="Set the sample rate of the signal [default=%default]") -- parser.add_option("-a", "--average", type="float", default=1.0, -- help="Set amount of averaging (smaller=more averaging) [default=%default]") -- (options, args) = parser.parse_args() -- -- if(len(args) < 1): -- parser.print_help() -- sys.exit(0) -- -- return (options, args) -+ parser = ArgumentParser(description=desc, conflict_handler="resolve") -+ parser.add_argument("-N", "--nsamples", type=int, default=1000000, -+ help="Set the number of samples to display [default=%(default)r]") -+ parser.add_argument("-S", "--start", type=int, default=0, -+ help="Starting sample number [default=%(default)r]") -+ parser.add_argument("-L", "--psd-size", type=int, default=2048, -+ help="Set the FFT size of the PSD [default=%(default)r]") -+ parser.add_argument("-f", "--center-frequency", type=eng_float, default=0.0, -+ help="Set the center frequency of the signal [default=%(default)r]") -+ parser.add_argument("-r", "--sample-rate", type=eng_float, default=1.0, -+ help="Set the sample rate of the signal [default=%(default)r]") -+ parser.add_argument("-a", "--average", type=float, default=1.0, -+ help="Set amount of averaging (smaller=more averaging) [default=%(default)r]") -+ parser.add_argument('files', nargs='+', metavar='FILE', -+ help="File with complex samples") -+ args = parser.parse_args() -+ -+ return args - -diff --git a/gr-qtgui/apps/plot_time_base.py b/gr-qtgui/apps/plot_time_base.py -index 31c96ab804..03b0338b0e 100644 ---- a/gr-qtgui/apps/plot_time_base.py -+++ b/gr-qtgui/apps/plot_time_base.py -@@ -21,8 +21,8 @@ - # - - from gnuradio import gr, blocks --from gnuradio.eng_option import eng_option --from optparse import OptionParser -+from gnuradio.eng_arg import eng_float, intx -+from argparse import ArgumentParser - import os, sys - - try: -@@ -166,19 +166,18 @@ class plot_base(gr.top_block): - self._auto_scale = False - - def setup_options(desc): -- parser = OptionParser(option_class=eng_option, description=desc, -- conflict_handler="resolve") -- parser.add_option("-N", "--nsamples", type="int", default=1000000, -- help="Set the number of samples to display [default=%default]") -- parser.add_option("-S", "--start", type="int", default=0, -- help="Starting sample number [default=%default]") -- parser.add_option("-r", "--sample-rate", type="eng_float", default=1.0, -- help="Set the sample rate of the signal [default=%default]") -- parser.add_option("", "--no-auto-scale", action="store_true", default=False, -- help="Do not auto-scale the plot [default=%default]") -- (options,args) = parser.parse_args() -- if(len(args) < 1): -- parser.print_help() -- sys.exit(0) -- return (options,args) -+ parser = ArgumentParser(description=desc, conflict_handler="resolve") -+ parser.add_argument("-N", "--nsamples", type=int, default=1000000, -+ help="Set the number of samples to display [default=%(default)r]") -+ parser.add_argument("-S", "--start", type=int, default=0, -+ help="Starting sample number [default=%(default)r]") -+ parser.add_argument("-r", "--sample-rate", type=eng_float, default=1.0, -+ help="Set the sample rate of the signal [default=%(default)r]") -+ parser.add_argument("--no-auto-scale", action="store_true", -+ help="Do not auto-scale the plot [default=%(default)r]") -+ parser.add_argument("files", nargs='+', metavar="FILE", -+ help="File with complex samples") -+ args = parser.parse_args() -+ -+ return args - -diff --git a/gr-qtgui/apps/plot_time_raster_base.py b/gr-qtgui/apps/plot_time_raster_base.py -index 252f4154e8..97fdd61c82 100644 ---- a/gr-qtgui/apps/plot_time_raster_base.py -+++ b/gr-qtgui/apps/plot_time_raster_base.py -@@ -21,8 +21,8 @@ - # - - from gnuradio import gr, blocks --from gnuradio.eng_option import eng_option --from optparse import OptionParser -+from gnuradio.eng_arg import eng_float, intx -+from argparse import ArgumentParser - import os, sys - - try: -@@ -161,23 +161,22 @@ class plot_base(gr.top_block): - self._auto_scale = False - - def setup_options(desc): -- parser = OptionParser(option_class=eng_option, description=desc, -- conflict_handler="resolve") -- parser.add_option("-N", "--nsamples", type="int", default=1000000, -- help="Set the number of samples to display [default=%default]") -- parser.add_option("-S", "--start", type="int", default=0, -- help="Starting sample number [default=%default]") -- parser.add_option("-C", "--ncols", type="int", default=100, -- help="Number of columns [default=%default]") -- parser.add_option("-R", "--nrows", type="int", default=100, -- help="Number of rows [default=%default]") -- parser.add_option("-r", "--sample-rate", type="eng_float", default=1.0, -- help="Set the sample rate of the signal [default=%default]") -- parser.add_option("", "--no-auto-scale", action="store_true", default=False, -- help="Do not auto-scale the plot [default=%default]") -- (options,args) = parser.parse_args() -- if(len(args) < 1): -- parser.print_help() -- sys.exit(0) -- return (options,args) -+ parser = ArgumentParser(description=desc, conflict_handler="resolve") -+ parser.add_argument("-N", "--nsamples", type=int, default=1000000, -+ help="Set the number of samples to display [default=%(default)r]") -+ parser.add_argument("-S", "--start", type=int, default=0, -+ help="Starting sample number [default=%(default)r]") -+ parser.add_argument("-C", "--ncols", type=int, default=100, -+ help="Number of columns [default=%(default)r]") -+ parser.add_argument("-R", "--nrows", type=int, default=100, -+ help="Number of rows [default=%(default)r]") -+ parser.add_argument("-r", "--sample-rate", type=eng_float, default=1.0, -+ help="Set the sample rate of the signal [default=%(default)r]") -+ parser.add_argument("--no-auto-scale", action="store_true", -+ help="Do not auto-scale the plot [default=%(default)r]") -+ parser.add_argument("files", nargs="+", metavar="FILE", -+ help="Input files with complex samples") -+ args = parser.parse_args() -+ -+ return args - -diff --git a/gr-qtgui/apps/qt_digital.py b/gr-qtgui/apps/qt_digital.py -index fef4f448b4..92c81c312d 100755 ---- a/gr-qtgui/apps/qt_digital.py -+++ b/gr-qtgui/apps/qt_digital.py -@@ -29,10 +29,10 @@ import sys - - try: - from gnuradio import qtgui -- from PyQt4 import QtGui, QtCore -+ from PyQt5 import QtGui, QtCore - import sip - except ImportError: -- print "Error: Program requires PyQt4 and gr-qtgui." -+ print "Error: Program requires PyQt5 and gr-qtgui." - sys.exit(1) - - try: -@@ -45,7 +45,7 @@ try: - from qt_digital_window import Ui_DigitalWindow - except ImportError: - print "Error: could not find qt_digital_window.py:" -- print "\t\"Please run: pyuic4 qt_digital_window.ui -o qt_digital_window.py\"" -+ print "\t\"Please run: pyuic5 qt_digital_window.ui -o qt_digital_window.py\"" - sys.exit(1) - - class dialog_box(QtGui.QMainWindow): -diff --git a/gr-qtgui/apps/qt_digital_window.py b/gr-qtgui/apps/qt_digital_window.py -index 50dd53a923..04ecfe1030 100644 ---- a/gr-qtgui/apps/qt_digital_window.py -+++ b/gr-qtgui/apps/qt_digital_window.py -@@ -2,36 +2,35 @@ - - # Form implementation generated from reading ui file 'qt_digital_window.ui' - # --# Created: Sat May 1 20:14:02 2010 --# by: PyQt4 UI code generator 4.6.1 -+# Created by: PyQt5 UI code generator 5.7 - # - # WARNING! All changes made in this file will be lost! - --from PyQt4 import QtCore, QtGui -+from PyQt5 import QtCore, QtGui, QtWidgets - - class Ui_DigitalWindow(object): - def setupUi(self, DigitalWindow): - DigitalWindow.setObjectName("DigitalWindow") - DigitalWindow.resize(1236, 741) -- self.centralwidget = QtGui.QWidget(DigitalWindow) -+ self.centralwidget = QtWidgets.QWidget(DigitalWindow) - self.centralwidget.setObjectName("centralwidget") -- self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget) -+ self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) - self.verticalLayout.setObjectName("verticalLayout") -- self.sinkFrame = QtGui.QFrame(self.centralwidget) -+ self.sinkFrame = QtWidgets.QFrame(self.centralwidget) - self.sinkFrame.setMinimumSize(QtCore.QSize(0, 550)) -- self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel) -- self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised) -+ self.sinkFrame.setFrameShape(QtWidgets.QFrame.StyledPanel) -+ self.sinkFrame.setFrameShadow(QtWidgets.QFrame.Raised) - self.sinkFrame.setObjectName("sinkFrame") -- self.horizontalLayout_2 = QtGui.QHBoxLayout(self.sinkFrame) -+ self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.sinkFrame) - self.horizontalLayout_2.setObjectName("horizontalLayout_2") -- self.sinkLayout = QtGui.QHBoxLayout() -+ self.sinkLayout = QtWidgets.QHBoxLayout() - self.sinkLayout.setObjectName("sinkLayout") - self.horizontalLayout_2.addLayout(self.sinkLayout) - self.verticalLayout.addWidget(self.sinkFrame) -- self.horizontalLayout = QtGui.QHBoxLayout() -+ self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setObjectName("horizontalLayout") -- self.sysBox = QtGui.QGroupBox(self.centralwidget) -- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) -+ self.sysBox = QtWidgets.QGroupBox(self.centralwidget) -+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth()) -@@ -40,74 +39,74 @@ class Ui_DigitalWindow(object): - self.sysBox.setMaximumSize(QtCore.QSize(16777215, 120)) - self.sysBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) - self.sysBox.setObjectName("sysBox") -- self.gridLayout_2 = QtGui.QGridLayout(self.sysBox) -+ self.gridLayout_2 = QtWidgets.QGridLayout(self.sysBox) - self.gridLayout_2.setObjectName("gridLayout_2") -- self.sampleRateEdit = QtGui.QLineEdit(self.sysBox) -+ self.sampleRateEdit = QtWidgets.QLineEdit(self.sysBox) - self.sampleRateEdit.setMaximumSize(QtCore.QSize(100, 16777215)) - self.sampleRateEdit.setObjectName("sampleRateEdit") - self.gridLayout_2.addWidget(self.sampleRateEdit, 0, 3, 1, 1) -- self.sampleRateLabel = QtGui.QLabel(self.sysBox) -+ self.sampleRateLabel = QtWidgets.QLabel(self.sysBox) - self.sampleRateLabel.setObjectName("sampleRateLabel") - self.gridLayout_2.addWidget(self.sampleRateLabel, 0, 2, 1, 1) - self.horizontalLayout.addWidget(self.sysBox) -- self.rxBox = QtGui.QGroupBox(self.centralwidget) -+ self.rxBox = QtWidgets.QGroupBox(self.centralwidget) - self.rxBox.setMaximumSize(QtCore.QSize(16777215, 120)) - self.rxBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) - self.rxBox.setObjectName("rxBox") -- self.gridLayout_3 = QtGui.QGridLayout(self.rxBox) -+ self.gridLayout_3 = QtWidgets.QGridLayout(self.rxBox) - self.gridLayout_3.setObjectName("gridLayout_3") -- self.alphaLabel = QtGui.QLabel(self.rxBox) -+ self.alphaLabel = QtWidgets.QLabel(self.rxBox) - self.alphaLabel.setObjectName("alphaLabel") - self.gridLayout_3.addWidget(self.alphaLabel, 1, 0, 1, 1) -- self.alphaEdit = QtGui.QLineEdit(self.rxBox) -+ self.alphaEdit = QtWidgets.QLineEdit(self.rxBox) - self.alphaEdit.setMaximumSize(QtCore.QSize(100, 16777215)) - self.alphaEdit.setObjectName("alphaEdit") - self.gridLayout_3.addWidget(self.alphaEdit, 1, 1, 1, 1) -- self.gainMuLabel = QtGui.QLabel(self.rxBox) -+ self.gainMuLabel = QtWidgets.QLabel(self.rxBox) - self.gainMuLabel.setObjectName("gainMuLabel") - self.gridLayout_3.addWidget(self.gainMuLabel, 0, 0, 1, 1) -- self.gainMuEdit = QtGui.QLineEdit(self.rxBox) -+ self.gainMuEdit = QtWidgets.QLineEdit(self.rxBox) - self.gainMuEdit.setMaximumSize(QtCore.QSize(100, 16777215)) - self.gainMuEdit.setObjectName("gainMuEdit") - self.gridLayout_3.addWidget(self.gainMuEdit, 0, 1, 1, 1) - self.horizontalLayout.addWidget(self.rxBox) -- self.channelModeBox = QtGui.QGroupBox(self.centralwidget) -+ self.channelModeBox = QtWidgets.QGroupBox(self.centralwidget) - self.channelModeBox.setMaximumSize(QtCore.QSize(16777215, 120)) - self.channelModeBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) - self.channelModeBox.setObjectName("channelModeBox") -- self.gridLayout = QtGui.QGridLayout(self.channelModeBox) -- self.gridLayout.setSizeConstraint(QtGui.QLayout.SetMinimumSize) -+ self.gridLayout = QtWidgets.QGridLayout(self.channelModeBox) -+ self.gridLayout.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize) - self.gridLayout.setObjectName("gridLayout") -- self.snrLabel = QtGui.QLabel(self.channelModeBox) -+ self.snrLabel = QtWidgets.QLabel(self.channelModeBox) - self.snrLabel.setObjectName("snrLabel") - self.gridLayout.addWidget(self.snrLabel, 0, 1, 1, 1) -- self.snrEdit = QtGui.QLineEdit(self.channelModeBox) -+ self.snrEdit = QtWidgets.QLineEdit(self.channelModeBox) - self.snrEdit.setMaximumSize(QtCore.QSize(100, 16777215)) - self.snrEdit.setObjectName("snrEdit") - self.gridLayout.addWidget(self.snrEdit, 0, 2, 1, 1) -- self.freqLabel = QtGui.QLabel(self.channelModeBox) -+ self.freqLabel = QtWidgets.QLabel(self.channelModeBox) - self.freqLabel.setObjectName("freqLabel") - self.gridLayout.addWidget(self.freqLabel, 1, 1, 1, 1) -- self.freqEdit = QtGui.QLineEdit(self.channelModeBox) -+ self.freqEdit = QtWidgets.QLineEdit(self.channelModeBox) - self.freqEdit.setMaximumSize(QtCore.QSize(100, 16777215)) - self.freqEdit.setObjectName("freqEdit") - self.gridLayout.addWidget(self.freqEdit, 1, 2, 1, 1) -- self.timeLabel = QtGui.QLabel(self.channelModeBox) -+ self.timeLabel = QtWidgets.QLabel(self.channelModeBox) - self.timeLabel.setObjectName("timeLabel") - self.gridLayout.addWidget(self.timeLabel, 2, 1, 1, 1) -- self.timeEdit = QtGui.QLineEdit(self.channelModeBox) -+ self.timeEdit = QtWidgets.QLineEdit(self.channelModeBox) - self.timeEdit.setMaximumSize(QtCore.QSize(100, 16777215)) - self.timeEdit.setObjectName("timeEdit") - self.gridLayout.addWidget(self.timeEdit, 2, 2, 1, 1) - self.horizontalLayout.addWidget(self.channelModeBox) -- spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) -+ spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem) -- self.verticalLayout_2 = QtGui.QVBoxLayout() -+ self.verticalLayout_2 = QtWidgets.QVBoxLayout() - self.verticalLayout_2.setObjectName("verticalLayout_2") -- spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) -+ spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout_2.addItem(spacerItem1) -- self.pauseButton = QtGui.QPushButton(self.centralwidget) -- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) -+ self.pauseButton = QtWidgets.QPushButton(self.centralwidget) -+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pauseButton.sizePolicy().hasHeightForWidth()) -@@ -115,47 +114,48 @@ class Ui_DigitalWindow(object): - self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215)) - self.pauseButton.setObjectName("pauseButton") - self.verticalLayout_2.addWidget(self.pauseButton) -- self.closeButton = QtGui.QPushButton(self.centralwidget) -+ self.closeButton = QtWidgets.QPushButton(self.centralwidget) - self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215)) - self.closeButton.setObjectName("closeButton") - self.verticalLayout_2.addWidget(self.closeButton) - self.horizontalLayout.addLayout(self.verticalLayout_2) - self.verticalLayout.addLayout(self.horizontalLayout) - DigitalWindow.setCentralWidget(self.centralwidget) -- self.menubar = QtGui.QMenuBar(DigitalWindow) -+ self.menubar = QtWidgets.QMenuBar(DigitalWindow) - self.menubar.setGeometry(QtCore.QRect(0, 0, 1236, 23)) - self.menubar.setObjectName("menubar") -- self.menuFile = QtGui.QMenu(self.menubar) -+ self.menuFile = QtWidgets.QMenu(self.menubar) - self.menuFile.setObjectName("menuFile") - DigitalWindow.setMenuBar(self.menubar) -- self.statusbar = QtGui.QStatusBar(DigitalWindow) -+ self.statusbar = QtWidgets.QStatusBar(DigitalWindow) - self.statusbar.setObjectName("statusbar") - DigitalWindow.setStatusBar(self.statusbar) -- self.actionExit = QtGui.QAction(DigitalWindow) -+ self.actionExit = QtWidgets.QAction(DigitalWindow) - self.actionExit.setObjectName("actionExit") - self.menuFile.addAction(self.actionExit) - self.menubar.addAction(self.menuFile.menuAction()) - - self.retranslateUi(DigitalWindow) -- QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), DigitalWindow.close) -- QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL("triggered()"), DigitalWindow.close) -+ self.closeButton.clicked.connect(DigitalWindow.close) -+ self.actionExit.triggered.connect(DigitalWindow.close) - QtCore.QMetaObject.connectSlotsByName(DigitalWindow) - DigitalWindow.setTabOrder(self.snrEdit, self.freqEdit) - DigitalWindow.setTabOrder(self.freqEdit, self.timeEdit) - - def retranslateUi(self, DigitalWindow): -- DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) -- self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8)) -- self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8)) -- self.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8)) -- self.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", None, QtGui.QApplication.UnicodeUTF8)) -- self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8)) -- self.channelModeBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtGui.QApplication.UnicodeUTF8)) -- self.snrLabel.setText(QtGui.QApplication.translate("DigitalWindow", "SNR (dB)", None, QtGui.QApplication.UnicodeUTF8)) -- self.freqLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Frequency Offset (Hz)", None, QtGui.QApplication.UnicodeUTF8)) -- self.timeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Timing Offset", None, QtGui.QApplication.UnicodeUTF8)) -- self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8)) -- self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8)) -- self.menuFile.setTitle(QtGui.QApplication.translate("DigitalWindow", "&File", None, QtGui.QApplication.UnicodeUTF8)) -- self.actionExit.setText(QtGui.QApplication.translate("DigitalWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8)) -+ _translate = QtCore.QCoreApplication.translate -+ DigitalWindow.setWindowTitle(_translate("DigitalWindow", "MainWindow")) -+ self.sysBox.setTitle(_translate("DigitalWindow", "System Parameters")) -+ self.sampleRateLabel.setText(_translate("DigitalWindow", "Sample Rate (sps)")) -+ self.rxBox.setTitle(_translate("DigitalWindow", "Receiver Parameters")) -+ self.alphaLabel.setText(_translate("DigitalWindow", "Alpha")) -+ self.gainMuLabel.setText(_translate("DigitalWindow", "Gain mu")) -+ self.channelModeBox.setTitle(_translate("DigitalWindow", "Channel Model Parameters")) -+ self.snrLabel.setText(_translate("DigitalWindow", "SNR (dB)")) -+ self.freqLabel.setText(_translate("DigitalWindow", "Frequency Offset (Hz)")) -+ self.timeLabel.setText(_translate("DigitalWindow", "Timing Offset")) -+ self.pauseButton.setText(_translate("DigitalWindow", "Pause")) -+ self.closeButton.setText(_translate("DigitalWindow", "Close")) -+ self.menuFile.setTitle(_translate("DigitalWindow", "&File")) -+ self.actionExit.setText(_translate("DigitalWindow", "E&xit")) - -diff --git a/gr-qtgui/apps/usrp_display_qtgui.py b/gr-qtgui/apps/usrp_display_qtgui.py -index 4c9de3a53c..8f8af003d8 100644 ---- a/gr-qtgui/apps/usrp_display_qtgui.py -+++ b/gr-qtgui/apps/usrp_display_qtgui.py -@@ -2,25 +2,24 @@ - - # Form implementation generated from reading ui file 'usrp_display_qtgui.ui' - # --# Created: Thu Jul 16 22:06:24 2009 --# by: PyQt4 UI code generator 4.4.3 -+# Created by: PyQt5 UI code generator 5.7 - # - # WARNING! All changes made in this file will be lost! - --from PyQt4 import QtCore, QtGui -+from PyQt5 import QtCore, QtGui, QtWidgets - - class Ui_MainWindow(object): - def setupUi(self, MainWindow): - MainWindow.setObjectName("MainWindow") - MainWindow.resize(820, 774) -- self.centralwidget = QtGui.QWidget(MainWindow) -+ self.centralwidget = QtWidgets.QWidget(MainWindow) - self.centralwidget.setObjectName("centralwidget") -- self.gridLayout_2 = QtGui.QGridLayout(self.centralwidget) -+ self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget) - self.gridLayout_2.setObjectName("gridLayout_2") -- self.horizontalLayout_2 = QtGui.QHBoxLayout() -+ self.horizontalLayout_2 = QtWidgets.QHBoxLayout() - self.horizontalLayout_2.setObjectName("horizontalLayout_2") -- self.groupBox = QtGui.QGroupBox(self.centralwidget) -- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) -+ self.groupBox = QtWidgets.QGroupBox(self.centralwidget) -+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth()) -@@ -28,101 +27,103 @@ class Ui_MainWindow(object): - self.groupBox.setMinimumSize(QtCore.QSize(240, 150)) - self.groupBox.setMaximumSize(QtCore.QSize(240, 16777215)) - self.groupBox.setObjectName("groupBox") -- self.formLayoutWidget = QtGui.QWidget(self.groupBox) -+ self.formLayoutWidget = QtWidgets.QWidget(self.groupBox) - self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 221, 124)) - self.formLayoutWidget.setObjectName("formLayoutWidget") -- self.formLayout = QtGui.QFormLayout(self.formLayoutWidget) -+ self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget) -+ self.formLayout.setContentsMargins(0, 0, 0, 0) - self.formLayout.setObjectName("formLayout") -- self.frequencyLabel = QtGui.QLabel(self.formLayoutWidget) -+ self.frequencyLabel = QtWidgets.QLabel(self.formLayoutWidget) - self.frequencyLabel.setObjectName("frequencyLabel") -- self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.frequencyLabel) -- self.gainLabel = QtGui.QLabel(self.formLayoutWidget) -+ self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.frequencyLabel) -+ self.gainLabel = QtWidgets.QLabel(self.formLayoutWidget) - self.gainLabel.setObjectName("gainLabel") -- self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.gainLabel) -- self.bandwidthLabel = QtGui.QLabel(self.formLayoutWidget) -+ self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.gainLabel) -+ self.bandwidthLabel = QtWidgets.QLabel(self.formLayoutWidget) - self.bandwidthLabel.setObjectName("bandwidthLabel") -- self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.bandwidthLabel) -- self.frequencyEdit = QtGui.QLineEdit(self.formLayoutWidget) -- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) -+ self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.bandwidthLabel) -+ self.frequencyEdit = QtWidgets.QLineEdit(self.formLayoutWidget) -+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.frequencyEdit.sizePolicy().hasHeightForWidth()) - self.frequencyEdit.setSizePolicy(sizePolicy) - self.frequencyEdit.setMinimumSize(QtCore.QSize(120, 26)) - self.frequencyEdit.setObjectName("frequencyEdit") -- self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.frequencyEdit) -- self.gainEdit = QtGui.QLineEdit(self.formLayoutWidget) -- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) -+ self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.frequencyEdit) -+ self.gainEdit = QtWidgets.QLineEdit(self.formLayoutWidget) -+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.gainEdit.sizePolicy().hasHeightForWidth()) - self.gainEdit.setSizePolicy(sizePolicy) - self.gainEdit.setMinimumSize(QtCore.QSize(120, 26)) - self.gainEdit.setObjectName("gainEdit") -- self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.gainEdit) -- self.bandwidthEdit = QtGui.QLineEdit(self.formLayoutWidget) -- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) -+ self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.gainEdit) -+ self.bandwidthEdit = QtWidgets.QLineEdit(self.formLayoutWidget) -+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.bandwidthEdit.sizePolicy().hasHeightForWidth()) - self.bandwidthEdit.setSizePolicy(sizePolicy) - self.bandwidthEdit.setMinimumSize(QtCore.QSize(120, 26)) - self.bandwidthEdit.setObjectName("bandwidthEdit") -- self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.bandwidthEdit) -- self.amplifierLabel = QtGui.QLabel(self.formLayoutWidget) -+ self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.bandwidthEdit) -+ self.amplifierLabel = QtWidgets.QLabel(self.formLayoutWidget) - self.amplifierLabel.setObjectName("amplifierLabel") -- self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.amplifierLabel) -- self.amplifierEdit = QtGui.QLineEdit(self.formLayoutWidget) -- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) -+ self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.amplifierLabel) -+ self.amplifierEdit = QtWidgets.QLineEdit(self.formLayoutWidget) -+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.amplifierEdit.sizePolicy().hasHeightForWidth()) - self.amplifierEdit.setSizePolicy(sizePolicy) - self.amplifierEdit.setMinimumSize(QtCore.QSize(120, 26)) - self.amplifierEdit.setObjectName("amplifierEdit") -- self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.amplifierEdit) -+ self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.amplifierEdit) - self.horizontalLayout_2.addWidget(self.groupBox) -- self.frame_2 = QtGui.QFrame(self.centralwidget) -+ self.frame_2 = QtWidgets.QFrame(self.centralwidget) - self.frame_2.setMinimumSize(QtCore.QSize(200, 0)) -- self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel) -- self.frame_2.setFrameShadow(QtGui.QFrame.Raised) -+ self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) -+ self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) - self.frame_2.setObjectName("frame_2") -- self.verticalLayoutWidget = QtGui.QWidget(self.frame_2) -+ self.verticalLayoutWidget = QtWidgets.QWidget(self.frame_2) - self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, -1, 191, 151)) - self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") -- self.verticalLayout_3 = QtGui.QVBoxLayout(self.verticalLayoutWidget) -+ self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) -+ self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_3.setObjectName("verticalLayout_3") -- self.dcCancelCheckBox = QtGui.QCheckBox(self.verticalLayoutWidget) -+ self.dcCancelCheckBox = QtWidgets.QCheckBox(self.verticalLayoutWidget) - self.dcCancelCheckBox.setObjectName("dcCancelCheckBox") - self.verticalLayout_3.addWidget(self.dcCancelCheckBox) -- self.horizontalLayout = QtGui.QHBoxLayout() -+ self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setObjectName("horizontalLayout") -- self.dcGainLabel = QtGui.QLabel(self.verticalLayoutWidget) -+ self.dcGainLabel = QtWidgets.QLabel(self.verticalLayoutWidget) - self.dcGainLabel.setObjectName("dcGainLabel") - self.horizontalLayout.addWidget(self.dcGainLabel) -- self.dcGainEdit = QtGui.QLineEdit(self.verticalLayoutWidget) -+ self.dcGainEdit = QtWidgets.QLineEdit(self.verticalLayoutWidget) - self.dcGainEdit.setObjectName("dcGainEdit") - self.horizontalLayout.addWidget(self.dcGainEdit) - self.verticalLayout_3.addLayout(self.horizontalLayout) -- spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) -+ spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout_3.addItem(spacerItem) - self.horizontalLayout_2.addWidget(self.frame_2) -- spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) -+ spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_2.addItem(spacerItem1) -- self.verticalLayout = QtGui.QVBoxLayout() -+ self.verticalLayout = QtWidgets.QVBoxLayout() - self.verticalLayout.setObjectName("verticalLayout") -- spacerItem2 = QtGui.QSpacerItem(20, 80, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) -+ spacerItem2 = QtWidgets.QSpacerItem(20, 80, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - self.verticalLayout.addItem(spacerItem2) -- self.pauseButton = QtGui.QPushButton(self.centralwidget) -- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) -+ self.pauseButton = QtWidgets.QPushButton(self.centralwidget) -+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pauseButton.sizePolicy().hasHeightForWidth()) - self.pauseButton.setSizePolicy(sizePolicy) - self.pauseButton.setObjectName("pauseButton") - self.verticalLayout.addWidget(self.pauseButton) -- self.closeButton = QtGui.QPushButton(self.centralwidget) -- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) -+ self.closeButton = QtWidgets.QPushButton(self.centralwidget) -+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.closeButton.sizePolicy().hasHeightForWidth()) -@@ -132,60 +133,61 @@ class Ui_MainWindow(object): - self.verticalLayout.addWidget(self.closeButton) - self.horizontalLayout_2.addLayout(self.verticalLayout) - self.gridLayout_2.addLayout(self.horizontalLayout_2, 1, 0, 1, 1) -- self.verticalLayout_2 = QtGui.QVBoxLayout() -+ self.verticalLayout_2 = QtWidgets.QVBoxLayout() - self.verticalLayout_2.setObjectName("verticalLayout_2") -- self.frame = QtGui.QFrame(self.centralwidget) -- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) -+ self.frame = QtWidgets.QFrame(self.centralwidget) -+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(1) - sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth()) - self.frame.setSizePolicy(sizePolicy) - self.frame.setMinimumSize(QtCore.QSize(800, 550)) -- self.frame.setFrameShape(QtGui.QFrame.StyledPanel) -- self.frame.setFrameShadow(QtGui.QFrame.Raised) -+ self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) -+ self.frame.setFrameShadow(QtWidgets.QFrame.Raised) - self.frame.setObjectName("frame") -- self.gridLayout = QtGui.QGridLayout(self.frame) -+ self.gridLayout = QtWidgets.QGridLayout(self.frame) - self.gridLayout.setObjectName("gridLayout") -- self.sinkLayout = QtGui.QHBoxLayout() -+ self.sinkLayout = QtWidgets.QHBoxLayout() - self.sinkLayout.setObjectName("sinkLayout") - self.gridLayout.addLayout(self.sinkLayout, 0, 0, 1, 1) - self.verticalLayout_2.addWidget(self.frame) - self.gridLayout_2.addLayout(self.verticalLayout_2, 0, 0, 1, 1) - MainWindow.setCentralWidget(self.centralwidget) -- self.menubar = QtGui.QMenuBar(MainWindow) -+ self.menubar = QtWidgets.QMenuBar(MainWindow) - self.menubar.setGeometry(QtCore.QRect(0, 0, 820, 24)) - self.menubar.setObjectName("menubar") -- self.menuFile = QtGui.QMenu(self.menubar) -+ self.menuFile = QtWidgets.QMenu(self.menubar) - self.menuFile.setObjectName("menuFile") - MainWindow.setMenuBar(self.menubar) -- self.statusbar = QtGui.QStatusBar(MainWindow) -+ self.statusbar = QtWidgets.QStatusBar(MainWindow) - self.statusbar.setObjectName("statusbar") - MainWindow.setStatusBar(self.statusbar) -- self.actionExit = QtGui.QAction(MainWindow) -+ self.actionExit = QtWidgets.QAction(MainWindow) - self.actionExit.setObjectName("actionExit") -- self.actionSaveData = QtGui.QAction(MainWindow) -+ self.actionSaveData = QtWidgets.QAction(MainWindow) - self.actionSaveData.setObjectName("actionSaveData") - self.menuFile.addAction(self.actionSaveData) - self.menuFile.addAction(self.actionExit) - self.menubar.addAction(self.menuFile.menuAction()) - - self.retranslateUi(MainWindow) -- QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), MainWindow.close) -- QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL("triggered()"), MainWindow.close) -+ self.closeButton.clicked.connect(MainWindow.close) -+ self.actionExit.triggered.connect(MainWindow.close) - QtCore.QMetaObject.connectSlotsByName(MainWindow) - - def retranslateUi(self, MainWindow): -- MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "USRP Display", None, QtGui.QApplication.UnicodeUTF8)) -- self.groupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8)) -- self.frequencyLabel.setText(QtGui.QApplication.translate("MainWindow", "Frequency (Hz)", None, QtGui.QApplication.UnicodeUTF8)) -- self.gainLabel.setText(QtGui.QApplication.translate("MainWindow", "RF Gain", None, QtGui.QApplication.UnicodeUTF8)) -- self.bandwidthLabel.setText(QtGui.QApplication.translate("MainWindow", "Bandwidth", None, QtGui.QApplication.UnicodeUTF8)) -- self.amplifierLabel.setText(QtGui.QApplication.translate("MainWindow", "Amplifier", None, QtGui.QApplication.UnicodeUTF8)) -- self.dcCancelCheckBox.setText(QtGui.QApplication.translate("MainWindow", "Cancel DC", None, QtGui.QApplication.UnicodeUTF8)) -- self.dcGainLabel.setText(QtGui.QApplication.translate("MainWindow", "DC Canceller Gain", None, QtGui.QApplication.UnicodeUTF8)) -- self.pauseButton.setText(QtGui.QApplication.translate("MainWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8)) -- self.closeButton.setText(QtGui.QApplication.translate("MainWindow", "Close", None, QtGui.QApplication.UnicodeUTF8)) -- self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8)) -- self.actionExit.setText(QtGui.QApplication.translate("MainWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8)) -- self.actionSaveData.setText(QtGui.QApplication.translate("MainWindow", "&Save Data", None, QtGui.QApplication.UnicodeUTF8)) -+ _translate = QtCore.QCoreApplication.translate -+ MainWindow.setWindowTitle(_translate("MainWindow", "USRP Display")) -+ self.groupBox.setTitle(_translate("MainWindow", "Receiver Parameters")) -+ self.frequencyLabel.setText(_translate("MainWindow", "Frequency (Hz)")) -+ self.gainLabel.setText(_translate("MainWindow", "RF Gain")) -+ self.bandwidthLabel.setText(_translate("MainWindow", "Bandwidth")) -+ self.amplifierLabel.setText(_translate("MainWindow", "Amplifier")) -+ self.dcCancelCheckBox.setText(_translate("MainWindow", "Cancel DC")) -+ self.dcGainLabel.setText(_translate("MainWindow", "DC Canceller Gain")) -+ self.pauseButton.setText(_translate("MainWindow", "Pause")) -+ self.closeButton.setText(_translate("MainWindow", "Close")) -+ self.menuFile.setTitle(_translate("MainWindow", "&File")) -+ self.actionExit.setText(_translate("MainWindow", "E&xit")) -+ self.actionSaveData.setText(_translate("MainWindow", "&Save Data")) - -diff --git a/gr-qtgui/examples/CMakeLists.txt b/gr-qtgui/examples/CMakeLists.txt -index 5662dfa9c8..a91e374772 100644 ---- a/gr-qtgui/examples/CMakeLists.txt -+++ b/gr-qtgui/examples/CMakeLists.txt -@@ -33,7 +33,6 @@ GR_PYTHON_INSTALL(PROGRAMS - pyqt_waterfall_c.py - pyqt_waterfall_f.py - DESTINATION ${GR_PKG_QTGUI_EXAMPLES_DIR} -- COMPONENT "qtgui_python" - ) - - install( -@@ -43,5 +42,4 @@ install( - qtgui_message_inputs.grc - test_qtgui_msg.grc - DESTINATION ${GR_PKG_QTGUI_EXAMPLES_DIR} -- COMPONENT "qtgui_python" - ) -diff --git a/gr-qtgui/examples/c++/CMakeLists.txt b/gr-qtgui/examples/c++/CMakeLists.txt -index 49c41a0c64..dacd782e1b 100644 ---- a/gr-qtgui/examples/c++/CMakeLists.txt -+++ b/gr-qtgui/examples/c++/CMakeLists.txt -@@ -35,9 +35,15 @@ list(APPEND QTGUI_LIBRARIES - gnuradio-blocks - gnuradio-fft - gnuradio-runtime -+ ${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 b17ff56c2f..96402041e8 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 PyQt5 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 @@ -- -+ -+ - - Wed Nov 6 11:52:40 2013 - - options - -- id -- qtgui_tags_viewing -+ author -+ - - -- _enabled -- True -+ window_size -+ 1280, 1024 - - -- title -- -+ category -+ Custom - - -- author -+ comment - - - -@@ -24,241 +25,260 @@ - - - -- window_size -- 1280, 1024 -+ _enabled -+ True - - -- generate_options -- qt_gui -+ _coordinate -+ (10, 10) - - -- category -- Custom -+ _rotation -+ 0 - - -- run_options -- run -+ generate_options -+ qt_gui - - -- run -- True -+ id -+ qtgui_tags_viewing - - - max_nouts - 0 - - -- realtime_scheduling -+ qt_qss_theme - - - -- _coordinate -- (10, 10) -+ realtime_scheduling -+ - - -- _rotation -- 0 -+ run_command -+ {python} -u {filename} - -- -- -- variable - -- id -- samp_rate -+ run_options -+ run - - -- _enabled -+ run - True - - -- value -- 32000 -- -- -- _coordinate -- (172, 10) -+ thread_safe_setters -+ - - -- _rotation -- 0 -+ title -+ - - - -- import -+ variable_qtgui_range - -- id -- import_1 -+ comment -+ -+ -+ -+ value -+ 300 - - - _enabled - True - - -- import -- from gnuradio.digital.utils import tagged_streams -+ _coordinate -+ (814, 390) - - -- _coordinate -- (99, 72) -+ gui_hint -+ - - - _rotation - 0 - -- -- -- import - - id -- import_0 -+ delay - - -- _enabled -- True -+ label -+ Delay - - -- import -- import scipy -+ min_len -+ 200 - - -- _coordinate -- (9, 71) -+ orient -+ Qt.Horizontal - - -- _rotation -+ start - 0 - -+ -+ step -+ 1 -+ -+ -+ stop -+ 1000 -+ -+ -+ rangeType -+ float -+ -+ -+ widget -+ counter_slider -+ - - -- import -+ variable_qtgui_range - -- id -- import_2 -+ comment -+ -+ -+ -+ value -+ 30 - - - _enabled - True - - -- import -- import time -+ _coordinate -+ (936, 392) - - -- _coordinate -- (253, 71) -+ gui_hint -+ - - - _rotation - 0 - -- -- -- blocks_delay - - id -- blocks_delay_0 -+ ntaps - - -- _enabled -- True -+ label -+ Num Taps - - -- type -- complex -+ min_len -+ 200 - - -- delay -- 1000 -+ orient -+ Qt.Horizontal - - -- num_ports -+ start - 1 - - -- vlen -+ step - 1 - - -- affinity -- -- -- -- minoutbuf -- 0 -+ stop -+ 100 - - -- _coordinate -- (300, 240) -+ rangeType -+ float - - -- _rotation -- 0 -+ widget -+ counter_slider - - - -- blocks_tags_strobe -+ variable - -- id -- blocks_tags_strobe_0 -+ comment -+ - - - _enabled - True - - -- type -- complex -+ _coordinate -+ (172, 10) -+ -+ -+ _rotation -+ 0 -+ -+ -+ id -+ samp_rate - - - value -- pmt.intern("TEST") -+ 32000 - -+ -+ -+ analog_fastnoise_source_x - -- nsamps -- 10000 -+ amp -+ 0.004 - - -- vlen -- 1 -+ alias -+ -+ -+ -+ comment -+ - - - affinity - - - -- minoutbuf -- 0 -+ _enabled -+ True - - - _coordinate -- (16, 232) -+ (350, 39) - - - _rotation - 0 - -- -- -- analog_fastnoise_source_x - - id - analog_fastnoise_source_x_0 - - -- _enabled -- True -+ maxoutbuf -+ 0 - - -- type -- complex -+ minoutbuf -+ 0 - - - noise_type - analog.GR_GAUSSIAN - - -- amp -- 0.004 -+ type -+ complex - - - seed -@@ -268,85 +288,101 @@ - samples - 8192 - -+ -+ -+ blocks_add_xx -+ -+ alias -+ -+ -+ -+ comment -+ -+ - - affinity - - - -- minoutbuf -- 0 -+ _enabled -+ True - - - _coordinate -- (350, 39) -+ (482, 193) - - - _rotation - 0 - -- -- -- blocks_vector_source_x - - id -- blocks_vector_source_x_0 -- -- -- _enabled -- True -+ blocks_add_xx_0 - - - type - complex - - -- vector -- [0.85+0.5j, 0.85, 0.85, 0.85+0.5j] + (10000-4)*[0,] -+ maxoutbuf -+ 0 - - -- tags -- tagged_streams.make_lengthtags((1024,), (0,), "testing tags 0") -+ minoutbuf -+ 0 - - -- repeat -- True -+ num_inputs -+ 2 - - - vlen - 1 - -+ -+ -+ blocks_add_xx - -- affinity -+ alias - - - -- minoutbuf -- 0 -+ comment -+ -+ -+ -+ affinity -+ -+ -+ -+ _enabled -+ True - - - _coordinate -- (13, 132) -+ (707, 176) - - - _rotation - 0 - -- -- -- blocks_add_xx - - id -- blocks_add_xx_0 -- -- -- _enabled -- True -+ blocks_add_xx_1 - - - type - complex - - -+ maxoutbuf -+ 0 -+ -+ -+ minoutbuf -+ 0 -+ -+ - num_inputs - 2 - -@@ -354,439 +390,1691 @@ - vlen - 1 - -+ -+ -+ blocks_delay -+ -+ alias -+ -+ -+ -+ comment -+ -+ - - affinity - - - -- minoutbuf -- 0 -+ delay -+ 1000 -+ -+ -+ _enabled -+ True - - - _coordinate -- (482, 193) -+ (300, 240) - - - _rotation - 0 - -- -- -- blocks_add_xx - - id -- blocks_add_xx_1 -+ blocks_delay_0 - - -- _enabled -- True -+ maxoutbuf -+ 0 - - -- type -- complex -+ minoutbuf -+ 0 - - -- num_inputs -- 2 -+ num_ports -+ 1 -+ -+ -+ type -+ complex - - - vlen - 1 - -+ -+ -+ blocks_delay -+ -+ alias -+ -+ -+ -+ comment -+ -+ - - affinity - - - -- minoutbuf -- 0 -+ delay -+ int(delay) -+ -+ -+ _enabled -+ True - - - _coordinate -- (707, 176) -+ (890, 44) - - - _rotation - 0 - -- -- -- blocks_throttle - - id -- blocks_throttle_0 -+ blocks_delay_0_0 - - -- _enabled -- True -+ maxoutbuf -+ 0 - - -- type -- complex -+ minoutbuf -+ 0 - - -- samples_per_second -- 50e3 -+ num_ports -+ 1 -+ -+ -+ type -+ complex - - - vlen - 1 - -+ -+ -+ blocks_tags_strobe -+ -+ alias -+ -+ -+ -+ comment -+ -+ - - affinity - - - -- minoutbuf -- 0 -+ _enabled -+ True - - - _coordinate -- (266, 149) -+ (16, 232) - - - _rotation - 0 - -- -- -- variable_qtgui_range - - id -- ntaps -+ blocks_tags_strobe_0 - - -- _enabled -- True -+ key -+ pmt.intern("strobe") - - -- label -- Num Taps -+ maxoutbuf -+ 0 - - -- value -- 30 -+ minoutbuf -+ 0 - - -- start -- 1 -+ nsamps -+ 10000 - - -- stop -- 100 -+ type -+ complex - - -- step -- 1 -+ value -+ pmt.intern("TEST") - - -- widget -- counter_slider -+ vlen -+ 1 - -+ -+ -+ blocks_throttle - -- orient -- Qt.Horizontal -+ alias -+ - - -- min_len -- 200 -+ comment -+ - - -- gui_hint -+ affinity - - - -+ _enabled -+ True -+ -+ - _coordinate -- (936, 392) -+ (266, 149) - - - _rotation - 0 - -- -- -- qtgui_time_sink_x - - id -- qtgui_time_sink_x_0_1_0 -+ blocks_throttle_0 - - -- _enabled -+ ignoretag - True - - -+ maxoutbuf -+ 0 -+ -+ -+ minoutbuf -+ 0 -+ -+ -+ samples_per_second -+ 50e3 -+ -+ - type - complex - - -- name -+ vlen -+ 1 -+ -+ -+ -+ blocks_throttle -+ -+ alias - - - -- size -- 5100 -+ comment -+ - - -- srate -- samp_rate -+ affinity -+ - - -- ymin -- -0.1 -+ _enabled -+ False - - -- ymax -- 1.5 -+ _coordinate -+ (267, 414) - - -- nconnections -- 1 -+ _rotation -+ 0 - - -- update_time -- 0.001 -+ id -+ blocks_throttle_0_0 - - -- tr_mode -- qtgui.TRIG_MODE_TAG -+ ignoretag -+ True - - -- tr_slope -- qtgui.TRIG_SLOPE_POS -+ maxoutbuf -+ 0 - - -- tr_level -- .5 -+ minoutbuf -+ 0 - - -- tr_delay -- 0.06 -+ samples_per_second -+ samp_rate - - -- tr_chan -- 0 -+ type -+ float - - -- tr_tag -- strobe -+ vlen -+ 1 - -+ -+ -+ blocks_vector_source_x - -- entags -- True -+ alias -+ - - -- gui_hint -- 1,1,1,1 -+ comment -+ - - - affinity - - - -+ _enabled -+ True -+ -+ - _coordinate -- (857, 173) -+ (13, 132) -+ -+ -+ _rotation -+ 0 -+ -+ -+ id -+ blocks_vector_source_x_0 -+ -+ -+ maxoutbuf -+ 0 -+ -+ -+ minoutbuf -+ 0 -+ -+ -+ type -+ complex -+ -+ -+ repeat -+ True -+ -+ -+ tags -+ tagged_streams.make_lengthtags((1024,), (0,), "testing tags 0") -+ -+ -+ vlen -+ 1 -+ -+ -+ vector -+ [0.85+0.5j, 0.85, 0.85, 0.85+0.5j] + (10000-4)*[0,] -+ -+ -+ -+ blocks_vector_source_x -+ -+ alias -+ -+ -+ -+ comment -+ -+ -+ -+ affinity -+ -+ -+ -+ _enabled -+ True -+ -+ -+ _coordinate -+ (15, 315) -+ -+ -+ _rotation -+ 0 -+ -+ -+ id -+ blocks_vector_source_x_0_0 -+ -+ -+ maxoutbuf -+ 0 -+ -+ -+ minoutbuf -+ 0 -+ -+ -+ type -+ complex -+ -+ -+ repeat -+ True -+ -+ -+ tags -+ tagged_streams.make_lengthtags((128,), (1500,), "second stream") -+ -+ -+ vlen -+ 1 -+ -+ -+ vector -+ 1500*[0,] + [0.25+0j,] + (10000-1500-1)*[0,] -+ -+ -+ -+ blocks_vector_source_x -+ -+ alias -+ -+ -+ -+ comment -+ -+ -+ -+ affinity -+ -+ -+ -+ _enabled -+ False -+ -+ -+ _coordinate -+ (15, 489) -+ -+ -+ _rotation -+ 0 -+ -+ -+ id -+ blocks_vector_source_x_0_0_0 -+ -+ -+ maxoutbuf -+ 0 -+ -+ -+ minoutbuf -+ 0 -+ -+ -+ type -+ float -+ -+ -+ repeat -+ True -+ -+ -+ tags -+ tagged_streams.make_lengthtags((128,), (110,), "second stream") -+ -+ -+ vlen -+ 1 -+ -+ -+ vector -+ 10*[0,] + [0.5,] + (100-10-1)*[0,] -+ -+ -+ -+ blocks_vector_source_x -+ -+ alias -+ -+ -+ -+ comment -+ -+ -+ -+ affinity -+ -+ -+ -+ _enabled -+ False -+ -+ -+ _coordinate -+ (15, 398) -+ -+ -+ _rotation -+ 0 -+ -+ -+ id -+ blocks_vector_source_x_0_1 -+ -+ -+ maxoutbuf -+ 0 -+ -+ -+ minoutbuf -+ 0 -+ -+ -+ type -+ float -+ -+ -+ repeat -+ True -+ -+ -+ tags -+ tagged_streams.make_lengthtags((1024,), (0,), "testing tags") -+ -+ -+ vlen -+ 1 -+ -+ -+ vector -+ [-0.85,] + (100-1)*[0,] -+ -+ -+ -+ fir_filter_xxx -+ -+ alias -+ -+ -+ -+ comment -+ -+ -+ -+ affinity -+ -+ -+ -+ decim -+ 1 -+ -+ -+ _enabled -+ True -+ -+ -+ _coordinate -+ (660, 76) -+ -+ -+ _rotation -+ 0 -+ -+ -+ id -+ fir_filter_xxx_0 -+ -+ -+ maxoutbuf -+ 0 -+ -+ -+ minoutbuf -+ 0 -+ -+ -+ samp_delay -+ int(ntaps) -+ -+ -+ taps -+ int(ntaps)*[1,]+[1,] -+ -+ -+ type -+ ccc -+ -+ -+ -+ import -+ -+ alias -+ -+ -+ -+ comment -+ -+ -+ -+ _enabled -+ True -+ -+ -+ _coordinate -+ (9, 71) -+ -+ -+ _rotation -+ 0 -+ -+ -+ id -+ import_0 -+ -+ -+ import -+ import scipy -+ -+ -+ -+ import -+ -+ alias -+ -+ -+ -+ comment -+ -+ -+ -+ _enabled -+ True -+ -+ -+ _coordinate -+ (99, 72) -+ -+ -+ _rotation -+ 0 -+ -+ -+ id -+ import_1 -+ -+ -+ import -+ from gnuradio.digital.utils import tagged_streams -+ -+ -+ -+ import -+ -+ alias -+ -+ -+ -+ comment -+ -+ -+ -+ _enabled -+ True -+ -+ -+ _coordinate -+ (253, 71) -+ -+ -+ _rotation -+ 0 -+ -+ -+ id -+ import_2 -+ -+ -+ import -+ import time -+ -+ -+ -+ qtgui_time_sink_x -+ -+ autoscale -+ False -+ -+ -+ alias -+ -+ -+ -+ comment -+ -+ -+ -+ ctrlpanel -+ False -+ -+ -+ affinity -+ -+ -+ -+ entags -+ True -+ -+ -+ _enabled -+ True -+ -+ -+ _coordinate -+ (860, 298) -+ -+ -+ gui_hint -+ -+ -+ -+ _rotation -+ 0 -+ -+ -+ grid -+ False -+ -+ -+ id -+ qtgui_time_sink_x_0 -+ -+ -+ legend -+ True -+ -+ -+ alpha1 -+ 1.0 -+ -+ -+ color1 -+ "blue" -+ -+ -+ label1 -+ -+ -+ -+ marker1 -+ -1 -+ -+ -+ style1 -+ 1 -+ -+ -+ width1 -+ 1 -+ -+ -+ alpha10 -+ 1.0 -+ -+ -+ color10 -+ "blue" -+ -+ -+ label10 -+ -+ -+ -+ marker10 -+ -1 -+ -+ -+ style10 -+ 1 -+ -+ -+ width10 -+ 1 -+ -+ -+ alpha2 -+ 1.0 -+ -+ -+ color2 -+ "red" -+ -+ -+ label2 -+ -+ -+ -+ marker2 -+ -1 -+ -+ -+ style2 -+ 1 -+ -+ -+ width2 -+ 1 -+ -+ -+ alpha3 -+ 1.0 -+ -+ -+ color3 -+ "green" -+ -+ -+ label3 -+ -+ -+ -+ marker3 -+ -1 -+ -+ -+ style3 -+ 1 -+ -+ -+ width3 -+ 1 -+ -+ -+ alpha4 -+ 1.0 -+ -+ -+ color4 -+ "black" -+ -+ -+ label4 -+ -+ -+ -+ marker4 -+ -1 -+ -+ -+ style4 -+ 1 -+ -+ -+ width4 -+ 1 -+ -+ -+ alpha5 -+ 1.0 -+ -+ -+ color5 -+ "cyan" -+ -+ -+ label5 -+ -+ -+ -+ marker5 -+ -1 -+ -+ -+ style5 -+ 1 -+ -+ -+ width5 -+ 1 -+ -+ -+ alpha6 -+ 1.0 -+ -+ -+ color6 -+ "magenta" -+ -+ -+ label6 -+ -+ -+ -+ marker6 -+ -1 -+ -+ -+ style6 -+ 1 -+ -+ -+ width6 -+ 1 -+ -+ -+ alpha7 -+ 1.0 -+ -+ -+ color7 -+ "yellow" -+ -+ -+ label7 -+ -+ -+ -+ marker7 -+ -1 -+ -+ -+ style7 -+ 1 -+ -+ -+ width7 -+ 1 -+ -+ -+ alpha8 -+ 1.0 -+ -+ -+ color8 -+ "dark red" -+ -+ -+ label8 -+ -+ -+ -+ marker8 -+ -1 -+ -+ -+ style8 -+ 1 -+ -+ -+ width8 -+ 1 -+ -+ -+ alpha9 -+ 1.0 -+ -+ -+ color9 -+ "dark green" -+ -+ -+ label9 -+ -+ -+ -+ marker9 -+ -1 -+ -+ -+ style9 -+ 1 -+ -+ -+ width9 -+ 1 -+ -+ -+ name -+ -+ -+ -+ nconnections -+ 2 -+ -+ -+ size -+ 18000 -+ -+ -+ srate -+ samp_rate -+ -+ -+ tr_chan -+ 0 -+ -+ -+ tr_delay -+ 0 -+ -+ -+ tr_level -+ 0.1 -+ -+ -+ tr_mode -+ qtgui.TRIG_MODE_NORM -+ -+ -+ tr_slope -+ qtgui.TRIG_SLOPE_POS -+ -+ -+ tr_tag -+ "" -+ -+ -+ type -+ complex -+ -+ -+ update_time -+ 0.10 -+ -+ -+ ylabel -+ Amplitude -+ -+ -+ yunit -+ "" -+ -+ -+ ymax -+ 1.5 -+ -+ -+ ymin -+ -0.1 -+ -+ -+ -+ qtgui_time_sink_x -+ -+ autoscale -+ False -+ -+ -+ alias -+ -+ -+ -+ comment -+ -+ -+ -+ ctrlpanel -+ False -+ -+ -+ affinity -+ -+ -+ -+ entags -+ True -+ -+ -+ _enabled -+ False -+ -+ -+ _coordinate -+ (475, 444) -+ -+ -+ gui_hint -+ -+ -+ -+ _rotation -+ 0 -+ -+ -+ grid -+ False -+ -+ -+ id -+ qtgui_time_sink_x_0_0 -+ -+ -+ legend -+ True -+ -+ -+ alpha1 -+ 1.0 -+ -+ -+ color1 -+ "blue" -+ -+ -+ label1 -+ -+ -+ -+ marker1 -+ -1 -+ -+ -+ style1 -+ 1 -+ -+ -+ width1 -+ 1 -+ -+ -+ alpha10 -+ 1.0 -+ -+ -+ color10 -+ "blue" -+ -+ -+ label10 -+ -+ -+ -+ marker10 -+ -1 -+ -+ -+ style10 -+ 1 -+ -+ -+ width10 -+ 1 -+ -+ -+ alpha2 -+ 1.0 -+ -+ -+ color2 -+ "red" -+ -+ -+ label2 -+ -+ -+ -+ marker2 -+ -1 -+ -+ -+ style2 -+ 1 -+ -+ -+ width2 -+ 1 -+ -+ -+ alpha3 -+ 1.0 -+ -+ -+ color3 -+ "green" -+ -+ -+ label3 -+ -+ -+ -+ marker3 -+ -1 -+ -+ -+ style3 -+ 1 -+ -+ -+ width3 -+ 1 -+ -+ -+ alpha4 -+ 1.0 -+ -+ -+ color4 -+ "black" -+ -+ -+ label4 -+ -+ -+ -+ marker4 -+ -1 -+ -+ -+ style4 -+ 1 -+ -+ -+ width4 -+ 1 -+ -+ -+ alpha5 -+ 1.0 -+ -+ -+ color5 -+ "cyan" -+ -+ -+ label5 -+ -+ -+ -+ marker5 -+ -1 -+ -+ -+ style5 -+ 1 -+ -+ -+ width5 -+ 1 -+ -+ -+ alpha6 -+ 1.0 -+ -+ -+ color6 -+ "magenta" -+ -+ -+ label6 -+ -+ -+ -+ marker6 -+ -1 -+ -+ -+ style6 -+ 1 -+ -+ -+ width6 -+ 1 -+ -+ -+ alpha7 -+ 1.0 -+ -+ -+ color7 -+ "yellow" -+ -+ -+ label7 -+ -+ -+ -+ marker7 -+ -1 -+ -+ -+ style7 -+ 1 -+ -+ -+ width7 -+ 1 -+ -+ -+ alpha8 -+ 1.0 -+ -+ -+ color8 -+ "dark red" -+ -+ -+ label8 -+ -+ -+ -+ marker8 -+ -1 -+ -+ -+ style8 -+ 1 -+ -+ -+ width8 -+ 1 -+ -+ -+ alpha9 -+ 1.0 -+ -+ -+ color9 -+ "dark green" -+ -+ -+ label9 -+ -+ -+ -+ marker9 -+ -1 -+ -+ -+ style9 -+ 1 -+ -+ -+ width9 -+ 1 -+ -+ -+ name -+ -+ -+ -+ nconnections -+ 2 -+ -+ -+ size -+ 1024 -+ -+ -+ srate -+ samp_rate -+ -+ -+ tr_chan -+ 1 -+ -+ -+ tr_delay -+ 0 -+ -+ -+ tr_level -+ 0.0 -+ -+ -+ tr_mode -+ qtgui.TRIG_MODE_TAG -+ -+ -+ tr_slope -+ qtgui.TRIG_SLOPE_POS -+ -+ -+ tr_tag -+ second stream -+ -+ -+ type -+ float -+ -+ -+ update_time -+ 0.10 -+ -+ -+ ylabel -+ Amplitude -+ -+ -+ yunit -+ "" -+ -+ -+ ymax -+ 1 -+ -+ -+ ymin -+ -1 -+ -+ -+ -+ qtgui_time_sink_x -+ -+ autoscale -+ False -+ -+ -+ alias -+ -+ -+ -+ comment -+ -+ -+ -+ ctrlpanel -+ False -+ -+ -+ affinity -+ -+ -+ -+ entags -+ True -+ -+ -+ _enabled -+ True -+ -+ -+ _coordinate -+ (1072, 77) -+ -+ -+ gui_hint -+ 1,0,1,1 -+ -+ -+ _rotation -+ 0 -+ -+ -+ grid -+ False -+ -+ -+ id -+ qtgui_time_sink_x_0_1 -+ -+ -+ legend -+ True -+ -+ -+ alpha1 -+ 1.0 -+ -+ -+ color1 -+ "blue" -+ -+ -+ label1 -+ -+ -+ -+ marker1 -+ -1 -+ -+ -+ style1 -+ 1 -+ -+ -+ width1 -+ 1 -+ -+ -+ alpha10 -+ 1.0 -+ -+ -+ color10 -+ "blue" -+ -+ -+ label10 -+ -+ -+ -+ marker10 -+ -1 -+ -+ -+ style10 -+ 1 - - -- _rotation -- 0 -+ width10 -+ 1 - -- -- -- blocks_vector_source_x - -- id -- blocks_vector_source_x_0_0 -+ alpha2 -+ 1.0 - - -- _enabled -- True -+ color2 -+ "red" - - -- type -- complex -+ label2 -+ - - -- vector -- 1500*[0,] + [0.25+0j,] + (10000-1500-1)*[0,] -+ marker2 -+ -1 - - -- tags -- tagged_streams.make_lengthtags((128,), (1500,), "second stream") -+ style2 -+ 1 - - -- repeat -- True -+ width2 -+ 1 - - -- vlen -- 1 -+ alpha3 -+ 1.0 - - -- affinity -- -+ color3 -+ "green" - - -- minoutbuf -- 0 -+ label3 -+ - - -- _coordinate -- (15, 315) -+ marker3 -+ -1 - - -- _rotation -- 0 -+ style3 -+ 1 - -- -- -- qtgui_time_sink_x - -- id -- qtgui_time_sink_x_0 -+ width3 -+ 1 - - -- _enabled -- True -+ alpha4 -+ 1.0 - - -- type -- complex -+ color4 -+ "black" - - -- name -+ label4 - - - -- size -- 18000 -+ marker4 -+ -1 - - -- srate -- samp_rate -+ style4 -+ 1 - - -- ymin -- -0.1 -+ width4 -+ 1 - - -- ymax -- 1.5 -+ alpha5 -+ 1.0 - - -- nconnections -- 2 -+ color5 -+ "cyan" - - -- update_time -- 0.10 -+ label5 -+ - - -- tr_mode -- qtgui.TRIG_MODE_NORM -+ marker5 -+ -1 - - -- tr_slope -- qtgui.TRIG_SLOPE_POS -+ style5 -+ 1 - - -- tr_level -- 0.1 -+ width5 -+ 1 - - -- tr_delay -- 0 -+ alpha6 -+ 1.0 - - -- tr_chan -- 0 -+ color6 -+ "magenta" - - -- tr_tag -- "" -+ label6 -+ - - -- entags -- True -+ marker6 -+ -1 - - -- gui_hint -- -+ style6 -+ 1 - - -- affinity -- -+ width6 -+ 1 - - -- _coordinate -- (860, 298) -+ alpha7 -+ 1.0 - - -- _rotation -- 0 -+ color7 -+ "yellow" - -- -- -- fir_filter_xxx - -- id -- fir_filter_xxx_0 -+ label7 -+ - - -- _enabled -- True -+ marker7 -+ -1 - - -- type -- ccc -+ style7 -+ 1 - - -- decim -+ width7 - 1 - - -- taps -- int(ntaps)*[1,]+[1,] -+ alpha8 -+ 1.0 - - -- samp_delay -- int(ntaps) -+ color8 -+ "dark red" - - -- affinity -+ label8 - - - -- minoutbuf -- 0 -+ marker8 -+ -1 - - -- _coordinate -- (660, 76) -+ style8 -+ 1 - - -- _rotation -- 0 -+ width8 -+ 1 - -- -- -- qtgui_time_sink_x - -- id -- qtgui_time_sink_x_0_1 -+ alpha9 -+ 1.0 - - -- _enabled -- True -+ color9 -+ "dark green" - - -- type -- complex -+ label9 -+ -+ -+ -+ marker9 -+ -1 -+ -+ -+ style9 -+ 1 -+ -+ -+ width9 -+ 1 - - - name - - - -+ nconnections -+ 2 -+ -+ - size - 1000 - -@@ -795,20 +2083,16 @@ - samp_rate - - -- ymin -- -0.1 -- -- -- ymax -- 4.5 -+ tr_chan -+ 0 - - -- nconnections -- 2 -+ tr_delay -+ 0.015 - - -- update_time -- 0.10 -+ tr_level -+ .1 - - - tr_mode -@@ -819,379 +2103,394 @@ - qtgui.TRIG_SLOPE_POS - - -- tr_level -- .1 -+ tr_tag -+ "" - - -- tr_delay -- 0.015 -+ type -+ complex - - -- tr_chan -- 0 -+ update_time -+ 0.10 - - -- tr_tag -+ ylabel -+ Amplitude -+ -+ -+ yunit - "" - - -- entags -- True -+ ymax -+ 4.5 - - -- gui_hint -- 1,0,1,1 -+ ymin -+ -0.1 -+ -+ -+ -+ qtgui_time_sink_x -+ -+ autoscale -+ False -+ -+ -+ alias -+ -+ -+ -+ comment -+ -+ -+ -+ ctrlpanel -+ False - - - affinity - - - -+ entags -+ True -+ -+ -+ _enabled -+ True -+ -+ - _coordinate -- (1072, 77) -+ (857, 173) -+ -+ -+ gui_hint -+ 1,1,1,1 - - - _rotation - 0 - -- -- -- qtgui_time_sink_x - -- id -- qtgui_time_sink_x_0_0 -+ grid -+ False - - -- _enabled -- False -+ id -+ qtgui_time_sink_x_0_1_0 - - -- type -- float -+ legend -+ True - - -- name -- -+ alpha1 -+ 1.0 - - -- size -- 1024 -+ color1 -+ "blue" - - -- srate -- samp_rate -+ label1 -+ - - -- ymin -+ marker1 - -1 - - -- ymax -+ style1 - 1 - - -- nconnections -- 2 -+ width1 -+ 1 - - -- update_time -- 0.10 -+ alpha10 -+ 1.0 - - -- tr_mode -- qtgui.TRIG_MODE_TAG -+ color10 -+ "blue" - - -- tr_slope -- qtgui.TRIG_SLOPE_POS -+ label10 -+ - - -- tr_level -- 0.0 -+ marker10 -+ -1 -+ -+ -+ style10 -+ 1 -+ -+ -+ width10 -+ 1 -+ -+ -+ alpha2 -+ 1.0 -+ -+ -+ color2 -+ "red" -+ -+ -+ label2 -+ - - -- tr_delay -- 0 -+ marker2 -+ -1 - - -- tr_chan -+ style2 - 1 - - -- tr_tag -- second stream -+ width2 -+ 1 - - -- entags -- True -+ alpha3 -+ 1.0 - - -- gui_hint -- -+ color3 -+ "green" - - -- affinity -+ label3 - - - -- _coordinate -- (475, 444) -+ marker3 -+ -1 - - -- _rotation -- 0 -+ style3 -+ 1 - -- -- -- blocks_vector_source_x - -- id -- blocks_vector_source_x_0_0_0 -+ width3 -+ 1 - - -- _enabled -- False -+ alpha4 -+ 1.0 - - -- type -- float -+ color4 -+ "black" - - -- vector -- 10*[0,] + [0.5,] + (100-10-1)*[0,] -+ label4 -+ - - -- tags -- tagged_streams.make_lengthtags((128,), (110,), "second stream") -+ marker4 -+ -1 - - -- repeat -- True -+ style4 -+ 1 - - -- vlen -+ width4 - 1 - - -- affinity -- -+ alpha5 -+ 1.0 - - -- minoutbuf -- 0 -+ color5 -+ "cyan" - - -- _coordinate -- (15, 489) -+ label5 -+ - - -- _rotation -- 0 -+ marker5 -+ -1 - -- -- -- blocks_vector_source_x - -- id -- blocks_vector_source_x_0_1 -+ style5 -+ 1 - - -- _enabled -- False -+ width5 -+ 1 - - -- type -- float -+ alpha6 -+ 1.0 - - -- vector -- [-0.85,] + (100-1)*[0,] -+ color6 -+ "magenta" - - -- tags -- tagged_streams.make_lengthtags((1024,), (0,), "testing tags") -+ label6 -+ - - -- repeat -- True -+ marker6 -+ -1 - - -- vlen -+ style6 - 1 - - -- affinity -- -+ width6 -+ 1 - - -- minoutbuf -- 0 -+ alpha7 -+ 1.0 - - -- _coordinate -- (15, 398) -+ color7 -+ "yellow" - - -- _rotation -- 0 -+ label7 -+ - -- -- -- blocks_throttle - -- id -- blocks_throttle_0_0 -+ marker7 -+ -1 - - -- _enabled -- False -+ style7 -+ 1 - - -- type -- float -+ width7 -+ 1 - - -- samples_per_second -- samp_rate -+ alpha8 -+ 1.0 - - -- vlen -- 1 -+ color8 -+ "dark red" - - -- affinity -+ label8 - - - -- minoutbuf -- 0 -+ marker8 -+ -1 - - -- _coordinate -- (267, 414) -+ style8 -+ 1 - - -- _rotation -- 0 -+ width8 -+ 1 - -- -- -- blocks_delay - -- id -- blocks_delay_0_0 -+ alpha9 -+ 1.0 - - -- _enabled -- True -+ color9 -+ "dark green" - - -- type -- complex -+ label9 -+ - - -- delay -- int(delay) -+ marker9 -+ -1 - - -- num_ports -+ style9 - 1 - - -- vlen -+ width9 - 1 - - -- affinity -+ name - - - -- minoutbuf -- 0 -- -- -- _coordinate -- (890, 44) -+ nconnections -+ 1 - - -- _rotation -- 0 -+ size -+ 5100 - -- -- -- variable_qtgui_range - -- id -- delay -+ srate -+ samp_rate - - -- _enabled -- True -+ tr_chan -+ 0 - - -- label -- Delay -+ tr_delay -+ 0.06 - - -- value -- 300 -+ tr_level -+ .5 - - -- start -- 0 -+ tr_mode -+ qtgui.TRIG_MODE_TAG - - -- stop -- 1000 -+ tr_slope -+ qtgui.TRIG_SLOPE_POS - - -- step -- 1 -+ tr_tag -+ strobe - - -- widget -- counter_slider -+ type -+ complex - - -- orient -- Qt.Horizontal -+ update_time -+ 0.001 - - -- min_len -- 200 -+ ylabel -+ Amplitude - - -- gui_hint -- -+ yunit -+ "" - - -- _coordinate -- (814, 390) -+ ymax -+ 1.5 - - -- _rotation -- 0 -+ ymin -+ -0.1 - - - -- blocks_vector_source_x_0 -- blocks_throttle_0 -- 0 -- 0 -- -- -- blocks_throttle_0 -- blocks_add_xx_0 -- 0 -- 0 -- -- -- blocks_delay_0 -- blocks_add_xx_0 -- 0 -- 1 -- -- - analog_fastnoise_source_x_0 - blocks_add_xx_1 - 0 -@@ -1210,28 +2509,28 @@ - 0 - - -- fir_filter_xxx_0 -- blocks_delay_0_0 -+ blocks_add_xx_1 -+ qtgui_time_sink_x_0 - 0 - 0 - - -- blocks_delay_0_0 -- qtgui_time_sink_x_0_1 -+ blocks_add_xx_1 -+ qtgui_time_sink_x_0_1_0 - 0 - 0 - - -- fir_filter_xxx_0 -- qtgui_time_sink_x_0_1 -+ blocks_delay_0 -+ blocks_add_xx_0 - 0 - 1 - - -- blocks_vector_source_x_0_0 -- qtgui_time_sink_x_0 -+ blocks_delay_0_0 -+ qtgui_time_sink_x_0_1 - 0 -- 1 -+ 0 - - - blocks_tags_strobe_0 -@@ -1240,28 +2539,34 @@ - 0 - - -- blocks_add_xx_1 -- qtgui_time_sink_x_0_1_0 -+ blocks_throttle_0 -+ blocks_add_xx_0 - 0 - 0 - - -- blocks_add_xx_1 -- qtgui_time_sink_x_0 -+ blocks_throttle_0_0 -+ qtgui_time_sink_x_0_0 - 0 - 0 - - -- blocks_vector_source_x_0_0_0 -- qtgui_time_sink_x_0_0 -+ blocks_vector_source_x_0 -+ blocks_throttle_0 -+ 0 -+ 0 -+ -+ -+ blocks_vector_source_x_0_0 -+ qtgui_time_sink_x_0 - 0 - 1 - - -- blocks_throttle_0_0 -+ blocks_vector_source_x_0_0_0 - qtgui_time_sink_x_0_0 - 0 -- 0 -+ 1 - - - blocks_vector_source_x_0_1 -@@ -1269,4 +2574,16 @@ - 0 - 0 - -+ -+ fir_filter_xxx_0 -+ blocks_delay_0_0 -+ 0 -+ 0 -+ -+ -+ fir_filter_xxx_0 -+ qtgui_time_sink_x_0_1 -+ 0 -+ 1 -+ - -diff --git a/gr-qtgui/grc/CMakeLists.txt b/gr-qtgui/grc/CMakeLists.txt -index d56158ac70..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} COMPONENT "qtgui_python") -+ -+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 @@ - - QT GUI Bercurve Sink - qtgui_bercurve_sink -- from PyQt4 import Qt -+ from PyQt5import Qt - from gnuradio import qtgui - import sip - import numpy -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 @@ - - QT GUI Check Box - variable_qtgui_check_box -- from PyQt4 import Qt -+ from PyQt5 import Qt - self.$(id) = $(id) = $value - #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 @@ - - QT GUI Chooser - variable_qtgui_chooser -- from PyQt4 import Qt -- from PyQt4.QtCore import QObject, pyqtSlot -+ from PyQt5 import Qt -+ from PyQt5.QtCore import QObject, pyqtSlot - self.$(id) = $(id) = $value - #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 @@ - - QT GUI Constellation Sink - qtgui_const_sink_x -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import qtgui - import sip - #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 @@ - - QT GUI Message Edit Box - qtgui_edit_box_msg -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import qtgui - import sip - #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 @@ - - QT GUI Entry - variable_qtgui_entry -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import eng_notation - self.$(id) = $(id) = $value - #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 @@ - - QT GUI Frequency Sink - qtgui_freq_sink_x -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import qtgui - from gnuradio.filter import firdes - import sip -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 @@ - - QT GUI Histogram Sink - qtgui_histogram_sink_x -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import qtgui - import sip - #set $win = 'self._%s_win'%$id -diff --git a/gr-qtgui/grc/qtgui_label.xml b/gr-qtgui/grc/qtgui_label.xml -index d67f3d7500..946cee36ab 100644 ---- a/gr-qtgui/grc/qtgui_label.xml -+++ b/gr-qtgui/grc/qtgui_label.xml -@@ -9,7 +9,7 @@ - - QT GUI Label - variable_qtgui_label -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import eng_notation - self.$(id) = $(id) = $value - #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 @@ - - QT GUI Number Sink - qtgui_number_sink -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import qtgui - import sip - #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 @@ - - QT GUI Push Button - variable_qtgui_push_button -- from PyQt4 import Qt -+ from PyQt5 import Qt - self.$(id) = $(id) = $value - #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 @@ - - QT GUI Sink - qtgui_sink_x -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import qtgui - from gnuradio.filter import firdes - import sip -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 @@ - - QT GUI Tab Widget - qtgui_tab_widget -- from PyQt4 import Qt -+ from PyQt5 import Qt - #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 @@ - - QT GUI Time Raster Sink - qtgui_time_raster_sink_x -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import qtgui - import sip - #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 144cba60eb..d4347950ea 100644 ---- a/gr-qtgui/grc/qtgui_time_sink_x.xml -+++ b/gr-qtgui/grc/qtgui_time_sink_x.xml -@@ -7,7 +7,7 @@ - - QT GUI Time Sink - qtgui_time_sink_x -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import qtgui - from gnuradio.filter import firdes - import sip -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 @@ - - QT GUI Vector Sink - qtgui_vector_sink_f -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import qtgui - import sip - #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 @@ - - QT GUI Waterfall Sink - qtgui_waterfall_sink_x -- from PyQt4 import Qt -+ from PyQt5 import Qt - from gnuradio import qtgui - from gnuradio.filter import firdes - import sip -diff --git a/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt b/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt -index 991c7583a8..92ffef9ee7 100644 ---- a/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt -+++ b/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt -@@ -68,5 +68,4 @@ install(FILES - VectorDisplayPlot.h - vector_sink_f.h - DESTINATION ${GR_INCLUDE_DIR}/gnuradio/qtgui -- COMPONENT "qtgui_devel" - ) -diff --git a/gr-qtgui/include/gnuradio/qtgui/form_menus.h b/gr-qtgui/include/gnuradio/qtgui/form_menus.h -index 5c77f825d8..26c63c2d75 100644 ---- a/gr-qtgui/include/gnuradio/qtgui/form_menus.h -+++ b/gr-qtgui/include/gnuradio/qtgui/form_menus.h -@@ -28,6 +28,11 @@ - #include - #include - #include -+ -+#if QT_VERSION >= 0x050000 -+#include -+#endif -+ - #include - #include - #include -diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt -index b1ee580398..52d1770053 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 .ui.h, but the macros generate ui_foo.h - #avoid changing the sources by generating the header with the include -@@ -129,7 +135,6 @@ include_directories( - ${QWT_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} - ${FFTW3F_INCLUDE_DIRS} -- ${LOG4CPP_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_DIRS} - ) -@@ -137,7 +142,6 @@ include_directories( - link_directories( - ${QWT_LIBRARY_DIRS} - ${FFTW3F_LIBRARY_DIRS} -- ${LOG4CPP_LIBRARY_DIRS} - ${Boost_LIBRARY_DIRS} - ) - -@@ -158,7 +162,6 @@ list(APPEND qtgui_libs - ${QWT_LIBRARIES} - ${QT_LIBRARIES} - ${FFTW3F_LIBRARIES} -- ${LOG4CPP_LIBRARIES} - ) - if (WIN32) - list(APPEND qtgui_libs -@@ -177,7 +180,7 @@ endif(ENABLE_PYTHON) - add_definitions(-DQWT_DLL) #setup QWT library linkage - add_library(gnuradio-qtgui SHARED ${qtgui_sources}) - target_link_libraries(gnuradio-qtgui ${qtgui_libs}) --GR_LIBRARY_FOO(gnuradio-qtgui RUNTIME_COMPONENT "qtgui_runtime" DEVEL_COMPONENT "qtgui_devel") -+GR_LIBRARY_FOO(gnuradio-qtgui) - - if(ENABLE_STATIC_LIBS) - if(ENABLE_GR_CTRLPORT) -@@ -199,6 +202,6 @@ if(ENABLE_STATIC_LIBS) - endif(NOT WIN32) - - install(TARGETS gnuradio-qtgui_static -- ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "qtgui_devel" # .lib file -+ ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file - ) - endif(ENABLE_STATIC_LIBS) -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 - //Added by qt3to4: - #include --#include - #include - - 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 7d9a3941c8..3f3bbf4405 100644 ---- a/gr-qtgui/lib/const_sink_c_impl.cc -+++ b/gr-qtgui/lib/const_sink_c_impl.cc -@@ -127,7 +127,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 084e2d4f34..0dee1fa18b 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 ffa4e3017c..c697e8c269 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 3fe2572eb0..046414ffaf 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 cd48de8666..13e50b217c 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 ba34eaaa32..ba1be4b7c3 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 17a4f78db4..73b6fcad83 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 cc13faf49a..1e2fe360b1 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 873bd68555..e4cbb0d38f 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 6fe06b74a0..b23a5468fc 100644 ---- a/gr-qtgui/lib/time_sink_c_impl.cc -+++ b/gr-qtgui/lib/time_sink_c_impl.cc -@@ -132,7 +132,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 1298c6c422..2b39b5536c 100644 ---- a/gr-qtgui/lib/time_sink_f_impl.cc -+++ b/gr-qtgui/lib/time_sink_f_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/vector_sink_f_impl.cc b/gr-qtgui/lib/vector_sink_f_impl.cc -index 6197da4949..fedef9654d 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 fbc655afba..4306b97d71 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 fdb8fde686..9789c2cf6d 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 1c20033db2..5df3a7d91b 100644 ---- a/gr-qtgui/python/qtgui/CMakeLists.txt -+++ b/gr-qtgui/python/qtgui/CMakeLists.txt -@@ -20,12 +20,20 @@ - ######################################################################## - 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) -+configure_file(util.py.cmakein "${CMAKE_CURRENT_BINARY_DIR}/util.py" @ONLY) -+ - GR_PYTHON_INSTALL( - FILES __init__.py -- range.py -- util.py -+ "${CMAKE_CURRENT_BINARY_DIR}/range.py" -+ "${CMAKE_CURRENT_BINARY_DIR}/util.py" - DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui -- COMPONENT "qtgui_python" - ) - - ######################################################################## -diff --git a/gr-qtgui/python/qtgui/range.py b/gr-qtgui/python/qtgui/range.py.cmakein -old mode 100755 -new mode 100644 -similarity index 93% -rename from gr-qtgui/python/qtgui/range.py -rename to gr-qtgui/python/qtgui/range.py.cmakein -index f60d6919bf..22d09254bf ---- a/gr-qtgui/python/qtgui/range.py -+++ b/gr-qtgui/python/qtgui/range.py.cmakein -@@ -21,7 +21,7 @@ - # Boston, MA 02110-1301, USA. - # - --from PyQt4 import Qt, QtCore, QtGui -+@PY_QT_IMPORT@ - import util - - class Range(object): -@@ -64,10 +64,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 -@@ -98,10 +98,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 - -@@ -124,10 +124,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 - -@@ -166,18 +166,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 - -@@ -196,10 +196,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 - -@@ -244,7 +244,7 @@ class RangeWidget(QtGui.QWidget): - - - if __name__ == "__main__": -- from PyQt4 import Qt -+ from PyQt5 import Qt - import sys - - def valueChanged(frequency): -diff --git a/gr-qtgui/python/qtgui/util.py b/gr-qtgui/python/qtgui/util.py.cmakein -similarity index 94% -rename from gr-qtgui/python/qtgui/util.py -rename to gr-qtgui/python/qtgui/util.py.cmakein -index d2e9495ac6..ec654d9ba2 100644 ---- a/gr-qtgui/python/qtgui/util.py -+++ b/gr-qtgui/python/qtgui/util.py.cmakein -@@ -21,15 +21,14 @@ - # Boston, MA 02110-1301, USA. - # - --from PyQt4 import Qt, QtCore, QtGui -+@PY_QT_IMPORT@ - from gnuradio import gr - - def check_set_qss(): -- app = QtGui.qApp -+ app = QtWidgets.qApp - qssfile = gr.prefs().get_string("qtgui","qss","") - if(len(qssfile)>0): - try: - app.setStyleSheet(open(qssfile).read()) - except: - print "WARNING: bad QSS file, %s"%(qssfile) -- -diff --git a/gr-qtgui/swig/CMakeLists.txt b/gr-qtgui/swig/CMakeLists.txt -index 44b5c2fbd4..2990ac9086 100644 ---- a/gr-qtgui/swig/CMakeLists.txt -+++ b/gr-qtgui/swig/CMakeLists.txt -@@ -51,12 +51,10 @@ GR_SWIG_MAKE(qtgui_swig qtgui_swig.i) - GR_SWIG_INSTALL( - TARGETS qtgui_swig - DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui -- COMPONENT "qtgui_python" - ) - - install(FILES - qtgui_swig.i - ${CMAKE_CURRENT_BINARY_DIR}/qtgui_swig_doc.i - DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig -- COMPONENT "qtgui_swig" - ) -diff --git a/grc/blocks/options.xml b/grc/blocks/options.xml -index 1dee986c5c..1ef1e9df5d 100644 ---- a/grc/blocks/options.xml -+++ b/grc/blocks/options.xml -@@ -16,7 +16,7 @@ from grc_gnuradio import wxgui as grc_wxgui - import wx - #end if - #if $generate_options() == 'qt_gui' --from PyQt4 import Qt -+from PyQt5 import Qt - import sys - #end if - #if not $generate_options().startswith('hb') -diff --git a/grc/core/generator/flow_graph.tmpl b/grc/core/generator/flow_graph.tmpl -index 1ef251c46b..9fdc1fbb63 100644 ---- a/grc/core/generator/flow_graph.tmpl -+++ b/grc/core/generator/flow_graph.tmpl -@@ -380,7 +380,7 @@ def main(top_block_cls=$(class_name), options=None): - #end if - #elif $generate_options == 'qt_gui' - from distutils.version import StrictVersion -- if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): -+ if StrictVersion("4.5.0") <= StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"): - style = gr.prefs().get_string('qtgui', 'style', 'raster') - Qt.QApplication.setGraphicsSystem(style) - qapp = Qt.QApplication(sys.argv) -@@ -401,7 +401,7 @@ def main(top_block_cls=$(class_name), options=None): - def quitting(): - tb.stop() - tb.wait() -- qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting) -+ qapp.aboutToQuit.connect(quitting) - #for $m in $monitors - if $m.has_param('en'): - if $m.get_param('en').get_value(): --- -2.11.0 - diff -Nru gnuradio-3.7.11/debian/patches/qtgui-pc-add-qt-qwt-details gnuradio-3.7.11/debian/patches/qtgui-pc-add-qt-qwt-details --- gnuradio-3.7.11/debian/patches/qtgui-pc-add-qt-qwt-details 2018-02-11 00:06:32.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/qtgui-pc-add-qt-qwt-details 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -From 0850ebc6d798ad3919e3faee542fce81cd363102 Mon Sep 17 00:00:00 2001 -From: "A. Maitland Bottoms" -Date: Tue, 21 Nov 2017 20:17:53 -0500 -Subject: [PATCH 22/27] qtgui pc add qt qwt details - ---- - gr-qtgui/CMakeLists.txt | 2 ++ - gr-qtgui/gnuradio-qtgui.pc.in | 4 ++-- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt -index ad10363c1e..9306a3eb50 100644 ---- a/gr-qtgui/CMakeLists.txt -+++ b/gr-qtgui/CMakeLists.txt -@@ -121,6 +121,8 @@ endif(ENABLE_PYTHON) - ######################################################################## - # Create Pkg Config File - ######################################################################## -+set( PC_LIBS "${QWT_LIBRARIES} ${QT_LIBRARIES}" ) -+string (REPLACE ";" " " PC_LIBS_STR "${PC_LIBS}") - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-qtgui.pc.in - ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-qtgui.pc -diff --git a/gr-qtgui/gnuradio-qtgui.pc.in b/gr-qtgui/gnuradio-qtgui.pc.in -index 8f0dcd53f7..2489caf214 100644 ---- a/gr-qtgui/gnuradio-qtgui.pc.in -+++ b/gr-qtgui/gnuradio-qtgui.pc.in -@@ -7,5 +7,5 @@ Name: gnuradio-qtgui - Description: GNU Radio blocks for QT GUI - Requires: gnuradio-runtime - Version: @LIBVER@ --Libs: -L${libdir} -lgnuradio-qtgui --Cflags: -I${includedir} -+Libs: -L${libdir} -lgnuradio-qtgui ${PC_LIBS_STR} -+Cflags: -I${includedir} -I${QWT_INCLUDE_DIRS} -I${QT_HEADERS_DIR} --- -2.11.0 - diff -Nru gnuradio-3.7.11/debian/patches/series gnuradio-3.7.11/debian/patches/series --- gnuradio-3.7.11/debian/patches/series 2018-02-11 00:06:32.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/series 2018-02-27 01:26:30.000000000 +0000 @@ -86,7 +86,35 @@ 0087-pmt-fix-for-error-in-pmt-equal-when-comparing-unifor.patch 0088-pmt-extract-lengths-before-memcmp-1598.patch 0089-runtime-address-floating-point-roundoff-concerns-in-.patch +0090-logging-updated-doxygen-with-section-about-how-to-us.patch +0091-channels-interpolate-dist-with-M_PI-not-2-M_PI.patch +0092-Fixes-1297-adds-grc-gui_hint-collision-detection.patch +0093-moves-gui_hint-logic-into-parsing-function-removes-G.patch +qt5-maint-0001-CMake-Update-required-minimum-version-to-2.8.12.patch +qt5-maint-0002-CMake-FindQwt-Find-the-Qt5-version-of-QWT-instead-of.patch +qt5-maint-0003-gr-qtgui-update-for-Qt5.patch +qt5-maint-0004-grc-Generate-Python-scripts-that-use-PyQt5.patch +qt5-maint-0005-gr-qtgui-Add-a-workaround-for-an-upstream-bug-of-uic.patch +qt5-maint-0006-qtgui-fixed-examples-for-Qt5-compatibility.patch +qt5-maint-0007-qtgui-Fixes-for-edit_box_msg-to-work-with-QT5.patch +qt5-maint-0008-gr-qtgui-Allow-build-with-Qt4-or-Qt5-default.patch +qt5-maint-0009-gr-qtgui-Fix-PyQt-4-5-include-in-XMLs-for-GRC.patch +qt5-maint-0010-gr-qtgui-Fix-range.py-to-work-with-both-Qt4-and-Qt5.patch +qt5-maint-0011-gr-qtgui-Re-introduce-some-Qt4-specific-code.patch +qt5-maint-0012-grc-Fix-generation-of-Python-code-for-Qt4-and-Qt5.patch +qt5-maint-0013-grc-replace-templated-xml-files-with-search-and-repl.patch +qt5-maint-0014-qtgui-replace-templated-xml-files-with-search-and-re.patch +qt5-maint-0015-fixed-the-FindQwt-to-prefer-pkgconfig-for-qt5-qwt.patch +qt5-maint-0016-Revert-fixed-the-FindQwt-to-prefer-pkgconfig-for-qt5.patch +qt5-maint-0017-qtgui-fix-stylesheet-for-qt5.patch +qt5-maint-0018-qtgui-Expose-qt-time-sink-stem-plot-option.patch +qt5-maint-0019-qtgui-fixed-apps-for-Qt5-compatibility.patch +qt5-maint-0020-qtgui-pc-add-qt-qwt-details.patch +qt5-maint-0021-gnuradio-runtime-ctrlport-qt5.patch +qt5-maint-0022-gr-uhd-qt5.patch +qt5-maint-0023-gr-qtgui-util.patch usr-bin-examples +direct-freedesktop-install bsd-shm bsd-hurd-alsa bsd-hurd-no-thread-affinity @@ -107,10 +135,5 @@ fix-declaration-of-dc-so-that-header-file-compiles runtime-replace-std-auto_ptr-usage-with-std-unique_p doxygen-reproducible-settings -qtgui-pc-add-qt-qwt-details -gnuradio-runtime-ctrlport-qt5 -gr-qtgui-qt5 -gr-uhd-qt5 -qt5-refactor-qt5-onto-maint-branch Fix-AttributeError-NoneType-object-has-no-attribute- debian-soname diff -Nru gnuradio-3.7.11/debian/patches/usr-bin-examples gnuradio-3.7.11/debian/patches/usr-bin-examples --- gnuradio-3.7.11/debian/patches/usr-bin-examples 2018-02-11 00:06:32.000000000 +0000 +++ gnuradio-3.7.11/debian/patches/usr-bin-examples 2018-02-20 01:38:28.000000000 +0000 @@ -14,11 +14,9 @@ gr-uhd/examples/c++/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) -diff --git a/gr-audio/examples/c++/CMakeLists.txt b/gr-audio/examples/c++/CMakeLists.txt -index 205bdeb287..83a6bbcf3b 100644 --- a/gr-audio/examples/c++/CMakeLists.txt +++ b/gr-audio/examples/c++/CMakeLists.txt -@@ -30,6 +30,6 @@ target_link_libraries(dial_tone +@@ -30,6 +30,6 @@ INSTALL(TARGETS dial_tone @@ -26,11 +24,9 @@ + DESTINATION ${GR_RUNTIME_DIR} COMPONENT "audio_examples" ) -diff --git a/gr-fcd/examples/c++/CMakeLists.txt b/gr-fcd/examples/c++/CMakeLists.txt -index 346e95db3f..edf97c21d1 100644 --- a/gr-fcd/examples/c++/CMakeLists.txt +++ b/gr-fcd/examples/c++/CMakeLists.txt -@@ -32,6 +32,6 @@ target_link_libraries(fcd_nfm_rx +@@ -32,6 +32,6 @@ INSTALL(TARGETS fcd_nfm_rx @@ -38,11 +34,9 @@ + DESTINATION ${GR_RUNTIME_DIR} COMPONENT "fcd_examples" ) -diff --git a/gr-qtgui/examples/c++/CMakeLists.txt b/gr-qtgui/examples/c++/CMakeLists.txt -index 239b5dbf42..49c41a0c64 100644 --- a/gr-qtgui/examples/c++/CMakeLists.txt +++ b/gr-qtgui/examples/c++/CMakeLists.txt -@@ -43,6 +43,6 @@ target_link_libraries(display_qt ${QTGUI_LIBRARIES}) +@@ -50,6 +50,6 @@ INSTALL(TARGETS display_qt @@ -50,11 +44,9 @@ + DESTINATION ${GR_RUNTIME_DIR} COMPONENT "qtgui_examples" ) -diff --git a/gr-uhd/examples/c++/CMakeLists.txt b/gr-uhd/examples/c++/CMakeLists.txt -index 655ef0c0a9..414dd74fe0 100644 --- a/gr-uhd/examples/c++/CMakeLists.txt +++ b/gr-uhd/examples/c++/CMakeLists.txt -@@ -39,6 +39,6 @@ target_link_libraries(tags_demo gnuradio-uhd) +@@ -39,6 +39,6 @@ INSTALL(TARGETS tags_demo @@ -62,6 +54,3 @@ + DESTINATION ${GR_RUNTIME_DIR} COMPONENT "uhd_examples" ) --- -2.11.0 -