forked from pool/gnuradio
Accepting request 731101 from home:StefanBruens:branches:hardware:sdr
Update to GR 3.8.0.0 OBS-URL: https://build.opensuse.org/request/show/731101 OBS-URL: https://build.opensuse.org/package/show/hardware:sdr/gnuradio?expand=0&rev=37
This commit is contained in:
parent
35deb06532
commit
3c308b0d0c
@ -1,24 +0,0 @@
|
||||
From a7f7123b32b00408cd32b34c479b3bc23c3ec359 Mon Sep 17 00:00:00 2001
|
||||
From: Christophe Giboudeaux <christophe@krop.fr>
|
||||
Date: Mon, 29 Apr 2019 12:53:48 +0200
|
||||
Subject: [PATCH] Add the include path used by the openSUSE package.
|
||||
|
||||
---
|
||||
cmake/Modules/FindQwt.cmake | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake
|
||||
index 2b83fbf..5d54a2b 100644
|
||||
--- a/cmake/Modules/FindQwt.cmake
|
||||
+++ b/cmake/Modules/FindQwt.cmake
|
||||
@@ -19,6 +19,7 @@ find_path(QWT_INCLUDE_DIRS
|
||||
PATHS
|
||||
/usr/local/include/qwt-qt5
|
||||
/usr/local/include/qwt
|
||||
+ /usr/include/qt5/qwt6
|
||||
/usr/include/qwt6
|
||||
/usr/include/qwt-qt5
|
||||
/usr/include/qwt
|
||||
--
|
||||
2.21.0
|
||||
|
@ -12,9 +12,9 @@
|
||||
<arch>aarch64</arch>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<physicalmemory>
|
||||
<memory>
|
||||
<size unit="G">8</size>
|
||||
</physicalmemory>
|
||||
</memory>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
</constraints>
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:da8fc1e40cd6ca689e0192501c6b196bdd89041a3f5e18863384c4061b7ffcc5
|
||||
size 2976120
|
@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEE000aH0pECI3rcAheoGxtld/HFHUFAly67T8ACgkQoGxtld/H
|
||||
FHWkYQ/+MncZumZhTdhjUZMzlyVC2nOLoEcyWyOYuB27KC0/1NMVBztw6plKcxCO
|
||||
zpkb02kL3U3Vt4HA9uiOZsZYlodCQGO9E5ZFL5DadbGV3z4B3RvJTJg+ElY73hHn
|
||||
WnfSw706mT4SZUvnjQp6UZmmnSQlIQGiCiOeJHFEstPGD+Ct5t+azt+pLrwhNxwo
|
||||
XAu7iymGfJUEDR94f6qkKm/aUz9C6aXV/0L5zZufWHVUN4SzgiE+zbGI2GnF9esC
|
||||
wD/8gY1GdvjDB0CgDz/8qk9scXGlVzZHEfdQ8r71ju91IFj/cCW9ARaPbo7sw5b6
|
||||
gX967mH3snK3azcrOb3p6ro949DGwRKF9kKPXrDlnedx2Lbk/q88iy3+prpJBKQo
|
||||
FLfzJ/1WZylOzikTfu38AjrBTomWHBl6skObfWbqW86RsirUNmmdbZ/emFYWkblY
|
||||
AB/pC+PMHjf/9mMrN7Pybhxb1rSpGWvXyVvsnk2WGYVwOUbSpJn5kk4qno3npY5s
|
||||
J8PejgW1xneQ8rUOp+HBPSwSgfh1n4XsXydWYnJ9uYzqmj5JXgWV1jOSbv3rPHa6
|
||||
7imAeMokGZt0Cm/PtgPhVkoclpEMx9mtHgUgMO06trw3Q/Jh3W4GOW9ovviUTniL
|
||||
SEeh5FT4gdOAnuGBmpn2H/MKx5+qGT83FRzMTgDzRjguFZO+byQ=
|
||||
=9lgb
|
||||
-----END PGP SIGNATURE-----
|
3
gnuradio-3.8.0.0.tar.xz
Normal file
3
gnuradio-3.8.0.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1980b4b5c29679b1c8d0804032e412c9a9cae8dd27362cbe032b9152dc2b852b
|
||||
size 2431028
|
16
gnuradio-3.8.0.0.tar.xz.asc
Normal file
16
gnuradio-3.8.0.0.tar.xz.asc
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEE000aH0pECI3rcAheoGxtld/HFHUFAl1N6F0ACgkQoGxtld/H
|
||||
FHWY5g//eoyW08JiZ8v8tR5hKwGYLI6t9hNW1R+8oJ5d/BXwT+Feso5rMe7eSQMq
|
||||
oQv6sKK4dn+YsC3VvHIZXdP0OQPbQk+LH86Vf1ZYCNgyfQztUjMl+ypGqf4ZXTqm
|
||||
o7kqoX+iBOZBWqNdTq4117/zkURrDVGWHkle0mH7hLKxbJviqjqcS6SPbYqtkV8e
|
||||
hII6HZDZlVxtuwbzIZ6++fn3YlmJMD0oGx2iaCY47NDqaRcHqKiV2leBbFcWoCW4
|
||||
upezaBUIBh7cJD/YlK48TQW6MC5t0NkrpdVBL5Cos+ZI2wlpJMG/pKtADwJdANnu
|
||||
9bu0SlMTW34uFT6N9uGm390LYnrYwWEGXXLByux3VbgUplBswmZl8kxCs0IPpxbe
|
||||
Djse1msVbKiA+j2rUZbmDfBinIhzeC2fpO+bIcFmSjaratlX19yLSyo80AMQ2BQA
|
||||
WYM679jmTCNIzby7AWBysk+HTLTwEFeuLEyq+L2hOMxX0X/j7P0LdCBT89oN4VPH
|
||||
jJNUp6FkTtEAbZ8ITPULUXVFw+oAl8lWvN7p10Ic4nvTTHmbw2lwphoIwRTQ+H2i
|
||||
d3sxXTzW1bRsErgE35G4nFAGwRjvGl2MTkzz7t5qv4YUIiQmMwugCO+LPmDM1/xc
|
||||
CJv6nCeUVMxrwhugf4AjRToVaLRTetWr5miNLCFAp5zGGT1Bj6o=
|
||||
=iwXp
|
||||
-----END PGP SIGNATURE-----
|
@ -1,3 +1,80 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 12 16:49:33 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- Update to version 3.8.0.0:
|
||||
* Changed on Project Scope
|
||||
+ C++11
|
||||
+ merged the wholeness of the next branch
|
||||
+ Dependency version bumps: CMake, GCC, MSVC, Swig, Boost
|
||||
+ New dependencies: MPIR/GMP, Qt5, gsm, codec2
|
||||
+ Removed dependencies: libusb, Qt4, CppUnit
|
||||
+ Python: Python 2 & Python 3 compatible. 3.8 will be the last Py2k-compatible
|
||||
+ release series
|
||||
+ gengen was replaced by templates (if you don't know gengen, don't do any
|
||||
+ research; save yourself that sorrow)
|
||||
+ Modern CMake (as far as feasible at this point)
|
||||
+ VOLK version updated to v2.0.0
|
||||
+ .clang-format file now dictates coding style
|
||||
+ clang-format'ed the whole tree.
|
||||
+ installed CMake files now tell about configuration
|
||||
* gnuradio-runtime
|
||||
+ reworked fractional tag time handling, especially in the context of resamplers
|
||||
* GRC
|
||||
+ C++ generation as option
|
||||
+ YAML instead of XML
|
||||
+ removed blks2
|
||||
+ much better canvas tooling
|
||||
+ consistent gobject usage
|
||||
+ ROUNDED ARROWS
|
||||
* gr-qtgui
|
||||
+ moving from Qt4 to Qt5
|
||||
* gr-utils
|
||||
+ gr_modtool now vastly improved
|
||||
* gr-vocoder
|
||||
+ improved versatility
|
||||
+ removed in-tree libgsm, libcodec2, use system-wide libs
|
||||
* Removed
|
||||
+ Project Scope: Modules gr-comedi, gr-fcd and gr-wxgui are gone
|
||||
+ gr-comedi: nobody could remember who used this, or for what. It has seen 0
|
||||
active code contributions in the 3.7 lifecycle
|
||||
+ gr-digital: python-based packet_encoder and related tools: Bugs that were
|
||||
sporadic and never fixed, so after long deprecation, we're removing it
|
||||
+ gr-fcd: since it's currently untestable by the CI, it's being removed, as
|
||||
there was no code contributions. Generally, we strive to include all
|
||||
batteries with GNU Radio. Re-integration within a more general SDR interface
|
||||
would be desirable.
|
||||
+ gr-utils: removed PyQwt (dead) based tools
|
||||
+ gr-wxgui: Unmaintained, breaks on increasingly many systems, always was slower than
|
||||
Qtgui. We've been starting to tell people to migrate to Qt since at
|
||||
least 2015. Now, we're finally removing it.
|
||||
- Packaging changes:
|
||||
* Use system libvolk, now packaged separately
|
||||
* Cleanup spec file, mostly Qt4 and WxWidgets related
|
||||
* Use Python3
|
||||
* Patches:
|
||||
- rebased missing_libraries.patch
|
||||
- Drop obsolete qt5-maint-0001-CMake-Update-required-minimum-version-to-2.8.12.patch
|
||||
- Drop obsolete qt5-maint-0002-CMake-FindQwt-Find-the-Qt5-version-of-QWT-instead-of.patch
|
||||
- Drop obsolete qt5-maint-0003-gr-qtgui-update-for-Qt5.patch
|
||||
- Drop obsolete qt5-maint-0004-grc-Generate-Python-scripts-that-use-PyQt5.patch
|
||||
- Drop obsolete qt5-maint-0005-gr-qtgui-Add-a-workaround-for-an-upstream-bug-of-uic.patch
|
||||
- Drop obsolete qt5-maint-0006-qtgui-fixed-examples-for-Qt5-compatibility.patch
|
||||
- Drop obsolete qt5-maint-0007-qtgui-Fixes-for-edit_box_msg-to-work-with-QT5.patch
|
||||
- Drop obsolete qt5-maint-0008-gr-qtgui-Allow-build-with-Qt4-or-Qt5-default.patch
|
||||
- Drop obsolete qt5-maint-0009-gr-qtgui-Fix-PyQt-4-5-include-in-XMLs-for-GRC.patch
|
||||
- Drop obsolete qt5-maint-0010-gr-qtgui-Fix-range.py-to-work-with-both-Qt4-and-Qt5.patch
|
||||
- Drop obsolete qt5-maint-0011-gr-qtgui-Re-introduce-some-Qt4-specific-code.patch
|
||||
- Drop obsolete qt5-maint-0012-grc-Fix-generation-of-Python-code-for-Qt4-and-Qt5.patch
|
||||
- Drop obsolete qt5-maint-0013-grc-replace-templated-xml-files-with-search-and-repl.patch
|
||||
- Drop obsolete qt5-maint-0014-qtgui-replace-templated-xml-files-with-search-and-re.patch
|
||||
- Drop obsolete qt5-maint-0017-qtgui-fix-stylesheet-for-qt5.patch
|
||||
- Drop obsolete qt5-maint-0019-qtgui-fixed-apps-for-Qt5-compatibility.patch
|
||||
- Drop obsolete qt5-maint-0021-gnuradio-runtime-ctrlport-qt5.patch
|
||||
- Drop obsolete qt5-maint-0022-gr-uhd-qt5.patch
|
||||
- Drop obsolete qt5-maint-0023-gr-qtgui-util.patch
|
||||
- Drop obsolete qt5-maint-0024-gr-qtgui-restoreGeometry.patch
|
||||
- Drop obsolete 0001-Add-the-include-path-used-by-the-openSUSE-package.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 29 11:35:24 UTC 2019 - Christophe Giboudeaux <christophe@krop.fr>
|
||||
|
||||
|
282
gnuradio.spec
282
gnuradio.spec
@ -16,108 +16,80 @@
|
||||
#
|
||||
|
||||
|
||||
%define sover 3_7_12-0_0_0
|
||||
%define sover_volk 1_4
|
||||
%define volk_version 1.4
|
||||
%bcond_without docs
|
||||
|
||||
%define sover 3_8_0-0_0_0
|
||||
Name: gnuradio
|
||||
Version: 3.7.13.5
|
||||
Version: 3.8.0.0
|
||||
Release: 0
|
||||
Summary: GNU software radio
|
||||
License: GPL-3.0-or-later
|
||||
Group: Productivity/Hamradio/Other
|
||||
URL: http://gnuradio.org
|
||||
URL: https://gnuradio.org
|
||||
Source0: https://github.com/gnuradio/gnuradio/releases/download/v%{version}/gnuradio-%{version}.tar.xz
|
||||
Source1: https://github.com/gnuradio/gnuradio/releases/download/v%{version}/gnuradio-%{version}.tar.xz.asc
|
||||
Source2: %{name}.keyring
|
||||
Source3: https://github.com/gnuradio/volk/archive/v%{volk_version}.tar.gz#/volk-%{volk_version}.tar.gz
|
||||
# http://www.nathanwest.us/grc_to_37.sh
|
||||
Source4: grc_to_37.sh
|
||||
Source99: %{name}-rpmlintrc
|
||||
Patch0: missing_library.patch
|
||||
# PATCH 100-120 Qt5 port patches
|
||||
Patch100: qt5-maint-0001-CMake-Update-required-minimum-version-to-2.8.12.patch
|
||||
Patch101: qt5-maint-0002-CMake-FindQwt-Find-the-Qt5-version-of-QWT-instead-of.patch
|
||||
Patch102: qt5-maint-0003-gr-qtgui-update-for-Qt5.patch
|
||||
Patch103: qt5-maint-0004-grc-Generate-Python-scripts-that-use-PyQt5.patch
|
||||
Patch104: qt5-maint-0005-gr-qtgui-Add-a-workaround-for-an-upstream-bug-of-uic.patch
|
||||
Patch105: qt5-maint-0006-qtgui-fixed-examples-for-Qt5-compatibility.patch
|
||||
Patch106: qt5-maint-0007-qtgui-Fixes-for-edit_box_msg-to-work-with-QT5.patch
|
||||
Patch107: qt5-maint-0008-gr-qtgui-Allow-build-with-Qt4-or-Qt5-default.patch
|
||||
Patch108: qt5-maint-0009-gr-qtgui-Fix-PyQt-4-5-include-in-XMLs-for-GRC.patch
|
||||
Patch109: qt5-maint-0010-gr-qtgui-Fix-range.py-to-work-with-both-Qt4-and-Qt5.patch
|
||||
Patch110: qt5-maint-0011-gr-qtgui-Re-introduce-some-Qt4-specific-code.patch
|
||||
Patch111: qt5-maint-0012-grc-Fix-generation-of-Python-code-for-Qt4-and-Qt5.patch
|
||||
Patch112: qt5-maint-0013-grc-replace-templated-xml-files-with-search-and-repl.patch
|
||||
Patch113: qt5-maint-0014-qtgui-replace-templated-xml-files-with-search-and-re.patch
|
||||
Patch114: qt5-maint-0017-qtgui-fix-stylesheet-for-qt5.patch
|
||||
Patch115: qt5-maint-0019-qtgui-fixed-apps-for-Qt5-compatibility.patch
|
||||
Patch116: qt5-maint-0021-gnuradio-runtime-ctrlport-qt5.patch
|
||||
Patch117: qt5-maint-0022-gr-uhd-qt5.patch
|
||||
Patch118: qt5-maint-0023-gr-qtgui-util.patch
|
||||
Patch119: qt5-maint-0024-gr-qtgui-restoreGeometry.patch
|
||||
#PATCH-FIX-OPENSUSE 0001-Add-the-include-path-used-by-the-openSUSE-package.patch
|
||||
Patch120: 0001-Add-the-include-path-used-by-the-openSUSE-package.patch
|
||||
BuildRequires: alsa-devel
|
||||
%if 0%{?suse_version} > 1325
|
||||
BuildRequires: libboost_filesystem-devel
|
||||
BuildRequires: libboost_system-devel
|
||||
%else
|
||||
BuildRequires: boost-devel
|
||||
%endif
|
||||
BuildRequires: cmake
|
||||
BuildRequires: cmake >= 3.8
|
||||
BuildRequires: cppunit-devel
|
||||
BuildRequires: cppzmq-devel
|
||||
%if %{with docs}
|
||||
BuildRequires: doxygen
|
||||
# TeX is required for formula rendering
|
||||
BuildRequires: texlive-dvips
|
||||
BuildRequires: texlive-latex
|
||||
BuildRequires: tex(newunicodechar.sty)
|
||||
%endif
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: fftw3-threads-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: gsl-devel
|
||||
BuildRequires: libSDL-devel
|
||||
BuildRequires: libboost_atomic-devel >= 1.53
|
||||
BuildRequires: libboost_filesystem-devel >= 1.53
|
||||
BuildRequires: libboost_system-devel
|
||||
BuildRequires: libgsm-devel
|
||||
BuildRequires: libjack-devel
|
||||
BuildRequires: libxslt-python
|
||||
BuildRequires: libmpir-devel
|
||||
BuildRequires: log4cpp-devel
|
||||
BuildRequires: memory-constraints
|
||||
BuildRequires: orc
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: portaudio-devel
|
||||
BuildRequires: python-Cheetah
|
||||
BuildRequires: python-Sphinx
|
||||
BuildRequires: python-gtk
|
||||
BuildRequires: python-lxml
|
||||
BuildRequires: python-mako
|
||||
BuildRequires: python-numpy
|
||||
%if 0%{?suse_version} > 1500
|
||||
BuildRequires: python-qt5-devel
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-Sphinx
|
||||
BuildRequires: python3-click
|
||||
BuildRequires: python3-click-plugins
|
||||
BuildRequires: python3-gobject
|
||||
BuildRequires: python3-gobject-cairo
|
||||
BuildRequires: python3-mako >= 0.9.1
|
||||
BuildRequires: python3-numpy
|
||||
BuildRequires: python3-pyaml >= 3.11
|
||||
BuildRequires: python3-pycairo
|
||||
BuildRequires: python3-qt5-devel
|
||||
BuildRequires: python3-six
|
||||
BuildRequires: qwt6-qt5-devel
|
||||
%else
|
||||
BuildRequires: python-qt4-devel
|
||||
BuildRequires: qwt6-devel
|
||||
%endif
|
||||
BuildRequires: swig
|
||||
BuildRequires: texlive-dvips
|
||||
BuildRequires: texlive-latex
|
||||
BuildRequires: swig >= 3.0.8
|
||||
BuildRequires: uhd-devel
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: pkgconfig(codec2)
|
||||
BuildRequires: pkgconfig(libusb-1.0)
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
# Workaround for openssl migration
|
||||
#!BuildIgnore: openssl-1_0_0
|
||||
Requires: python
|
||||
Requires: python-Cheetah
|
||||
Requires: python-gtk
|
||||
Requires: python-lxml
|
||||
Requires: python-numpy
|
||||
%if 0%{?suse_version} > 1500
|
||||
Requires: python-qt5
|
||||
%else
|
||||
Requires: python-qt4
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} > 1320
|
||||
BuildRequires: python-wxWidgets-3_0
|
||||
%else
|
||||
BuildRequires: python-wxWidgets
|
||||
%endif
|
||||
BuildRequires: pkgconfig(volk) >= 2.0
|
||||
BuildRequires: typelib(Gtk) = 3.0
|
||||
BuildRequires: typelib(PangoCairo) = 1.0
|
||||
BuildRequires: typelib(cairo) = 1.0
|
||||
Requires: python3-numpy
|
||||
Requires: python3-qt5
|
||||
# gr_modtool dependencies
|
||||
Requires: python3-click
|
||||
Requires: python3-click-plugins
|
||||
Requires: python3-mako
|
||||
|
||||
%description
|
||||
GNU Radio is a collection of software that when combined with minimal
|
||||
@ -126,24 +98,6 @@ transmitted and received are defined by software. What this means is
|
||||
that it turns the digital modulation schemes used in today's high
|
||||
performance wireless devices into software problems.
|
||||
|
||||
%package wxgui
|
||||
Summary: Libraries for GNU Radio
|
||||
Group: System/Libraries
|
||||
%if 0%{?suse_version} > 1320
|
||||
Requires: python-wxWidgets-3_0
|
||||
%else
|
||||
Requires: python-wxWidgets
|
||||
%endif
|
||||
|
||||
%description wxgui
|
||||
GNU Radio is a collection of software that when combined with minimal
|
||||
hardware, allows the construction of radios where the actual waveforms
|
||||
transmitted and received are defined by software. What this means is
|
||||
that it turns the digital modulation schemes used in today's high
|
||||
performance wireless devices into software problems.
|
||||
|
||||
This package contains the wxgui blocks
|
||||
|
||||
%package -n libgnuradio-%{sover}
|
||||
Summary: Libraries for GNU Radio
|
||||
Group: System/Libraries
|
||||
@ -158,25 +112,11 @@ performance wireless devices into software problems.
|
||||
|
||||
This package contains the libraries for GNU Radio.
|
||||
|
||||
%package -n libvolk%{sover_volk}
|
||||
Summary: Libraries for GNU Radio
|
||||
Group: System/Libraries
|
||||
Conflicts: libgnuradio0
|
||||
Obsoletes: libvolk0_0_0
|
||||
|
||||
%description -n libvolk%{sover_volk}
|
||||
GNU Radio is a collection of software that when combined with minimal
|
||||
hardware, allows the construction of radios where the actual waveforms
|
||||
transmitted and received are defined by software. What this means is
|
||||
that it turns the digital modulation schemes used in today's high
|
||||
performance wireless devices into software problems.
|
||||
|
||||
This package contains the Vector-Optimized Library of Kernels (VOLK)
|
||||
|
||||
%package devel
|
||||
Summary: Deveopment files for GNU Radio
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{name} = %{version}
|
||||
Requires: gmp-devel
|
||||
|
||||
%description devel
|
||||
GNU Radio is a collection of software that when combined with minimal
|
||||
@ -217,47 +157,9 @@ performance wireless devices into software problems.
|
||||
|
||||
This package contains some examples of using GNU Radio.
|
||||
|
||||
%package examples-wxgui
|
||||
Summary: GNU Radio wxgui examples
|
||||
Group: Productivity/Hamradio/Other
|
||||
Requires: %{name}-wxgui = %{version}
|
||||
|
||||
%description examples-wxgui
|
||||
GNU Radio is a collection of software that when combined with minimal
|
||||
hardware, allows the construction of radios where the actual waveforms
|
||||
transmitted and received are defined by software. What this means is
|
||||
that it turns the digital modulation schemes used in today's high
|
||||
performance wireless devices into software problems.
|
||||
|
||||
This package contains the examples of using GNU Radio depending on wxWidgets.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
tar xzf %{SOURCE3} -C volk/ --strip-components=1
|
||||
%patch0 -p1
|
||||
%if 0%{?suse_version} > 1500
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
%patch106 -p1
|
||||
%patch107 -p1
|
||||
%patch108 -p1
|
||||
%patch109 -p1
|
||||
%patch110 -p1
|
||||
%patch111 -p1
|
||||
%patch112 -p1
|
||||
%patch113 -p1
|
||||
%patch114 -p1
|
||||
%patch115 -p1
|
||||
%patch116 -p1
|
||||
%patch117 -p1
|
||||
%patch118 -p1
|
||||
%patch119 -p1
|
||||
%patch120 -p1
|
||||
%endif
|
||||
|
||||
# remove buildtime from documentation
|
||||
sed -i 's|^HTML_TIMESTAMP = YES|HTML_TIMESTAMP = NO|' docs/doxygen/Doxyfile.in
|
||||
@ -265,12 +167,13 @@ sed -i 's|^HTML_TIMESTAMP = YES|HTML_TIMESTAMP = NO|' docs/doxyg
|
||||
|
||||
%build
|
||||
%limit_build -m 2000
|
||||
%ifnarch armv6l armv6hl
|
||||
%cmake
|
||||
%else
|
||||
%cmake -Dhave_mfpu_neon=0
|
||||
%cmake \
|
||||
%ifarch armv6l armv6hl
|
||||
-Dhave_mfpu_neon=0 \
|
||||
%endif
|
||||
%make_jobs
|
||||
-DGR_PYTHON_DIR=%{python3_sitearch} \
|
||||
-DENABLE_INTERNAL_VOLK:BOOL=OFF
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
@ -278,40 +181,20 @@ sed -i 's|^HTML_TIMESTAMP = YES|HTML_TIMESTAMP = NO|' docs/doxyg
|
||||
install -d %{buildroot}%{_docdir}/%{name}
|
||||
mv %{buildroot}/%{_datadir}/doc/%{name}-*/* %{buildroot}%{_docdir}/%{name}/
|
||||
|
||||
# recompile python modules to avoid timestamp problems
|
||||
%py_compile %{buildroot}%{python_sitearch}
|
||||
%py_compile -O %{buildroot}%{python_sitearch}
|
||||
|
||||
# install icons and desktop file
|
||||
install -Dpm 0644 %{buildroot}%{_datadir}/gnuradio/grc/freedesktop/grc-icon-32.png \
|
||||
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/gnuradio-grc.png
|
||||
install -Dpm 0644 %{buildroot}%{_datadir}/gnuradio/grc/freedesktop/grc-icon-48.png \
|
||||
%{buildroot}%{_datadir}/icons/hicolor/48x48/apps/gnuradio-grc.png
|
||||
install -Dpm 0644 %{buildroot}%{_datadir}/gnuradio/grc/freedesktop/grc-icon-64.png \
|
||||
%{buildroot}%{_datadir}/icons/hicolor/64x64/apps/gnuradio-grc.png
|
||||
install -Dpm 0644 %{buildroot}%{_datadir}/gnuradio/grc/freedesktop/grc-icon-128.png \
|
||||
%{buildroot}%{_datadir}/icons/hicolor/128x128/apps/gnuradio-grc.png
|
||||
install -Dpm 0644 %{buildroot}%{_datadir}/gnuradio/grc/freedesktop/grc-icon-256.png \
|
||||
%{buildroot}%{_datadir}/icons/hicolor/256x256/apps/gnuradio-grc.png
|
||||
|
||||
install -Dpm 0644 %{buildroot}%{_datadir}/gnuradio/grc/freedesktop/gnuradio-grc.desktop \
|
||||
%{buildroot}%{_datadir}/applications/gnuradio-grc.desktop
|
||||
%suse_update_desktop_file -r %{buildroot}%{_datadir}/applications/gnuradio-grc.desktop Network HamRadio
|
||||
|
||||
install -Dpm 0755 %{SOURCE4} %{buildroot}/%{_bindir}
|
||||
|
||||
#remove unneeded stuff
|
||||
# remove duplicate icons (just keep hicolor)
|
||||
rm -rf %{buildroot}%{_datadir}/%{name}/grc/freedesktop
|
||||
rm -rf %{buildroot}%{_prefix}/libexec
|
||||
rm -rf %{buildroot}%{_datadir}/icons/gnome
|
||||
|
||||
%fdupes -s %{buildroot}%{_docdir}
|
||||
%fdupes -s %{buildroot}%{_includedir}
|
||||
%fdupes -s %{buildroot}%{_libdir}
|
||||
%fdupes %{buildroot}%{_docdir}
|
||||
%fdupes %{buildroot}%{_includedir}
|
||||
%fdupes %{buildroot}%{_libdir}
|
||||
|
||||
%post -n libgnuradio-%{sover} -p /sbin/ldconfig
|
||||
%post -n libvolk%{sover_volk} -p /sbin/ldconfig
|
||||
%postun -n libgnuradio-%{sover} -p /sbin/ldconfig
|
||||
%postun -n libvolk%{sover_volk} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
@ -323,7 +206,8 @@ rm -rf %{buildroot}%{_prefix}/libexec
|
||||
%{_datadir}/gnuradio/fec/
|
||||
%{_datadir}/icons/hicolor/*/apps/gnuradio-grc.png
|
||||
%{_datadir}/applications/gnuradio-grc.desktop
|
||||
%{python_sitearch}/*
|
||||
%{_datadir}/mime/packages/gnuradio-grc.xml
|
||||
%{python3_sitearch}/*
|
||||
%dir %{_sysconfdir}/gnuradio
|
||||
%dir %{_sysconfdir}/gnuradio/conf.d
|
||||
%config(noreplace) %{_sysconfdir}/gnuradio/conf.d/*.conf
|
||||
@ -335,40 +219,16 @@ rm -rf %{buildroot}%{_prefix}/libexec
|
||||
%exclude %{_docdir}/%{name}/xml/
|
||||
%exclude %{_docdir}/%{name}/*.py
|
||||
%exclude %{_docdir}/%{name}/*.grc
|
||||
# wxgui package
|
||||
%exclude %{python_sitearch}/gnuradio/wxgui/
|
||||
%exclude %{_datadir}/gnuradio/grc/blocks/wxgui*.xml
|
||||
%exclude %{_datadir}/gnuradio/grc/blocks/notebook.xml
|
||||
%exclude %{_datadir}/gnuradio/grc/blocks/variable_check_box.xml
|
||||
%exclude %{_datadir}/gnuradio/grc/blocks/variable_chooser.xml
|
||||
%exclude %{_datadir}/gnuradio/grc/blocks/variable_slider.xml
|
||||
%exclude %{_datadir}/gnuradio/grc/blocks/variable_static_text.xml
|
||||
%exclude %{_datadir}/gnuradio/grc/blocks/variable_text_box.xml
|
||||
|
||||
%files wxgui
|
||||
%{python_sitearch}/gnuradio/wxgui/
|
||||
%{_datadir}/gnuradio/grc/blocks/wxgui*.xml
|
||||
%{_datadir}/gnuradio/grc/blocks/notebook.xml
|
||||
%{_datadir}/gnuradio/grc/blocks/variable_check_box.xml
|
||||
%{_datadir}/gnuradio/grc/blocks/variable_chooser.xml
|
||||
%{_datadir}/gnuradio/grc/blocks/variable_slider.xml
|
||||
%{_datadir}/gnuradio/grc/blocks/variable_static_text.xml
|
||||
%{_datadir}/gnuradio/grc/blocks/variable_text_box.xml
|
||||
|
||||
%files -n libgnuradio-%{sover}
|
||||
%{_libdir}/libgnuradio*.so.*
|
||||
|
||||
%files -n libvolk%{sover_volk}
|
||||
%{_libdir}/libvolk*.so.*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/%{name}/
|
||||
%{_includedir}/pmt/
|
||||
%{_includedir}/volk/
|
||||
%{_libdir}/lib*.so
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_libdir}/cmake/gnuradio/
|
||||
%{_libdir}/cmake/volk/
|
||||
|
||||
%files doc
|
||||
%dir %{_docdir}/%{name}
|
||||
@ -379,35 +239,5 @@ rm -rf %{buildroot}%{_prefix}/libexec
|
||||
|
||||
%files examples
|
||||
%{_datadir}/gnuradio/examples/
|
||||
%exclude %{_datadir}/gnuradio/examples/audio/audio_fft.py
|
||||
%exclude %{_datadir}/gnuradio/examples/hf_explorer/
|
||||
%exclude %{_datadir}/gnuradio/examples/hf_radio/
|
||||
%exclude %{_datadir}/gnuradio/examples/noaa/usrp_rx_hrpt.grc
|
||||
%exclude %{_datadir}/gnuradio/examples/uhd/fm_tx4.py
|
||||
%exclude %{_datadir}/gnuradio/examples/uhd/usrp_am_mw_rcv.py
|
||||
%exclude %{_datadir}/gnuradio/examples/uhd/usrp_nbfm_ptt.py
|
||||
%exclude %{_datadir}/gnuradio/examples/uhd/usrp_nbfm_rcv.py
|
||||
%exclude %{_datadir}/gnuradio/examples/uhd/usrp_tv_rcv.py
|
||||
%exclude %{_datadir}/gnuradio/examples/uhd/usrp_wfm_rcv_fmdet.py
|
||||
%exclude %{_datadir}/gnuradio/examples/uhd/usrp_wfm_rcv_pll.py
|
||||
%exclude %{_datadir}/gnuradio/examples/uhd/usrp_wfm_rcv.py
|
||||
%exclude %{_datadir}/gnuradio/examples/uhd/usrp_wfm_rcv_sca.py
|
||||
%exclude %{_datadir}/gnuradio/examples/uhd/usrp_wxapt_rcv.py
|
||||
|
||||
%files examples-wxgui
|
||||
%{_datadir}/gnuradio/examples/audio/audio_fft.py
|
||||
%{_datadir}/gnuradio/examples/hf_explorer/
|
||||
%{_datadir}/gnuradio/examples/hf_radio/
|
||||
%{_datadir}/gnuradio/examples/noaa/usrp_rx_hrpt.grc
|
||||
%{_datadir}/gnuradio/examples/uhd/fm_tx4.py
|
||||
%{_datadir}/gnuradio/examples/uhd/usrp_am_mw_rcv.py
|
||||
%{_datadir}/gnuradio/examples/uhd/usrp_nbfm_ptt.py
|
||||
%{_datadir}/gnuradio/examples/uhd/usrp_nbfm_rcv.py
|
||||
%{_datadir}/gnuradio/examples/uhd/usrp_tv_rcv.py
|
||||
%{_datadir}/gnuradio/examples/uhd/usrp_wfm_rcv_fmdet.py
|
||||
%{_datadir}/gnuradio/examples/uhd/usrp_wfm_rcv_pll.py
|
||||
%{_datadir}/gnuradio/examples/uhd/usrp_wfm_rcv.py
|
||||
%{_datadir}/gnuradio/examples/uhd/usrp_wfm_rcv_sca.py
|
||||
%{_datadir}/gnuradio/examples/uhd/usrp_wxapt_rcv.py
|
||||
|
||||
%changelog
|
||||
|
@ -9,57 +9,6 @@ Index: gnuradio-3.7.12.0/gr-uhd/gnuradio-uhd.pc.in
|
||||
-Libs: -L${libdir} -lgnuradio-uhd
|
||||
+Libs: -L${libdir} -lgnuradio-uhd -lpthread
|
||||
Cflags: -I${includedir}
|
||||
Index: gnuradio-3.7.12.0/gr-uhd/examples/c++/CMakeLists.txt
|
||||
===================================================================
|
||||
--- gnuradio-3.7.12.0.orig/gr-uhd/examples/c++/CMakeLists.txt
|
||||
+++ gnuradio-3.7.12.0/gr-uhd/examples/c++/CMakeLists.txt
|
||||
@@ -31,6 +31,9 @@ include_directories(
|
||||
link_directories(${UHD_LIBRARY_DIRS})
|
||||
link_directories(${Boost_LIBRARY_DIRS})
|
||||
|
||||
+set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
+find_package(Threads REQUIRED)
|
||||
+
|
||||
########################################################################
|
||||
# Build executable
|
||||
########################################################################
|
||||
Index: gnuradio-3.7.12.0/volk/lib/CMakeLists.txt
|
||||
===================================================================
|
||||
--- gnuradio-3.7.12.0.orig/volk/lib/CMakeLists.txt
|
||||
+++ gnuradio-3.7.12.0/volk/lib/CMakeLists.txt
|
||||
@@ -532,7 +532,7 @@ if(CMAKE_VERSION VERSION_GREATER "2.8.11
|
||||
|
||||
#Add dynamic library
|
||||
add_library(volk SHARED $<TARGET_OBJECTS:volk_obj>)
|
||||
- target_link_libraries(volk ${volk_libraries})
|
||||
+ target_link_libraries(volk ${volk_libraries} "m")
|
||||
target_include_directories(volk
|
||||
PUBLIC ${PROJECT_BINARY_DIR}/include
|
||||
PUBLIC ${PROJECT_SOURCE_DIR}/include
|
||||
@@ -574,7 +574,7 @@ if(CMAKE_VERSION VERSION_GREATER "2.8.11
|
||||
else()
|
||||
#create the volk runtime library
|
||||
add_library(volk SHARED ${volk_sources})
|
||||
- target_link_libraries(volk ${volk_libraries})
|
||||
+ target_link_libraries(volk ${volk_libraries} "m")
|
||||
include_directories(volk
|
||||
PUBLIC ${PROJECT_BINARY_DIR}/include
|
||||
PUBLIC ${PROJECT_SOURCE_DIR}/include
|
||||
Index: gnuradio-3.7.12.0/gnuradio-runtime/lib/pmt/CMakeLists.txt
|
||||
===================================================================
|
||||
--- gnuradio-3.7.12.0.orig/gnuradio-runtime/lib/pmt/CMakeLists.txt
|
||||
+++ gnuradio-3.7.12.0/gnuradio-runtime/lib/pmt/CMakeLists.txt
|
||||
@@ -81,9 +81,13 @@ set(pmt_sources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc
|
||||
)
|
||||
|
||||
+set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
+find_package(Threads REQUIRED)
|
||||
+
|
||||
list(APPEND gnuradio_pmt_libs
|
||||
${Boost_LIBRARIES}
|
||||
${LOG4CPP_LIBRARIES}
|
||||
+ Threads::Threads
|
||||
)
|
||||
|
||||
add_custom_target(pmt_generated
|
||||
|
@ -1,28 +0,0 @@
|
||||
From b0f4ebcf6d656c829747dded592e182144098d42 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cercueil <paul.cercueil@analog.com>
|
||||
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 <paul.cercueil@analog.com>
|
||||
---
|
||||
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
|
||||
@@ -27,7 +27,7 @@
|
||||
########################################################################
|
||||
# Make sure this version matches ${GR_CMAKE_MIN_VERSION} (a variable can't be
|
||||
# used here).
|
||||
-cmake_minimum_required(VERSION 2.6)
|
||||
+cmake_minimum_required(VERSION 2.8.12)
|
||||
project(gnuradio CXX C)
|
||||
enable_testing()
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 25dedc0a2a7f0790f280770a7d22e9650ae2adbf Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cercueil <paul.cercueil@analog.com>
|
||||
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 <paul.cercueil@analog.com>
|
||||
---
|
||||
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
|
||||
|
@ -1,575 +0,0 @@
|
||||
From 1f78d5f2176de31809dc34fb38945c181390cdef Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cercueil <paul.cercueil@analog.com>
|
||||
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 <paul.cercueil@analog.com>
|
||||
---
|
||||
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(-)
|
||||
|
||||
--- 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 @@
|
||||
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 @@
|
||||
########################################################################
|
||||
if(ENABLE_GR_QTGUI)
|
||||
|
||||
-# populate the environment with QT variables
|
||||
-include(GrSetupQt4)
|
||||
-
|
||||
########################################################################
|
||||
# Setup CPack components
|
||||
########################################################################
|
||||
--- a/gr-qtgui/grc/qtgui_ber_sink_b.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_ber_sink_b.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Bercurve Sink</name>
|
||||
<key>qtgui_bercurve_sink</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<import>import numpy</import>
|
||||
--- a/gr-qtgui/grc/qtgui_check_box.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_check_box.xml
|
||||
@@ -8,7 +8,7 @@
|
||||
<block>
|
||||
<name>QT GUI Check Box</name>
|
||||
<key>variable_qtgui_check_box</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = '_%s_check_box'%$id
|
||||
#if not $label()
|
||||
--- a/gr-qtgui/grc/qtgui_chooser.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_chooser.xml
|
||||
@@ -8,8 +8,8 @@
|
||||
<block>
|
||||
<name>QT GUI Chooser</name>
|
||||
<key>variable_qtgui_chooser</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
- <import>from PyQt4.QtCore import QObject, pyqtSlot</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt5.QtCore import QObject, pyqtSlot</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#slurp
|
||||
#set $all_options = [$option0, $option1, $option2, $option3, $option4][:int($num_opts())]
|
||||
--- a/gr-qtgui/grc/qtgui_const_sink_x.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_const_sink_x.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Constellation Sink</name>
|
||||
<key>qtgui_const_sink_x</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
--- a/gr-qtgui/grc/qtgui_entry.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_entry.xml
|
||||
@@ -8,7 +8,7 @@
|
||||
<block>
|
||||
<name>QT GUI Entry</name>
|
||||
<key>variable_qtgui_entry</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import eng_notation</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = 'self._%s_tool_bar'%$id
|
||||
--- a/gr-qtgui/grc/qtgui_freq_sink_x.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_freq_sink_x.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Frequency Sink</name>
|
||||
<key>qtgui_freq_sink_x</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
--- a/gr-qtgui/grc/qtgui_histogram_sink_x.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_histogram_sink_x.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Histogram Sink</name>
|
||||
<key>qtgui_histogram_sink_x</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
--- a/gr-qtgui/grc/qtgui_label.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_label.xml
|
||||
@@ -9,7 +9,7 @@
|
||||
<block>
|
||||
<name>QT GUI Label</name>
|
||||
<key>variable_qtgui_label</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import eng_notation</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = 'self._%s_tool_bar'%$id
|
||||
--- a/gr-qtgui/grc/qtgui_number_sink.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_number_sink.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Number Sink</name>
|
||||
<key>qtgui_number_sink</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
--- a/gr-qtgui/grc/qtgui_push_button.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_push_button.xml
|
||||
@@ -8,7 +8,7 @@
|
||||
<block>
|
||||
<name>QT GUI Push Button</name>
|
||||
<key>variable_qtgui_push_button</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = '_%s_push_button'%$id
|
||||
#if not $label()
|
||||
--- a/gr-qtgui/grc/qtgui_sink_x.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_sink_x.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Sink</name>
|
||||
<key>qtgui_sink_x</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
--- a/gr-qtgui/grc/qtgui_tab_widget.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_tab_widget.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Tab Widget</name>
|
||||
<key>qtgui_tab_widget</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<make>#set $win = 'self.%s'%$id
|
||||
Qt.QTabWidget()
|
||||
#set $all_labels = [$label0, $label1, $label2, $label3, $label4,
|
||||
--- a/gr-qtgui/grc/qtgui_time_raster_x.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_time_raster_x.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Time Raster Sink</name>
|
||||
<key>qtgui_time_raster_sink_x</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
--- a/gr-qtgui/grc/qtgui_time_sink_x.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_time_sink_x.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Time Sink</name>
|
||||
<key>qtgui_time_sink_x</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
--- a/gr-qtgui/grc/qtgui_vector_sink_f.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_vector_sink_f.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Vector Sink</name>
|
||||
<key>qtgui_vector_sink_f</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
--- a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Waterfall Sink</name>
|
||||
<key>qtgui_waterfall_sink_x</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
--- a/gr-qtgui/include/gnuradio/qtgui/form_menus.h
|
||||
+++ b/gr-qtgui/include/gnuradio/qtgui/form_menus.h
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtGui/QIntValidator>
|
||||
#include <QtGui/QDoubleValidator>
|
||||
+#include <QtWidgets/QtWidgets>
|
||||
#include <qwt_symbol.h>
|
||||
#include <gnuradio/filter/firdes.h>
|
||||
#include <gnuradio/qtgui/qtgui_types.h>
|
||||
--- a/gr-qtgui/lib/CMakeLists.txt
|
||||
+++ b/gr-qtgui/lib/CMakeLists.txt
|
||||
@@ -45,8 +45,8 @@
|
||||
${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 <foo>.ui.h, but the macros generate ui_foo.h
|
||||
#avoid changing the sources by generating the header with the include
|
||||
@@ -127,7 +127,7 @@
|
||||
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
||||
${VOLK_INCLUDE_DIRS}
|
||||
${QWT_INCLUDE_DIRS}
|
||||
- ${QT_INCLUDE_DIRS}
|
||||
+ ${Qt5Widgets_INCLUDE_DIRS}
|
||||
${FFTW3F_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
@@ -154,7 +154,7 @@
|
||||
gnuradio-filter
|
||||
${VOLK_LIBRARIES}
|
||||
${QWT_LIBRARIES}
|
||||
- ${QT_LIBRARIES}
|
||||
+ ${Qt5Widgets_LIBRARIES}
|
||||
${FFTW3F_LIBRARIES}
|
||||
)
|
||||
if (WIN32)
|
||||
--- a/gr-qtgui/lib/SpectrumGUIClass.cc
|
||||
+++ b/gr-qtgui/lib/SpectrumGUIClass.cc
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <gnuradio/qtgui/SpectrumGUIClass.h>
|
||||
//Added by qt3to4:
|
||||
#include <QEvent>
|
||||
-#include <QCustomEvent>
|
||||
#include <volk/volk.h>
|
||||
|
||||
const long SpectrumGUIClass::MAX_FFT_SIZE = 32768;
|
||||
--- a/gr-qtgui/lib/const_sink_c_impl.cc
|
||||
+++ b/gr-qtgui/lib/const_sink_c_impl.cc
|
||||
@@ -127,10 +127,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/freq_sink_c_impl.cc
|
||||
+++ b/gr-qtgui/lib/freq_sink_c_impl.cc
|
||||
@@ -156,10 +156,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/freq_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/freq_sink_f_impl.cc
|
||||
@@ -155,10 +155,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/histogram_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/histogram_sink_f_impl.cc
|
||||
@@ -115,10 +115,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/sink_c_impl.cc
|
||||
+++ b/gr-qtgui/lib/sink_c_impl.cc
|
||||
@@ -131,10 +131,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/sink_f_impl.cc
|
||||
@@ -131,10 +131,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/time_raster_sink_b_impl.cc
|
||||
+++ b/gr-qtgui/lib/time_raster_sink_b_impl.cc
|
||||
@@ -130,10 +130,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/time_raster_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/time_raster_sink_f_impl.cc
|
||||
@@ -128,10 +128,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/time_sink_c_impl.cc
|
||||
+++ b/gr-qtgui/lib/time_sink_c_impl.cc
|
||||
@@ -134,10 +134,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/time_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/time_sink_f_impl.cc
|
||||
@@ -129,10 +129,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/vector_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/vector_sink_f_impl.cc
|
||||
@@ -140,10 +140,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
|
||||
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
|
||||
@@ -159,10 +159,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc
|
||||
@@ -155,10 +155,6 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- 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 @@
|
||||
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 @@
|
||||
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 @@
|
||||
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 @@
|
||||
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 @@
|
||||
""" 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
|
||||
|
@ -1,53 +0,0 @@
|
||||
From e58eb487c4119866f8c820658c8cda173bc96370 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cercueil <paul.cercueil@analog.com>
|
||||
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 <paul.cercueil@analog.com>
|
||||
---
|
||||
grc/blocks/options.xml | 2 +-
|
||||
grc/core/generator/flow_graph.tmpl | 8 ++------
|
||||
2 files changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/grc/blocks/options.xml
|
||||
+++ b/grc/blocks/options.xml
|
||||
@@ -16,7 +16,7 @@
|
||||
import wx
|
||||
#end if
|
||||
#if $generate_options() == 'qt_gui'
|
||||
-from PyQt4 import Qt
|
||||
+from PyQt5 import Qt
|
||||
import sys
|
||||
#end if
|
||||
#if $generate_options() == 'bokeh_gui'
|
||||
--- a/grc/core/generator/flow_graph.tmpl
|
||||
+++ b/grc/core/generator/flow_graph.tmpl
|
||||
@@ -118,7 +118,7 @@
|
||||
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 == 'bokeh_gui'
|
||||
|
||||
@@ -435,10 +435,6 @@
|
||||
serverProc.terminate()
|
||||
serverProc.kill()
|
||||
#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)))
|
||||
@@ -457,7 +453,7 @@
|
||||
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():
|
@ -1,33 +0,0 @@
|
||||
From 45c65ebeefcb20c2d2480b11b299d49f288c3b73 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cercueil <paul.cercueil@analog.com>
|
||||
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 <paul.cercueil@analog.com>
|
||||
---
|
||||
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 <QtGui/QRegExpValidator>
|
||||
--
|
||||
2.11.0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,73 +0,0 @@
|
||||
From 1dae9e033016f35416cb433a8a129b4f011eb8c1 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Rondeau <tom@trondeau.com>
|
||||
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(-)
|
||||
|
||||
--- 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 @@
|
||||
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})
|
||||
|
||||
--- a/gr-qtgui/grc/qtgui_edit_box_msg.xml
|
||||
+++ b/gr-qtgui/grc/qtgui_edit_box_msg.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
<block>
|
||||
<name>QT GUI Message Edit Box</name>
|
||||
<key>qtgui_edit_box_msg</key>
|
||||
- <import>from PyQt4 import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
--- a/gr-qtgui/lib/edit_box_msg_impl.cc
|
||||
+++ b/gr-qtgui/lib/edit_box_msg_impl.cc
|
||||
@@ -66,10 +66,6 @@
|
||||
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);
|
||||
}
|
||||
|
@ -1,144 +0,0 @@
|
||||
From aa06972a708d3559eae667dd9484edadf722d73c Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cercueil <paul.cercueil@analog.com>
|
||||
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 <paul.cercueil@analog.com>
|
||||
---
|
||||
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(-)
|
||||
|
||||
--- 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 @@
|
||||
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
|
||||
--- a/gr-qtgui/examples/c++/CMakeLists.txt
|
||||
+++ b/gr-qtgui/examples/c++/CMakeLists.txt
|
||||
@@ -24,7 +24,7 @@
|
||||
${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 @@
|
||||
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})
|
||||
|
||||
--- a/gr-qtgui/include/gnuradio/qtgui/form_menus.h
|
||||
+++ b/gr-qtgui/include/gnuradio/qtgui/form_menus.h
|
||||
@@ -28,7 +28,11 @@
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtGui/QIntValidator>
|
||||
#include <QtGui/QDoubleValidator>
|
||||
+
|
||||
+#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets/QtWidgets>
|
||||
+#endif
|
||||
+
|
||||
#include <qwt_symbol.h>
|
||||
#include <gnuradio/filter/firdes.h>
|
||||
#include <gnuradio/qtgui/qtgui_types.h>
|
||||
--- a/gr-qtgui/lib/CMakeLists.txt
|
||||
+++ b/gr-qtgui/lib/CMakeLists.txt
|
||||
@@ -45,8 +45,14 @@
|
||||
${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 <foo>.ui.h, but the macros generate ui_foo.h
|
||||
#avoid changing the sources by generating the header with the include
|
||||
@@ -127,7 +133,7 @@
|
||||
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
||||
${VOLK_INCLUDE_DIRS}
|
||||
${QWT_INCLUDE_DIRS}
|
||||
- ${Qt5Widgets_INCLUDE_DIRS}
|
||||
+ ${QT_INCLUDE_DIRS}
|
||||
${FFTW3F_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
@@ -154,7 +160,7 @@
|
||||
gnuradio-filter
|
||||
${VOLK_LIBRARIES}
|
||||
${QWT_LIBRARIES}
|
||||
- ${Qt5Widgets_LIBRARIES}
|
||||
+ ${QT_LIBRARIES}
|
||||
${FFTW3F_LIBRARIES}
|
||||
)
|
||||
if (WIN32)
|
@ -1,351 +0,0 @@
|
||||
From dc3db3b5ac29769aa4ab571a670d26e2fc7b6bf6 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cercueil <paul.cercueil@analog.com>
|
||||
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 <paul.cercueil@analog.com>
|
||||
---
|
||||
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 @@
|
||||
<block>
|
||||
<name>QT GUI Bercurve Sink</name>
|
||||
<key>qtgui_bercurve_sink</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<import>import numpy</import>
|
||||
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 @@
|
||||
<block>
|
||||
<name>QT GUI Check Box</name>
|
||||
<key>variable_qtgui_check_box</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = '_%s_check_box'%$id
|
||||
#if not $label()
|
||||
diff --git a/gr-qtgui/grc/qtgui_chooser.xml b/gr-qtgui/grc/qtgui_chooser.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Chooser</name>
|
||||
<key>variable_qtgui_chooser</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
- <import>from PyQt5.QtCore import QObject, pyqtSlot</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@.QtCore import QObject, pyqtSlot</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#slurp
|
||||
#set $all_options = [$option0, $option1, $option2, $option3, $option4][:int($num_opts())]
|
||||
diff --git a/gr-qtgui/grc/qtgui_const_sink_x.xml b/gr-qtgui/grc/qtgui_const_sink_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Constellation Sink</name>
|
||||
<key>qtgui_const_sink_x</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_edit_box_msg.xml b/gr-qtgui/grc/qtgui_edit_box_msg.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Message Edit Box</name>
|
||||
<key>qtgui_edit_box_msg</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_entry.xml b/gr-qtgui/grc/qtgui_entry.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Entry</name>
|
||||
<key>variable_qtgui_entry</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import eng_notation</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = 'self._%s_tool_bar'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_freq_sink_x.xml b/gr-qtgui/grc/qtgui_freq_sink_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Frequency Sink</name>
|
||||
<key>qtgui_freq_sink_x</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
diff --git a/gr-qtgui/grc/qtgui_histogram_sink_x.xml b/gr-qtgui/grc/qtgui_histogram_sink_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Histogram Sink</name>
|
||||
<key>qtgui_histogram_sink_x</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_label.xml b/gr-qtgui/grc/qtgui_label.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Label</name>
|
||||
<key>variable_qtgui_label</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import eng_notation</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = 'self._%s_tool_bar'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_number_sink.xml b/gr-qtgui/grc/qtgui_number_sink.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Number Sink</name>
|
||||
<key>qtgui_number_sink</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_push_button.xml b/gr-qtgui/grc/qtgui_push_button.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Push Button</name>
|
||||
<key>variable_qtgui_push_button</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = '_%s_push_button'%$id
|
||||
#if not $label()
|
||||
diff --git a/gr-qtgui/grc/qtgui_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 @@
|
||||
<block>
|
||||
<name>QT GUI Sink</name>
|
||||
<key>qtgui_sink_x</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
diff --git a/gr-qtgui/grc/qtgui_tab_widget.xml b/gr-qtgui/grc/qtgui_tab_widget.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Tab Widget</name>
|
||||
<key>qtgui_tab_widget</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<make>#set $win = 'self.%s'%$id
|
||||
Qt.QTabWidget()
|
||||
#set $all_labels = [$label0, $label1, $label2, $label3, $label4,
|
||||
diff --git a/gr-qtgui/grc/qtgui_time_raster_x.xml b/gr-qtgui/grc/qtgui_time_raster_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Time Raster Sink</name>
|
||||
<key>qtgui_time_raster_sink_x</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_time_sink_x.xml b/gr-qtgui/grc/qtgui_time_sink_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Time Sink</name>
|
||||
<key>qtgui_time_sink_x</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
diff --git a/gr-qtgui/grc/qtgui_vector_sink_f.xml b/gr-qtgui/grc/qtgui_vector_sink_f.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Vector Sink</name>
|
||||
<key>qtgui_vector_sink_f</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Waterfall Sink</name>
|
||||
<key>qtgui_waterfall_sink_x</key>
|
||||
- <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
--
|
||||
2.11.0
|
||||
|
@ -1,54 +0,0 @@
|
||||
From 7df8c4ea6559ba211222e7d7cfb152f71dbc815b Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cercueil <paul.cercueil@analog.com>
|
||||
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 <paul.cercueil@analog.com>
|
||||
---
|
||||
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
|
||||
|
@ -1,191 +0,0 @@
|
||||
From 988c1520d5b6f763caa0164faef404185e7dbc85 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cercueil <paul.cercueil@analog.com>
|
||||
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 <paul.cercueil@analog.com>
|
||||
---
|
||||
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(+)
|
||||
|
||||
--- a/gr-qtgui/lib/const_sink_c_impl.cc
|
||||
+++ b/gr-qtgui/lib/const_sink_c_impl.cc
|
||||
@@ -127,6 +127,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/freq_sink_c_impl.cc
|
||||
+++ b/gr-qtgui/lib/freq_sink_c_impl.cc
|
||||
@@ -156,6 +156,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/freq_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/freq_sink_f_impl.cc
|
||||
@@ -155,6 +155,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/histogram_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/histogram_sink_f_impl.cc
|
||||
@@ -115,6 +115,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/sink_c_impl.cc
|
||||
+++ b/gr-qtgui/lib/sink_c_impl.cc
|
||||
@@ -131,6 +131,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/sink_f_impl.cc
|
||||
@@ -131,6 +131,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/time_raster_sink_b_impl.cc
|
||||
+++ b/gr-qtgui/lib/time_raster_sink_b_impl.cc
|
||||
@@ -130,6 +130,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/time_raster_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/time_raster_sink_f_impl.cc
|
||||
@@ -128,6 +128,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/time_sink_c_impl.cc
|
||||
+++ b/gr-qtgui/lib/time_sink_c_impl.cc
|
||||
@@ -134,6 +134,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/time_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/time_sink_f_impl.cc
|
||||
@@ -129,6 +129,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/vector_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/vector_sink_f_impl.cc
|
||||
@@ -140,6 +140,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
|
||||
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
|
||||
@@ -159,6 +159,10 @@
|
||||
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);
|
||||
}
|
||||
|
||||
--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc
|
||||
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc
|
||||
@@ -155,6 +155,10 @@
|
||||
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);
|
||||
}
|
||||
|
@ -1,659 +0,0 @@
|
||||
From 6cd8e365b7e519f49c81cfeb7137200d7b5e8b2f Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cercueil <paul.cercueil@analog.com>
|
||||
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 <paul.cercueil@analog.com>
|
||||
---
|
||||
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%)
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -528,7 +528,6 @@
|
||||
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)
|
||||
@@ -551,6 +550,7 @@
|
||||
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)
|
||||
--- a/grc/blocks/CMakeLists.txt
|
||||
+++ b/grc/blocks/CMakeLists.txt
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
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 @@
|
||||
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"
|
||||
)
|
||||
--- a/grc/blocks/options.xml
|
||||
+++ /dev/null
|
||||
@@ -1,294 +0,0 @@
|
||||
-<?xml version="1.0"?>
|
||||
-<!--
|
||||
-###################################################
|
||||
-##Options Block:
|
||||
-## options for window size,
|
||||
-## and flow graph building.
|
||||
-###################################################
|
||||
- -->
|
||||
-<block>
|
||||
- <name>Options</name>
|
||||
- <key>options</key>
|
||||
- <import>from gnuradio import gr</import>
|
||||
- <import>from gnuradio.filter import firdes</import>
|
||||
- <import>#if $generate_options() == 'wx_gui'
|
||||
-from grc_gnuradio import wxgui as grc_wxgui
|
||||
-import wx
|
||||
-#end if
|
||||
-#if $generate_options() == 'qt_gui'
|
||||
-from PyQt5 import Qt
|
||||
-import sys
|
||||
-#end if
|
||||
-#if $generate_options() == 'bokeh_gui'
|
||||
-import time
|
||||
-import signal
|
||||
-import functools
|
||||
-from bokeh.client import push_session
|
||||
-from bokeh.plotting import curdoc
|
||||
-#end if
|
||||
-#if not $generate_options().startswith('hb')
|
||||
-from optparse import OptionParser
|
||||
-from gnuradio.eng_option import eng_option
|
||||
-from gnuradio import eng_notation
|
||||
-#end if</import>
|
||||
- <make></make>
|
||||
- <callback>if $run: self.start()
|
||||
-else: self.stop(); self.wait()</callback>
|
||||
- <param>
|
||||
- <name>Title</name>
|
||||
- <key>title</key>
|
||||
- <value></value>
|
||||
- <type>string</type>
|
||||
- <hide>#if $title() then 'none' else 'part'#</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Author</name>
|
||||
- <key>author</key>
|
||||
- <value></value>
|
||||
- <type>string</type>
|
||||
- <hide>#if $author() then 'none' else 'part'#</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Description</name>
|
||||
- <key>description</key>
|
||||
- <value></value>
|
||||
- <type>string</type>
|
||||
- <hide>#if $description() then 'none' else 'part'#</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Canvas Size</name>
|
||||
- <key>window_size</key>
|
||||
- <value></value>
|
||||
- <type>int_vector</type>
|
||||
- <hide>part</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Generate Options</name>
|
||||
- <key>generate_options</key>
|
||||
- <value>qt_gui</value>
|
||||
- <type>enum</type>
|
||||
- <option>
|
||||
- <name>Bokeh GUI</name>
|
||||
- <key>bokeh_gui</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>QT GUI</name>
|
||||
- <key>qt_gui</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>WX GUI</name>
|
||||
- <key>wx_gui</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>No GUI</name>
|
||||
- <key>no_gui</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Hier Block</name>
|
||||
- <key>hb</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Hier Block (QT GUI)</name>
|
||||
- <key>hb_qt_gui</key>
|
||||
- </option>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Category</name>
|
||||
- <key>category</key>
|
||||
- <value>[GRC Hier Blocks]</value>
|
||||
- <type>string</type>
|
||||
- <hide>#if $generate_options().startswith('hb') then 'none' else 'all'#</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Run Options</name>
|
||||
- <key>run_options</key>
|
||||
- <value>prompt</value>
|
||||
- <type>enum</type>
|
||||
- <hide>#if $generate_options() == 'no_gui' then 'none' else 'all'#</hide>
|
||||
- <option>
|
||||
- <name>Run to Completion</name>
|
||||
- <key>run</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Prompt for Exit</name>
|
||||
- <key>prompt</key>
|
||||
- </option>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Widget Placement</name>
|
||||
- <key>placement</key>
|
||||
- <value>(0,0)</value>
|
||||
- <type>int_vector</type>
|
||||
- <hide>#if $generate_options() == 'bokeh_gui' then 'part' else 'all'#</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Sizing Mode</name>
|
||||
- <key>sizing_mode</key>
|
||||
- <value>fixed</value>
|
||||
- <type>enum</type>
|
||||
- <hide>#if $generate_options() == 'bokeh_gui' then 'part' else 'all'#</hide>
|
||||
- <option>
|
||||
- <name>Fixed</name>
|
||||
- <key>fixed</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Stretch Both</name>
|
||||
- <key>stretch_both</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Scale Width</name>
|
||||
- <key>scale_width</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Scale Height</name>
|
||||
- <key>scale_height</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Scale Both</name>
|
||||
- <key>scale_both</key>
|
||||
- </option>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Run</name>
|
||||
- <key>run</key>
|
||||
- <value>True</value>
|
||||
- <type>bool</type>
|
||||
- <hide>
|
||||
-#if $generate_options() in ('qt_gui', 'wx_gui', 'bokeh_gui')
|
||||
- #if $run()
|
||||
- part
|
||||
- #else
|
||||
- none
|
||||
- #end if
|
||||
-#else
|
||||
- all
|
||||
-#end if
|
||||
- </hide>
|
||||
- <option>
|
||||
- <name>Autostart</name>
|
||||
- <key>True</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Off</name>
|
||||
- <key>False</key>
|
||||
- </option>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Max Number of Output</name>
|
||||
- <key>max_nouts</key>
|
||||
- <value>0</value>
|
||||
- <type>int</type>
|
||||
- <hide>#if $generate_options().startswith('hb')
|
||||
-all#slurp
|
||||
-#elif $max_nouts()
|
||||
-none#slurp
|
||||
-#else
|
||||
-part#slurp
|
||||
-#end if</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Realtime Scheduling</name>
|
||||
- <key>realtime_scheduling</key>
|
||||
- <value></value>
|
||||
- <type>enum</type>
|
||||
- <hide>#if $generate_options().startswith('hb')
|
||||
-all#slurp
|
||||
-#elif $realtime_scheduling()
|
||||
-none#slurp
|
||||
-#else
|
||||
-part#slurp
|
||||
-#end if</hide>
|
||||
- <option>
|
||||
- <name>Off</name>
|
||||
- <key></key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>On</name>
|
||||
- <key>1</key>
|
||||
- </option>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>QSS Theme</name>
|
||||
- <key>qt_qss_theme</key>
|
||||
- <value></value>
|
||||
- <type>file_open</type>
|
||||
- <hide>
|
||||
-#if $generate_options() in ('qt_gui',)
|
||||
- #if $qt_qss_theme()
|
||||
- none
|
||||
- #else
|
||||
- part
|
||||
- #end if
|
||||
-#else
|
||||
- all
|
||||
-#end if
|
||||
-</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Thread-safe setters</name>
|
||||
- <key>thread_safe_setters</key>
|
||||
- <value></value>
|
||||
- <type>enum</type>
|
||||
- <hide>part</hide>
|
||||
- <option>
|
||||
- <name>Off</name>
|
||||
- <key></key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>On</name>
|
||||
- <key>1</key>
|
||||
- </option>
|
||||
- <tab>Advanced</tab>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Run Command</name>
|
||||
- <key>run_command</key>
|
||||
- <value>{python} -u {filename}</value>
|
||||
- <type>string</type>
|
||||
- <hide>#if $generate_options().startswith('hb')
|
||||
-all#slurp
|
||||
-#else
|
||||
-part#slurp
|
||||
-#end if</hide>
|
||||
- <tab>Advanced</tab>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Hier Block Source Path</name>
|
||||
- <key>hier_block_src_path</key>
|
||||
- <value>.:</value>
|
||||
- <type>string</type>
|
||||
- <hide>part</hide>
|
||||
- <tab>Advanced</tab>
|
||||
- </param>
|
||||
- <check>not $window_size or len($window_size) == 2</check>
|
||||
- <check>not $window_size or 300 <= $(window_size)[0] <= 4096</check>
|
||||
- <check>not $window_size or 300 <= $(window_size)[1] <= 4096</check>
|
||||
- <check>len($placement) == 4 or len($placement) == 2</check>
|
||||
- <check>all(i >= 0 for i in $(placement))</check>
|
||||
- <doc>
|
||||
-The options block sets special parameters for the flow graph. \
|
||||
-Only one option block is allowed per flow graph.
|
||||
-
|
||||
-Title, author, and description parameters are for identification purposes.
|
||||
-
|
||||
-The window size controls the dimensions of the flow graph editor. \
|
||||
-The window size (width, height) must be between (300, 300) and (4096, 4096).
|
||||
-
|
||||
-The generate options controls the type of code generated. \
|
||||
-Non-graphical flow graphs should avoid using graphical sinks or graphical variable controls.
|
||||
-
|
||||
-In a graphical application, \
|
||||
-run can be controlled by a variable to start and stop the flowgraph at runtime.
|
||||
-
|
||||
-The id of this block determines the name of the generated file and the name of the class. \
|
||||
-For example, an id of my_block will generate the file my_block.py and class my_block(gr....
|
||||
-
|
||||
-The category parameter determines the placement of the block in the block selection window. \
|
||||
-The category only applies when creating hier blocks. \
|
||||
-To put hier blocks into the root category, enter / for the category.
|
||||
-
|
||||
-The Max Number of Output is the maximum number of output items allowed for any block \
|
||||
-in the flowgraph; to disable this set the max_nouts equal to 0.\
|
||||
-Use this to adjust the maximum latency a flowgraph can exhibit.
|
||||
- </doc>
|
||||
-</block>
|
||||
--- /dev/null
|
||||
+++ b/grc/blocks/options.xml.cmakein
|
||||
@@ -0,0 +1,294 @@
|
||||
+<?xml version="1.0"?>
|
||||
+<!--
|
||||
+###################################################
|
||||
+##Options Block:
|
||||
+## options for window size,
|
||||
+## and flow graph building.
|
||||
+###################################################
|
||||
+ -->
|
||||
+<block>
|
||||
+ <name>Options</name>
|
||||
+ <key>options</key>
|
||||
+ <import>from gnuradio import gr</import>
|
||||
+ <import>from gnuradio.filter import firdes</import>
|
||||
+ <import>#if $generate_options() == 'wx_gui'
|
||||
+from grc_gnuradio import wxgui as grc_wxgui
|
||||
+import wx
|
||||
+#end if
|
||||
+#if $generate_options() == 'qt_gui'
|
||||
+from PyQt@DESIRED_QT_VERSION@ import Qt
|
||||
+import sys
|
||||
+#end if
|
||||
+#if $generate_options() == 'bokeh_gui'
|
||||
+import time
|
||||
+import signal
|
||||
+import functools
|
||||
+from bokeh.client import push_session
|
||||
+from bokeh.plotting import curdoc
|
||||
+#end if
|
||||
+#if not $generate_options().startswith('hb')
|
||||
+from optparse import OptionParser
|
||||
+from gnuradio.eng_option import eng_option
|
||||
+from gnuradio import eng_notation
|
||||
+#end if</import>
|
||||
+ <make></make>
|
||||
+ <callback>if $run: self.start()
|
||||
+else: self.stop(); self.wait()</callback>
|
||||
+ <param>
|
||||
+ <name>Title</name>
|
||||
+ <key>title</key>
|
||||
+ <value></value>
|
||||
+ <type>string</type>
|
||||
+ <hide>#if $title() then 'none' else 'part'#</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Author</name>
|
||||
+ <key>author</key>
|
||||
+ <value></value>
|
||||
+ <type>string</type>
|
||||
+ <hide>#if $author() then 'none' else 'part'#</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Description</name>
|
||||
+ <key>description</key>
|
||||
+ <value></value>
|
||||
+ <type>string</type>
|
||||
+ <hide>#if $description() then 'none' else 'part'#</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Canvas Size</name>
|
||||
+ <key>window_size</key>
|
||||
+ <value></value>
|
||||
+ <type>int_vector</type>
|
||||
+ <hide>part</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Generate Options</name>
|
||||
+ <key>generate_options</key>
|
||||
+ <value>qt_gui</value>
|
||||
+ <type>enum</type>
|
||||
+ <option>
|
||||
+ <name>Bokeh GUI</name>
|
||||
+ <key>bokeh_gui</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>QT GUI</name>
|
||||
+ <key>qt_gui</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>WX GUI</name>
|
||||
+ <key>wx_gui</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>No GUI</name>
|
||||
+ <key>no_gui</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Hier Block</name>
|
||||
+ <key>hb</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Hier Block (QT GUI)</name>
|
||||
+ <key>hb_qt_gui</key>
|
||||
+ </option>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Category</name>
|
||||
+ <key>category</key>
|
||||
+ <value>[GRC Hier Blocks]</value>
|
||||
+ <type>string</type>
|
||||
+ <hide>#if $generate_options().startswith('hb') then 'none' else 'all'#</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Run Options</name>
|
||||
+ <key>run_options</key>
|
||||
+ <value>prompt</value>
|
||||
+ <type>enum</type>
|
||||
+ <hide>#if $generate_options() == 'no_gui' then 'none' else 'all'#</hide>
|
||||
+ <option>
|
||||
+ <name>Run to Completion</name>
|
||||
+ <key>run</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Prompt for Exit</name>
|
||||
+ <key>prompt</key>
|
||||
+ </option>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Widget Placement</name>
|
||||
+ <key>placement</key>
|
||||
+ <value>(0,0)</value>
|
||||
+ <type>int_vector</type>
|
||||
+ <hide>#if $generate_options() == 'bokeh_gui' then 'part' else 'all'#</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Sizing Mode</name>
|
||||
+ <key>sizing_mode</key>
|
||||
+ <value>fixed</value>
|
||||
+ <type>enum</type>
|
||||
+ <hide>#if $generate_options() == 'bokeh_gui' then 'part' else 'all'#</hide>
|
||||
+ <option>
|
||||
+ <name>Fixed</name>
|
||||
+ <key>fixed</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Stretch Both</name>
|
||||
+ <key>stretch_both</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Scale Width</name>
|
||||
+ <key>scale_width</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Scale Height</name>
|
||||
+ <key>scale_height</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Scale Both</name>
|
||||
+ <key>scale_both</key>
|
||||
+ </option>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Run</name>
|
||||
+ <key>run</key>
|
||||
+ <value>True</value>
|
||||
+ <type>bool</type>
|
||||
+ <hide>
|
||||
+#if $generate_options() in ('qt_gui', 'wx_gui', 'bokeh_gui')
|
||||
+ #if $run()
|
||||
+ part
|
||||
+ #else
|
||||
+ none
|
||||
+ #end if
|
||||
+#else
|
||||
+ all
|
||||
+#end if
|
||||
+ </hide>
|
||||
+ <option>
|
||||
+ <name>Autostart</name>
|
||||
+ <key>True</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Off</name>
|
||||
+ <key>False</key>
|
||||
+ </option>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Max Number of Output</name>
|
||||
+ <key>max_nouts</key>
|
||||
+ <value>0</value>
|
||||
+ <type>int</type>
|
||||
+ <hide>#if $generate_options().startswith('hb')
|
||||
+all#slurp
|
||||
+#elif $max_nouts()
|
||||
+none#slurp
|
||||
+#else
|
||||
+part#slurp
|
||||
+#end if</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Realtime Scheduling</name>
|
||||
+ <key>realtime_scheduling</key>
|
||||
+ <value></value>
|
||||
+ <type>enum</type>
|
||||
+ <hide>#if $generate_options().startswith('hb')
|
||||
+all#slurp
|
||||
+#elif $realtime_scheduling()
|
||||
+none#slurp
|
||||
+#else
|
||||
+part#slurp
|
||||
+#end if</hide>
|
||||
+ <option>
|
||||
+ <name>Off</name>
|
||||
+ <key></key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>On</name>
|
||||
+ <key>1</key>
|
||||
+ </option>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>QSS Theme</name>
|
||||
+ <key>qt_qss_theme</key>
|
||||
+ <value></value>
|
||||
+ <type>file_open</type>
|
||||
+ <hide>
|
||||
+#if $generate_options() in ('qt_gui',)
|
||||
+ #if $qt_qss_theme()
|
||||
+ none
|
||||
+ #else
|
||||
+ part
|
||||
+ #end if
|
||||
+#else
|
||||
+ all
|
||||
+#end if
|
||||
+</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Thread-safe setters</name>
|
||||
+ <key>thread_safe_setters</key>
|
||||
+ <value></value>
|
||||
+ <type>enum</type>
|
||||
+ <hide>part</hide>
|
||||
+ <option>
|
||||
+ <name>Off</name>
|
||||
+ <key></key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>On</name>
|
||||
+ <key>1</key>
|
||||
+ </option>
|
||||
+ <tab>Advanced</tab>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Run Command</name>
|
||||
+ <key>run_command</key>
|
||||
+ <value>{python} -u {filename}</value>
|
||||
+ <type>string</type>
|
||||
+ <hide>#if $generate_options().startswith('hb')
|
||||
+all#slurp
|
||||
+#else
|
||||
+part#slurp
|
||||
+#end if</hide>
|
||||
+ <tab>Advanced</tab>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Hier Block Source Path</name>
|
||||
+ <key>hier_block_src_path</key>
|
||||
+ <value>.:</value>
|
||||
+ <type>string</type>
|
||||
+ <hide>part</hide>
|
||||
+ <tab>Advanced</tab>
|
||||
+ </param>
|
||||
+ <check>not $window_size or len($window_size) == 2</check>
|
||||
+ <check>not $window_size or 300 <= $(window_size)[0] <= 4096</check>
|
||||
+ <check>not $window_size or 300 <= $(window_size)[1] <= 4096</check>
|
||||
+ <check>len($placement) == 4 or len($placement) == 2</check>
|
||||
+ <check>all(i >= 0 for i in $(placement))</check>
|
||||
+ <doc>
|
||||
+The options block sets special parameters for the flow graph. \
|
||||
+Only one option block is allowed per flow graph.
|
||||
+
|
||||
+Title, author, and description parameters are for identification purposes.
|
||||
+
|
||||
+The window size controls the dimensions of the flow graph editor. \
|
||||
+The window size (width, height) must be between (300, 300) and (4096, 4096).
|
||||
+
|
||||
+The generate options controls the type of code generated. \
|
||||
+Non-graphical flow graphs should avoid using graphical sinks or graphical variable controls.
|
||||
+
|
||||
+In a graphical application, \
|
||||
+run can be controlled by a variable to start and stop the flowgraph at runtime.
|
||||
+
|
||||
+The id of this block determines the name of the generated file and the name of the class. \
|
||||
+For example, an id of my_block will generate the file my_block.py and class my_block(gr....
|
||||
+
|
||||
+The category parameter determines the placement of the block in the block selection window. \
|
||||
+The category only applies when creating hier blocks. \
|
||||
+To put hier blocks into the root category, enter / for the category.
|
||||
+
|
||||
+The Max Number of Output is the maximum number of output items allowed for any block \
|
||||
+in the flowgraph; to disable this set the max_nouts equal to 0.\
|
||||
+Use this to adjust the maximum latency a flowgraph can exhibit.
|
||||
+ </doc>
|
||||
+</block>
|
||||
--- a/grc/core/generator/flow_graph.tmpl
|
||||
+++ b/grc/core/generator/flow_graph.tmpl
|
||||
@@ -36,6 +36,10 @@
|
||||
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', 'bokeh_gui')
|
@ -1,650 +0,0 @@
|
||||
From ab58fcfd12be3e60a9dfaac757a3b8c663c2fc4b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Koslowski <koslowski@kit.edu>
|
||||
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%)
|
||||
|
||||
--- a/grc/blocks/CMakeLists.txt
|
||||
+++ b/grc/blocks/CMakeLists.txt
|
||||
@@ -22,7 +22,18 @@
|
||||
|
||||
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 @@
|
||||
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"
|
||||
)
|
||||
--- a/grc/blocks/options.xml.cmakein
|
||||
+++ /dev/null
|
||||
@@ -1,294 +0,0 @@
|
||||
-<?xml version="1.0"?>
|
||||
-<!--
|
||||
-###################################################
|
||||
-##Options Block:
|
||||
-## options for window size,
|
||||
-## and flow graph building.
|
||||
-###################################################
|
||||
- -->
|
||||
-<block>
|
||||
- <name>Options</name>
|
||||
- <key>options</key>
|
||||
- <import>from gnuradio import gr</import>
|
||||
- <import>from gnuradio.filter import firdes</import>
|
||||
- <import>#if $generate_options() == 'wx_gui'
|
||||
-from grc_gnuradio import wxgui as grc_wxgui
|
||||
-import wx
|
||||
-#end if
|
||||
-#if $generate_options() == 'qt_gui'
|
||||
-from PyQt@DESIRED_QT_VERSION@ import Qt
|
||||
-import sys
|
||||
-#end if
|
||||
-#if $generate_options() == 'bokeh_gui'
|
||||
-import time
|
||||
-import signal
|
||||
-import functools
|
||||
-from bokeh.client import push_session
|
||||
-from bokeh.plotting import curdoc
|
||||
-#end if
|
||||
-#if not $generate_options().startswith('hb')
|
||||
-from optparse import OptionParser
|
||||
-from gnuradio.eng_option import eng_option
|
||||
-from gnuradio import eng_notation
|
||||
-#end if</import>
|
||||
- <make></make>
|
||||
- <callback>if $run: self.start()
|
||||
-else: self.stop(); self.wait()</callback>
|
||||
- <param>
|
||||
- <name>Title</name>
|
||||
- <key>title</key>
|
||||
- <value></value>
|
||||
- <type>string</type>
|
||||
- <hide>#if $title() then 'none' else 'part'#</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Author</name>
|
||||
- <key>author</key>
|
||||
- <value></value>
|
||||
- <type>string</type>
|
||||
- <hide>#if $author() then 'none' else 'part'#</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Description</name>
|
||||
- <key>description</key>
|
||||
- <value></value>
|
||||
- <type>string</type>
|
||||
- <hide>#if $description() then 'none' else 'part'#</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Canvas Size</name>
|
||||
- <key>window_size</key>
|
||||
- <value></value>
|
||||
- <type>int_vector</type>
|
||||
- <hide>part</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Generate Options</name>
|
||||
- <key>generate_options</key>
|
||||
- <value>qt_gui</value>
|
||||
- <type>enum</type>
|
||||
- <option>
|
||||
- <name>Bokeh GUI</name>
|
||||
- <key>bokeh_gui</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>QT GUI</name>
|
||||
- <key>qt_gui</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>WX GUI</name>
|
||||
- <key>wx_gui</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>No GUI</name>
|
||||
- <key>no_gui</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Hier Block</name>
|
||||
- <key>hb</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Hier Block (QT GUI)</name>
|
||||
- <key>hb_qt_gui</key>
|
||||
- </option>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Category</name>
|
||||
- <key>category</key>
|
||||
- <value>[GRC Hier Blocks]</value>
|
||||
- <type>string</type>
|
||||
- <hide>#if $generate_options().startswith('hb') then 'none' else 'all'#</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Run Options</name>
|
||||
- <key>run_options</key>
|
||||
- <value>prompt</value>
|
||||
- <type>enum</type>
|
||||
- <hide>#if $generate_options() == 'no_gui' then 'none' else 'all'#</hide>
|
||||
- <option>
|
||||
- <name>Run to Completion</name>
|
||||
- <key>run</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Prompt for Exit</name>
|
||||
- <key>prompt</key>
|
||||
- </option>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Widget Placement</name>
|
||||
- <key>placement</key>
|
||||
- <value>(0,0)</value>
|
||||
- <type>int_vector</type>
|
||||
- <hide>#if $generate_options() == 'bokeh_gui' then 'part' else 'all'#</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Sizing Mode</name>
|
||||
- <key>sizing_mode</key>
|
||||
- <value>fixed</value>
|
||||
- <type>enum</type>
|
||||
- <hide>#if $generate_options() == 'bokeh_gui' then 'part' else 'all'#</hide>
|
||||
- <option>
|
||||
- <name>Fixed</name>
|
||||
- <key>fixed</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Stretch Both</name>
|
||||
- <key>stretch_both</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Scale Width</name>
|
||||
- <key>scale_width</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Scale Height</name>
|
||||
- <key>scale_height</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Scale Both</name>
|
||||
- <key>scale_both</key>
|
||||
- </option>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Run</name>
|
||||
- <key>run</key>
|
||||
- <value>True</value>
|
||||
- <type>bool</type>
|
||||
- <hide>
|
||||
-#if $generate_options() in ('qt_gui', 'wx_gui', 'bokeh_gui')
|
||||
- #if $run()
|
||||
- part
|
||||
- #else
|
||||
- none
|
||||
- #end if
|
||||
-#else
|
||||
- all
|
||||
-#end if
|
||||
- </hide>
|
||||
- <option>
|
||||
- <name>Autostart</name>
|
||||
- <key>True</key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>Off</name>
|
||||
- <key>False</key>
|
||||
- </option>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Max Number of Output</name>
|
||||
- <key>max_nouts</key>
|
||||
- <value>0</value>
|
||||
- <type>int</type>
|
||||
- <hide>#if $generate_options().startswith('hb')
|
||||
-all#slurp
|
||||
-#elif $max_nouts()
|
||||
-none#slurp
|
||||
-#else
|
||||
-part#slurp
|
||||
-#end if</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Realtime Scheduling</name>
|
||||
- <key>realtime_scheduling</key>
|
||||
- <value></value>
|
||||
- <type>enum</type>
|
||||
- <hide>#if $generate_options().startswith('hb')
|
||||
-all#slurp
|
||||
-#elif $realtime_scheduling()
|
||||
-none#slurp
|
||||
-#else
|
||||
-part#slurp
|
||||
-#end if</hide>
|
||||
- <option>
|
||||
- <name>Off</name>
|
||||
- <key></key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>On</name>
|
||||
- <key>1</key>
|
||||
- </option>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>QSS Theme</name>
|
||||
- <key>qt_qss_theme</key>
|
||||
- <value></value>
|
||||
- <type>file_open</type>
|
||||
- <hide>
|
||||
-#if $generate_options() in ('qt_gui',)
|
||||
- #if $qt_qss_theme()
|
||||
- none
|
||||
- #else
|
||||
- part
|
||||
- #end if
|
||||
-#else
|
||||
- all
|
||||
-#end if
|
||||
-</hide>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Thread-safe setters</name>
|
||||
- <key>thread_safe_setters</key>
|
||||
- <value></value>
|
||||
- <type>enum</type>
|
||||
- <hide>part</hide>
|
||||
- <option>
|
||||
- <name>Off</name>
|
||||
- <key></key>
|
||||
- </option>
|
||||
- <option>
|
||||
- <name>On</name>
|
||||
- <key>1</key>
|
||||
- </option>
|
||||
- <tab>Advanced</tab>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Run Command</name>
|
||||
- <key>run_command</key>
|
||||
- <value>{python} -u {filename}</value>
|
||||
- <type>string</type>
|
||||
- <hide>#if $generate_options().startswith('hb')
|
||||
-all#slurp
|
||||
-#else
|
||||
-part#slurp
|
||||
-#end if</hide>
|
||||
- <tab>Advanced</tab>
|
||||
- </param>
|
||||
- <param>
|
||||
- <name>Hier Block Source Path</name>
|
||||
- <key>hier_block_src_path</key>
|
||||
- <value>.:</value>
|
||||
- <type>string</type>
|
||||
- <hide>part</hide>
|
||||
- <tab>Advanced</tab>
|
||||
- </param>
|
||||
- <check>not $window_size or len($window_size) == 2</check>
|
||||
- <check>not $window_size or 300 <= $(window_size)[0] <= 4096</check>
|
||||
- <check>not $window_size or 300 <= $(window_size)[1] <= 4096</check>
|
||||
- <check>len($placement) == 4 or len($placement) == 2</check>
|
||||
- <check>all(i >= 0 for i in $(placement))</check>
|
||||
- <doc>
|
||||
-The options block sets special parameters for the flow graph. \
|
||||
-Only one option block is allowed per flow graph.
|
||||
-
|
||||
-Title, author, and description parameters are for identification purposes.
|
||||
-
|
||||
-The window size controls the dimensions of the flow graph editor. \
|
||||
-The window size (width, height) must be between (300, 300) and (4096, 4096).
|
||||
-
|
||||
-The generate options controls the type of code generated. \
|
||||
-Non-graphical flow graphs should avoid using graphical sinks or graphical variable controls.
|
||||
-
|
||||
-In a graphical application, \
|
||||
-run can be controlled by a variable to start and stop the flowgraph at runtime.
|
||||
-
|
||||
-The id of this block determines the name of the generated file and the name of the class. \
|
||||
-For example, an id of my_block will generate the file my_block.py and class my_block(gr....
|
||||
-
|
||||
-The category parameter determines the placement of the block in the block selection window. \
|
||||
-The category only applies when creating hier blocks. \
|
||||
-To put hier blocks into the root category, enter / for the category.
|
||||
-
|
||||
-The Max Number of Output is the maximum number of output items allowed for any block \
|
||||
-in the flowgraph; to disable this set the max_nouts equal to 0.\
|
||||
-Use this to adjust the maximum latency a flowgraph can exhibit.
|
||||
- </doc>
|
||||
-</block>
|
||||
--- /dev/null
|
||||
+++ b/grc/blocks/options.xml
|
||||
@@ -0,0 +1,294 @@
|
||||
+<?xml version="1.0"?>
|
||||
+<!--
|
||||
+###################################################
|
||||
+##Options Block:
|
||||
+## options for window size,
|
||||
+## and flow graph building.
|
||||
+###################################################
|
||||
+ -->
|
||||
+<block>
|
||||
+ <name>Options</name>
|
||||
+ <key>options</key>
|
||||
+ <import>from gnuradio import gr</import>
|
||||
+ <import>from gnuradio.filter import firdes</import>
|
||||
+ <import>#if $generate_options() == 'wx_gui'
|
||||
+from grc_gnuradio import wxgui as grc_wxgui
|
||||
+import wx
|
||||
+#end if
|
||||
+#if $generate_options() == 'qt_gui'
|
||||
+from PyQt5 import Qt
|
||||
+import sys
|
||||
+#end if
|
||||
+#if $generate_options() == 'bokeh_gui'
|
||||
+import time
|
||||
+import signal
|
||||
+import functools
|
||||
+from bokeh.client import push_session
|
||||
+from bokeh.plotting import curdoc
|
||||
+#end if
|
||||
+#if not $generate_options().startswith('hb')
|
||||
+from optparse import OptionParser
|
||||
+from gnuradio.eng_option import eng_option
|
||||
+from gnuradio import eng_notation
|
||||
+#end if</import>
|
||||
+ <make></make>
|
||||
+ <callback>if $run: self.start()
|
||||
+else: self.stop(); self.wait()</callback>
|
||||
+ <param>
|
||||
+ <name>Title</name>
|
||||
+ <key>title</key>
|
||||
+ <value></value>
|
||||
+ <type>string</type>
|
||||
+ <hide>#if $title() then 'none' else 'part'#</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Author</name>
|
||||
+ <key>author</key>
|
||||
+ <value></value>
|
||||
+ <type>string</type>
|
||||
+ <hide>#if $author() then 'none' else 'part'#</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Description</name>
|
||||
+ <key>description</key>
|
||||
+ <value></value>
|
||||
+ <type>string</type>
|
||||
+ <hide>#if $description() then 'none' else 'part'#</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Canvas Size</name>
|
||||
+ <key>window_size</key>
|
||||
+ <value></value>
|
||||
+ <type>int_vector</type>
|
||||
+ <hide>part</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Generate Options</name>
|
||||
+ <key>generate_options</key>
|
||||
+ <value>qt_gui</value>
|
||||
+ <type>enum</type>
|
||||
+ <option>
|
||||
+ <name>Bokeh GUI</name>
|
||||
+ <key>bokeh_gui</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>QT GUI</name>
|
||||
+ <key>qt_gui</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>WX GUI</name>
|
||||
+ <key>wx_gui</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>No GUI</name>
|
||||
+ <key>no_gui</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Hier Block</name>
|
||||
+ <key>hb</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Hier Block (QT GUI)</name>
|
||||
+ <key>hb_qt_gui</key>
|
||||
+ </option>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Category</name>
|
||||
+ <key>category</key>
|
||||
+ <value>[GRC Hier Blocks]</value>
|
||||
+ <type>string</type>
|
||||
+ <hide>#if $generate_options().startswith('hb') then 'none' else 'all'#</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Run Options</name>
|
||||
+ <key>run_options</key>
|
||||
+ <value>prompt</value>
|
||||
+ <type>enum</type>
|
||||
+ <hide>#if $generate_options() == 'no_gui' then 'none' else 'all'#</hide>
|
||||
+ <option>
|
||||
+ <name>Run to Completion</name>
|
||||
+ <key>run</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Prompt for Exit</name>
|
||||
+ <key>prompt</key>
|
||||
+ </option>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Widget Placement</name>
|
||||
+ <key>placement</key>
|
||||
+ <value>(0,0)</value>
|
||||
+ <type>int_vector</type>
|
||||
+ <hide>#if $generate_options() == 'bokeh_gui' then 'part' else 'all'#</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Sizing Mode</name>
|
||||
+ <key>sizing_mode</key>
|
||||
+ <value>fixed</value>
|
||||
+ <type>enum</type>
|
||||
+ <hide>#if $generate_options() == 'bokeh_gui' then 'part' else 'all'#</hide>
|
||||
+ <option>
|
||||
+ <name>Fixed</name>
|
||||
+ <key>fixed</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Stretch Both</name>
|
||||
+ <key>stretch_both</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Scale Width</name>
|
||||
+ <key>scale_width</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Scale Height</name>
|
||||
+ <key>scale_height</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Scale Both</name>
|
||||
+ <key>scale_both</key>
|
||||
+ </option>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Run</name>
|
||||
+ <key>run</key>
|
||||
+ <value>True</value>
|
||||
+ <type>bool</type>
|
||||
+ <hide>
|
||||
+#if $generate_options() in ('qt_gui', 'wx_gui', 'bokeh_gui')
|
||||
+ #if $run()
|
||||
+ part
|
||||
+ #else
|
||||
+ none
|
||||
+ #end if
|
||||
+#else
|
||||
+ all
|
||||
+#end if
|
||||
+ </hide>
|
||||
+ <option>
|
||||
+ <name>Autostart</name>
|
||||
+ <key>True</key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>Off</name>
|
||||
+ <key>False</key>
|
||||
+ </option>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Max Number of Output</name>
|
||||
+ <key>max_nouts</key>
|
||||
+ <value>0</value>
|
||||
+ <type>int</type>
|
||||
+ <hide>#if $generate_options().startswith('hb')
|
||||
+all#slurp
|
||||
+#elif $max_nouts()
|
||||
+none#slurp
|
||||
+#else
|
||||
+part#slurp
|
||||
+#end if</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Realtime Scheduling</name>
|
||||
+ <key>realtime_scheduling</key>
|
||||
+ <value></value>
|
||||
+ <type>enum</type>
|
||||
+ <hide>#if $generate_options().startswith('hb')
|
||||
+all#slurp
|
||||
+#elif $realtime_scheduling()
|
||||
+none#slurp
|
||||
+#else
|
||||
+part#slurp
|
||||
+#end if</hide>
|
||||
+ <option>
|
||||
+ <name>Off</name>
|
||||
+ <key></key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>On</name>
|
||||
+ <key>1</key>
|
||||
+ </option>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>QSS Theme</name>
|
||||
+ <key>qt_qss_theme</key>
|
||||
+ <value></value>
|
||||
+ <type>file_open</type>
|
||||
+ <hide>
|
||||
+#if $generate_options() in ('qt_gui',)
|
||||
+ #if $qt_qss_theme()
|
||||
+ none
|
||||
+ #else
|
||||
+ part
|
||||
+ #end if
|
||||
+#else
|
||||
+ all
|
||||
+#end if
|
||||
+</hide>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Thread-safe setters</name>
|
||||
+ <key>thread_safe_setters</key>
|
||||
+ <value></value>
|
||||
+ <type>enum</type>
|
||||
+ <hide>part</hide>
|
||||
+ <option>
|
||||
+ <name>Off</name>
|
||||
+ <key></key>
|
||||
+ </option>
|
||||
+ <option>
|
||||
+ <name>On</name>
|
||||
+ <key>1</key>
|
||||
+ </option>
|
||||
+ <tab>Advanced</tab>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Run Command</name>
|
||||
+ <key>run_command</key>
|
||||
+ <value>{python} -u {filename}</value>
|
||||
+ <type>string</type>
|
||||
+ <hide>#if $generate_options().startswith('hb')
|
||||
+all#slurp
|
||||
+#else
|
||||
+part#slurp
|
||||
+#end if</hide>
|
||||
+ <tab>Advanced</tab>
|
||||
+ </param>
|
||||
+ <param>
|
||||
+ <name>Hier Block Source Path</name>
|
||||
+ <key>hier_block_src_path</key>
|
||||
+ <value>.:</value>
|
||||
+ <type>string</type>
|
||||
+ <hide>part</hide>
|
||||
+ <tab>Advanced</tab>
|
||||
+ </param>
|
||||
+ <check>not $window_size or len($window_size) == 2</check>
|
||||
+ <check>not $window_size or 300 <= $(window_size)[0] <= 4096</check>
|
||||
+ <check>not $window_size or 300 <= $(window_size)[1] <= 4096</check>
|
||||
+ <check>len($placement) == 4 or len($placement) == 2</check>
|
||||
+ <check>all(i >= 0 for i in $(placement))</check>
|
||||
+ <doc>
|
||||
+The options block sets special parameters for the flow graph. \
|
||||
+Only one option block is allowed per flow graph.
|
||||
+
|
||||
+Title, author, and description parameters are for identification purposes.
|
||||
+
|
||||
+The window size controls the dimensions of the flow graph editor. \
|
||||
+The window size (width, height) must be between (300, 300) and (4096, 4096).
|
||||
+
|
||||
+The generate options controls the type of code generated. \
|
||||
+Non-graphical flow graphs should avoid using graphical sinks or graphical variable controls.
|
||||
+
|
||||
+In a graphical application, \
|
||||
+run can be controlled by a variable to start and stop the flowgraph at runtime.
|
||||
+
|
||||
+The id of this block determines the name of the generated file and the name of the class. \
|
||||
+For example, an id of my_block will generate the file my_block.py and class my_block(gr....
|
||||
+
|
||||
+The category parameter determines the placement of the block in the block selection window. \
|
||||
+The category only applies when creating hier blocks. \
|
||||
+To put hier blocks into the root category, enter / for the category.
|
||||
+
|
||||
+The Max Number of Output is the maximum number of output items allowed for any block \
|
||||
+in the flowgraph; to disable this set the max_nouts equal to 0.\
|
||||
+Use this to adjust the maximum latency a flowgraph can exhibit.
|
||||
+ </doc>
|
||||
+</block>
|
@ -1,375 +0,0 @@
|
||||
From d796f30a241ed29831d597ee27df01556a80d2f1 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Koslowski <koslowski@kit.edu>
|
||||
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 @@
|
||||
<block>
|
||||
<name>QT GUI Bercurve Sink</name>
|
||||
<key>qtgui_bercurve_sink</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<import>import numpy</import>
|
||||
diff --git a/gr-qtgui/grc/qtgui_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 @@
|
||||
<block>
|
||||
<name>QT GUI Check Box</name>
|
||||
<key>variable_qtgui_check_box</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = '_%s_check_box'%$id
|
||||
#if not $label()
|
||||
diff --git a/gr-qtgui/grc/qtgui_chooser.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Chooser</name>
|
||||
<key>variable_qtgui_chooser</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@.QtCore import QObject, pyqtSlot</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
+ <import>from PyQt5.QtCore import QObject, pyqtSlot</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#slurp
|
||||
#set $all_options = [$option0, $option1, $option2, $option3, $option4][:int($num_opts())]
|
||||
diff --git a/gr-qtgui/grc/qtgui_const_sink_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Constellation Sink</name>
|
||||
<key>qtgui_const_sink_x</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_edit_box_msg.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Message Edit Box</name>
|
||||
<key>qtgui_edit_box_msg</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_entry.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Entry</name>
|
||||
<key>variable_qtgui_entry</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import eng_notation</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = 'self._%s_tool_bar'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_freq_sink_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Frequency Sink</name>
|
||||
<key>qtgui_freq_sink_x</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
diff --git a/gr-qtgui/grc/qtgui_histogram_sink_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Histogram Sink</name>
|
||||
<key>qtgui_histogram_sink_x</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_label.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Label</name>
|
||||
<key>variable_qtgui_label</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import eng_notation</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = 'self._%s_tool_bar'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_number_sink.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Number Sink</name>
|
||||
<key>qtgui_number_sink</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_push_button.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Push Button</name>
|
||||
<key>variable_qtgui_push_button</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<var_make>self.$(id) = $(id) = $value</var_make>
|
||||
<make>#set $win = '_%s_push_button'%$id
|
||||
#if not $label()
|
||||
diff --git a/gr-qtgui/grc/qtgui_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 @@
|
||||
<block>
|
||||
<name>QT GUI Sink</name>
|
||||
<key>qtgui_sink_x</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
diff --git a/gr-qtgui/grc/qtgui_tab_widget.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Tab Widget</name>
|
||||
<key>qtgui_tab_widget</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<make>#set $win = 'self.%s'%$id
|
||||
Qt.QTabWidget()
|
||||
#set $all_labels = [$label0, $label1, $label2, $label3, $label4,
|
||||
diff --git a/gr-qtgui/grc/qtgui_time_raster_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Time Raster Sink</name>
|
||||
<key>qtgui_time_raster_sink_x</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_time_sink_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Time Sink</name>
|
||||
<key>qtgui_time_sink_x</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
diff --git a/gr-qtgui/grc/qtgui_vector_sink_f.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Vector Sink</name>
|
||||
<key>qtgui_vector_sink_f</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>import sip</import>
|
||||
<make>#set $win = 'self._%s_win'%$id
|
||||
diff --git a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml.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 @@
|
||||
<block>
|
||||
<name>QT GUI Waterfall Sink</name>
|
||||
<key>qtgui_waterfall_sink_x</key>
|
||||
- <import>from PyQt@DESIRED_QT_VERSION@ import Qt</import>
|
||||
+ <import>from PyQt5 import Qt</import>
|
||||
<import>from gnuradio import qtgui</import>
|
||||
<import>from gnuradio.filter import firdes</import>
|
||||
<import>import sip</import>
|
||||
--
|
||||
2.11.0
|
||||
|
@ -1,25 +0,0 @@
|
||||
From ae10f7b4f1ec25fc2e800d42a061603a08c0283b Mon Sep 17 00:00:00 2001
|
||||
From: Bastian Bloessl <bloessl@ccs-labs.org>
|
||||
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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,61 +0,0 @@
|
||||
From b12439f3f600b9d0be03189e8a82310d9ceabdd6 Mon Sep 17 00:00:00 2001
|
||||
From: "A. Maitland Bottoms" <bottoms@debian.org>
|
||||
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
|
||||
|
@ -1,72 +0,0 @@
|
||||
From 18f5edf38cc6a24836f943d6976d913a4f35cab3 Mon Sep 17 00:00:00 2001
|
||||
From: "A. Maitland Bottoms" <bottoms@debian.org>
|
||||
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(-)
|
||||
|
||||
--- a/gr-uhd/apps/uhd_fft
|
||||
+++ b/gr-uhd/apps/uhd_fft
|
||||
@@ -40,7 +40,7 @@
|
||||
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
|
||||
@@ -478,8 +478,8 @@
|
||||
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()
|
||||
@@ -487,7 +487,7 @@
|
||||
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
|
||||
|
||||
--- a/gr-uhd/apps/uhd_siggen_gui
|
||||
+++ b/gr-uhd/apps/uhd_siggen_gui
|
||||
@@ -38,8 +38,8 @@
|
||||
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 @@
|
||||
""" 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
|
||||
|
@ -1,39 +0,0 @@
|
||||
From af4ab4e0f745ef3d61effc71824b09d0c15d8b86 Mon Sep 17 00:00:00 2001
|
||||
From: "A. Maitland Bottoms" <bottoms@debian.org>
|
||||
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
|
||||
|
@ -1,85 +0,0 @@
|
||||
From b65bf73bc174183d6aec476c2fb161a4911c2351 Mon Sep 17 00:00:00 2001
|
||||
From: Vasil Velichkov <vvvelichkov@gmail.com>
|
||||
Date: Thu, 11 Jan 2018 00:32:37 +0000
|
||||
Subject: [PATCH 27/27] Fix AttributeError: 'NoneType' object has no attribute
|
||||
'toByteArray'
|
||||
|
||||
Debian Bug #886807
|
||||
---
|
||||
gr-uhd/apps/uhd_fft | 6 +++---
|
||||
gr-uhd/apps/uhd_siggen_gui | 4 ++--
|
||||
grc/blocks/options.xml | 2 +-
|
||||
grc/core/generator/flow_graph.tmpl | 2 +-
|
||||
4 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/gr-uhd/apps/uhd_fft
|
||||
+++ b/gr-uhd/apps/uhd_fft
|
||||
@@ -40,7 +40,7 @@
|
||||
import threading
|
||||
import time
|
||||
from distutils.version import StrictVersion
|
||||
-from PyQt5 import Qt
|
||||
+from PyQt5 import Qt, QtCore
|
||||
from gnuradio import eng_notation
|
||||
from gnuradio import eng_arg
|
||||
from gnuradio import gr
|
||||
@@ -60,7 +60,7 @@
|
||||
"""
|
||||
def __init__(self, args):
|
||||
gr.top_block.__init__(self, "UHD FFT")
|
||||
- Qt.QWidget.__init__(self)
|
||||
+ Qt.QWidget.__init__(self, args=args)
|
||||
UHDApp.__init__(self, args=args, prefix="UHD FFT")
|
||||
##################################################
|
||||
# Init QT App
|
||||
@@ -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")
|
||||
- self.restoreGeometry(self.settings.value("geometry").toByteArray())
|
||||
+ self.restoreGeometry(self.settings.value("geometry", type=QtCore.QByteArray))
|
||||
|
||||
##################################################
|
||||
# Parameters
|
||||
--- a/gr-uhd/apps/uhd_siggen_gui
|
||||
+++ b/gr-uhd/apps/uhd_siggen_gui
|
||||
@@ -39,7 +39,7 @@
|
||||
import time
|
||||
from distutils.version import StrictVersion
|
||||
from PyQt5 import Qt
|
||||
-from PyQt5.QtCore import pyqtSlot
|
||||
+from PyQt5.QtCore import pyqtSlot, QByteArray
|
||||
from gnuradio import analog
|
||||
from gnuradio import eng_notation
|
||||
from gnuradio import gr
|
||||
@@ -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")
|
||||
- self.restoreGeometry(self.settings.value("geometry").toByteArray())
|
||||
+ self.restoreGeometry(self.settings.value("geometry", type=QByteArray))
|
||||
|
||||
##################################################
|
||||
# Widgets + Controls
|
||||
--- a/grc/blocks/options.xml
|
||||
+++ b/grc/blocks/options.xml
|
||||
@@ -16,7 +16,7 @@
|
||||
import wx
|
||||
#end if
|
||||
#if $generate_options() == 'qt_gui'
|
||||
-from PyQt5 import Qt
|
||||
+from PyQt5 import Qt, QtCore
|
||||
import sys
|
||||
#end if
|
||||
#if $generate_options() == 'bokeh_gui'
|
||||
--- a/grc/core/generator/flow_graph.tmpl
|
||||
+++ b/grc/core/generator/flow_graph.tmpl
|
||||
@@ -122,7 +122,7 @@
|
||||
self.top_layout.addLayout(self.top_grid_layout)
|
||||
|
||||
self.settings = Qt.QSettings("GNU Radio", "$class_name")
|
||||
- self.restoreGeometry(self.settings.value("geometry"))
|
||||
+ self.restoreGeometry(self.settings.value("geometry", type=QtCore.QByteArray))
|
||||
|
||||
#elif $generate_options == 'bokeh_gui'
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:32131ba17846850c07270bc5897dd2de7130ec02ca029875a36966335120e7bf
|
||||
size 233371
|
Loading…
x
Reference in New Issue
Block a user