[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/08: gr-qtgui: update for Qt5
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/08: gr-qtgui: update for Qt5 |
Date: |
Sat, 28 Nov 2015 21:28:40 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch next-qt5
in repository gnuradio.
commit 21cc755839e07f2aae9b5f0bfb075527250c0f56
Author: Paul Cercueil <address@hidden>
Date: Tue Sep 29 11:25:47 2015 +0200
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 <address@hidden>
---
gr-qtgui/CMakeLists.txt | 11 ++++-------
gr-qtgui/grc/qtgui_ber_sink_b.xml | 2 +-
gr-qtgui/grc/qtgui_check_box.xml | 2 +-
gr-qtgui/grc/qtgui_chooser.xml | 4 ++--
gr-qtgui/grc/qtgui_const_sink_x.xml | 2 +-
gr-qtgui/grc/qtgui_entry.xml | 2 +-
gr-qtgui/grc/qtgui_freq_sink_x.xml | 2 +-
gr-qtgui/grc/qtgui_histogram_sink_x.xml | 2 +-
gr-qtgui/grc/qtgui_label.xml | 2 +-
gr-qtgui/grc/qtgui_number_sink.xml | 2 +-
gr-qtgui/grc/qtgui_push_button.xml | 2 +-
gr-qtgui/grc/qtgui_sink_x.xml | 2 +-
gr-qtgui/grc/qtgui_tab_widget.xml | 2 +-
gr-qtgui/grc/qtgui_time_raster_x.xml | 2 +-
gr-qtgui/grc/qtgui_time_sink_x.xml | 2 +-
gr-qtgui/grc/qtgui_vector_sink_f.xml | 2 +-
gr-qtgui/grc/qtgui_waterfall_sink_x.xml | 2 +-
gr-qtgui/include/gnuradio/qtgui/form_menus.h | 1 +
gr-qtgui/lib/CMakeLists.txt | 8 ++++----
gr-qtgui/lib/SpectrumGUIClass.cc | 1 -
gr-qtgui/lib/const_sink_c_impl.cc | 4 ----
gr-qtgui/lib/freq_sink_c_impl.cc | 4 ----
gr-qtgui/lib/freq_sink_f_impl.cc | 4 ----
gr-qtgui/lib/histogram_sink_f_impl.cc | 4 ----
gr-qtgui/lib/sink_c_impl.cc | 4 ----
gr-qtgui/lib/sink_f_impl.cc | 4 ----
gr-qtgui/lib/time_raster_sink_b_impl.cc | 4 ----
gr-qtgui/lib/time_raster_sink_f_impl.cc | 4 ----
gr-qtgui/lib/time_sink_c_impl.cc | 4 ----
gr-qtgui/lib/time_sink_f_impl.cc | 4 ----
gr-qtgui/lib/vector_sink_f_impl.cc | 4 ----
gr-qtgui/lib/waterfall_sink_c_impl.cc | 4 ----
gr-qtgui/lib/waterfall_sink_f_impl.cc | 4 ----
gr-qtgui/python/qtgui/range.py | 26 +++++++++++++-------------
34 files changed, 39 insertions(+), 94 deletions(-)
diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt
index ce05bd0..4b491fa 100644
--- a/gr-qtgui/CMakeLists.txt
+++ b/gr-qtgui/CMakeLists.txt
@@ -22,14 +22,14 @@
########################################################################
include(GrBoost)
-find_package(Qt4 4.2.0 COMPONENTS QtCore QtGui)
+find_package(Qt5Widgets)
find_package(Qwt)
find_package(PythonLibs 2)
include(GrPython)
-GR_PYTHON_CHECK_MODULE("PyQt4" PyQt4 True PYQT4_FOUND)
+GR_PYTHON_CHECK_MODULE("PyQt5" PyQt5 True PYQT5_FOUND)
########################################################################
# Register component
@@ -37,13 +37,13 @@ GR_PYTHON_CHECK_MODULE("PyQt4" PyQt4 True PYQT4_FOUND)
include(GrComponent)
if(NOT CMAKE_CROSSCOMPILING)
set(qt_gui_python_deps
- PYQT4_FOUND
+ PYQT5_FOUND
)
endif(NOT CMAKE_CROSSCOMPILING)
GR_REGISTER_COMPONENT("gr-qtgui" ENABLE_GR_QTGUI
Boost_FOUND
- QT4_FOUND
+ Qt5Widgets_FOUND
QWT_FOUND
ENABLE_VOLK
ENABLE_GNURADIO_RUNTIME
@@ -66,9 +66,6 @@ SET(GR_PKG_QTGUI_EXAMPLES_DIR
${GR_PKG_DATA_DIR}/examples/qt-gui)
########################################################################
if(ENABLE_GR_QTGUI)
-# populate the environment with QT variables
-include(GrSetupQt4)
-
########################################################################
# Setup CPack components
########################################################################
diff --git a/gr-qtgui/grc/qtgui_ber_sink_b.xml
b/gr-qtgui/grc/qtgui_ber_sink_b.xml
index da3fc6e..085bf28 100644
--- a/gr-qtgui/grc/qtgui_ber_sink_b.xml
+++ b/gr-qtgui/grc/qtgui_ber_sink_b.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Bercurve Sink</name>
<key>qtgui_bercurve_sink</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<import>import numpy</import>
diff --git a/gr-qtgui/grc/qtgui_check_box.xml b/gr-qtgui/grc/qtgui_check_box.xml
index 67c8848..ccee59d 100644
--- a/gr-qtgui/grc/qtgui_check_box.xml
+++ b/gr-qtgui/grc/qtgui_check_box.xml
@@ -8,7 +8,7 @@
<block>
<name>QT GUI Check Box</name>
<key>variable_qtgui_check_box</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $win = '_%s_check_box'%$id
#if not $label()
diff --git a/gr-qtgui/grc/qtgui_chooser.xml b/gr-qtgui/grc/qtgui_chooser.xml
index f018354..f79bb8c 100644
--- a/gr-qtgui/grc/qtgui_chooser.xml
+++ b/gr-qtgui/grc/qtgui_chooser.xml
@@ -8,8 +8,8 @@
<block>
<name>QT GUI Chooser</name>
<key>variable_qtgui_chooser</key>
- <import>from PyQt4 import Qt</import>
- <import>from PyQt4.QtCore import QObject, pyqtSlot</import>
+ <import>from PyQt5 import Qt</import>
+ <import>from PyQt5.QtCore import QObject, pyqtSlot</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#slurp
#set $all_options = [$option0, $option1, $option2, $option3,
$option4][:int($num_opts())]
diff --git a/gr-qtgui/grc/qtgui_const_sink_x.xml
b/gr-qtgui/grc/qtgui_const_sink_x.xml
index c17ceff..35e9629 100644
--- a/gr-qtgui/grc/qtgui_const_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_const_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Constellation Sink</name>
<key>qtgui_const_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<make>#set $win = 'self._%s_win'%$id
diff --git a/gr-qtgui/grc/qtgui_entry.xml b/gr-qtgui/grc/qtgui_entry.xml
index cce2edb..fc0f408 100644
--- a/gr-qtgui/grc/qtgui_entry.xml
+++ b/gr-qtgui/grc/qtgui_entry.xml
@@ -8,7 +8,7 @@
<block>
<name>QT GUI Entry</name>
<key>variable_qtgui_entry</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import eng_notation</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $win = 'self._%s_tool_bar'%$id
diff --git a/gr-qtgui/grc/qtgui_freq_sink_x.xml
b/gr-qtgui/grc/qtgui_freq_sink_x.xml
index 67e852c..8d91b37 100644
--- a/gr-qtgui/grc/qtgui_freq_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_freq_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Frequency Sink</name>
<key>qtgui_freq_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>from gnuradio.filter import firdes</import>
<import>import sip</import>
diff --git a/gr-qtgui/grc/qtgui_histogram_sink_x.xml
b/gr-qtgui/grc/qtgui_histogram_sink_x.xml
index ba04da1..60126e3 100644
--- a/gr-qtgui/grc/qtgui_histogram_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_histogram_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Histogram Sink</name>
<key>qtgui_histogram_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<make>#set $win = 'self._%s_win'%$id
diff --git a/gr-qtgui/grc/qtgui_label.xml b/gr-qtgui/grc/qtgui_label.xml
index 0d844a1..18d4e3a 100644
--- a/gr-qtgui/grc/qtgui_label.xml
+++ b/gr-qtgui/grc/qtgui_label.xml
@@ -9,7 +9,7 @@
<block>
<name>QT GUI Label</name>
<key>variable_qtgui_label</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import eng_notation</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $win = 'self._%s_tool_bar'%$id
diff --git a/gr-qtgui/grc/qtgui_number_sink.xml
b/gr-qtgui/grc/qtgui_number_sink.xml
index 46b58f6..be0b21c 100644
--- a/gr-qtgui/grc/qtgui_number_sink.xml
+++ b/gr-qtgui/grc/qtgui_number_sink.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Number Sink</name>
<key>qtgui_number_sink</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<make>#set $win = 'self._%s_win'%$id
diff --git a/gr-qtgui/grc/qtgui_push_button.xml
b/gr-qtgui/grc/qtgui_push_button.xml
index a535bb6..49c2e9d 100644
--- a/gr-qtgui/grc/qtgui_push_button.xml
+++ b/gr-qtgui/grc/qtgui_push_button.xml
@@ -8,7 +8,7 @@
<block>
<name>QT GUI Push Button</name>
<key>variable_qtgui_push_button</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $win = '_%s_push_button'%$id
#if not $label()
diff --git a/gr-qtgui/grc/qtgui_sink_x.xml b/gr-qtgui/grc/qtgui_sink_x.xml
index 7488ea5..a9bc469 100644
--- a/gr-qtgui/grc/qtgui_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Sink</name>
<key>qtgui_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>from gnuradio.filter import firdes</import>
<import>import sip</import>
diff --git a/gr-qtgui/grc/qtgui_tab_widget.xml
b/gr-qtgui/grc/qtgui_tab_widget.xml
index 1bbadc8..805542c 100644
--- a/gr-qtgui/grc/qtgui_tab_widget.xml
+++ b/gr-qtgui/grc/qtgui_tab_widget.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Tab Widget</name>
<key>qtgui_tab_widget</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<make>#set $win = 'self.%s'%$id
Qt.QTabWidget()
#set $all_labels = [$label0, $label1, $label2, $label3, $label4,
diff --git a/gr-qtgui/grc/qtgui_time_raster_x.xml
b/gr-qtgui/grc/qtgui_time_raster_x.xml
index 16619cb..5f9481f 100644
--- a/gr-qtgui/grc/qtgui_time_raster_x.xml
+++ b/gr-qtgui/grc/qtgui_time_raster_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Time Raster Sink</name>
<key>qtgui_time_raster_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<make>#set $win = 'self._%s_win'%$id
diff --git a/gr-qtgui/grc/qtgui_time_sink_x.xml
b/gr-qtgui/grc/qtgui_time_sink_x.xml
index 0d77c4f..80370f5 100644
--- a/gr-qtgui/grc/qtgui_time_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_time_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Time Sink</name>
<key>qtgui_time_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>from gnuradio.filter import firdes</import>
<import>import sip</import>
diff --git a/gr-qtgui/grc/qtgui_vector_sink_f.xml
b/gr-qtgui/grc/qtgui_vector_sink_f.xml
index 9f40d57..0f45632 100644
--- a/gr-qtgui/grc/qtgui_vector_sink_f.xml
+++ b/gr-qtgui/grc/qtgui_vector_sink_f.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Vector Sink</name>
<key>qtgui_vector_sink_f</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>import sip</import>
<make>#set $win = 'self._%s_win'%$id
diff --git a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
index f0d0c60..dfa2773 100644
--- a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
@@ -7,7 +7,7 @@
<block>
<name>QT GUI Waterfall Sink</name>
<key>qtgui_waterfall_sink_x</key>
- <import>from PyQt4 import Qt</import>
+ <import>from PyQt5 import Qt</import>
<import>from gnuradio import qtgui</import>
<import>from gnuradio.filter import firdes</import>
<import>import sip</import>
diff --git a/gr-qtgui/include/gnuradio/qtgui/form_menus.h
b/gr-qtgui/include/gnuradio/qtgui/form_menus.h
index f60c50e..7def3ca 100644
--- 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>
diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt
index a0af95b..24f3458 100644
--- a/gr-qtgui/lib/CMakeLists.txt
+++ b/gr-qtgui/lib/CMakeLists.txt
@@ -44,8 +44,8 @@ set(qtgui_moc_hdrs
${qtgui_mod_includedir}/HistogramDisplayPlot.h
${qtgui_mod_includedir}/VectorDisplayPlot.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
@@ -125,7 +125,7 @@ include_directories(
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${QWT_INCLUDE_DIRS}
- ${QT_INCLUDE_DIRS}
+ ${Qt5Widgets_INCLUDE_DIRS}
${FFTW3F_INCLUDE_DIRS}
${LOG4CPP_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
@@ -154,7 +154,7 @@ list(APPEND qtgui_libs
gnuradio-filter
${VOLK_LIBRARIES}
${QWT_LIBRARIES}
- ${QT_LIBRARIES}
+ ${Qt5Widgets_LIBRARIES}
${FFTW3F_LIBRARIES}
${LOG4CPP_LIBRARIES}
)
diff --git a/gr-qtgui/lib/SpectrumGUIClass.cc b/gr-qtgui/lib/SpectrumGUIClass.cc
index cf7c728..fe1973f 100644
--- a/gr-qtgui/lib/SpectrumGUIClass.cc
+++ b/gr-qtgui/lib/SpectrumGUIClass.cc
@@ -26,7 +26,6 @@
#include <gnuradio/qtgui/SpectrumGUIClass.h>
//Added by qt3to4:
#include <QEvent>
-#include <QCustomEvent>
#include <volk/volk.h>
const long SpectrumGUIClass::MAX_FFT_SIZE = 32768;
diff --git a/gr-qtgui/lib/const_sink_c_impl.cc
b/gr-qtgui/lib/const_sink_c_impl.cc
index 0711315..9f5ddd7 100644
--- a/gr-qtgui/lib/const_sink_c_impl.cc
+++ b/gr-qtgui/lib/const_sink_c_impl.cc
@@ -115,10 +115,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/freq_sink_c_impl.cc b/gr-qtgui/lib/freq_sink_c_impl.cc
index ee2fc52..d9495b1 100644
--- a/gr-qtgui/lib/freq_sink_c_impl.cc
+++ b/gr-qtgui/lib/freq_sink_c_impl.cc
@@ -139,10 +139,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/freq_sink_f_impl.cc b/gr-qtgui/lib/freq_sink_f_impl.cc
index 05a2ff7..cf502c8 100644
--- a/gr-qtgui/lib/freq_sink_f_impl.cc
+++ b/gr-qtgui/lib/freq_sink_f_impl.cc
@@ -138,10 +138,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/histogram_sink_f_impl.cc
b/gr-qtgui/lib/histogram_sink_f_impl.cc
index cdaf5cf..caaede8 100644
--- a/gr-qtgui/lib/histogram_sink_f_impl.cc
+++ b/gr-qtgui/lib/histogram_sink_f_impl.cc
@@ -109,10 +109,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/sink_c_impl.cc b/gr-qtgui/lib/sink_c_impl.cc
index c1ee694..31186fc 100644
--- a/gr-qtgui/lib/sink_c_impl.cc
+++ b/gr-qtgui/lib/sink_c_impl.cc
@@ -130,10 +130,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/sink_f_impl.cc b/gr-qtgui/lib/sink_f_impl.cc
index d9bc526..7d03fa2 100644
--- a/gr-qtgui/lib/sink_f_impl.cc
+++ b/gr-qtgui/lib/sink_f_impl.cc
@@ -130,10 +130,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/time_raster_sink_b_impl.cc
b/gr-qtgui/lib/time_raster_sink_b_impl.cc
index afc5e90..9f852be 100644
--- a/gr-qtgui/lib/time_raster_sink_b_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_b_impl.cc
@@ -124,10 +124,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/time_raster_sink_f_impl.cc
b/gr-qtgui/lib/time_raster_sink_f_impl.cc
index 7d271ab..1a9686a 100644
--- a/gr-qtgui/lib/time_raster_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_f_impl.cc
@@ -122,10 +122,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/time_sink_c_impl.cc b/gr-qtgui/lib/time_sink_c_impl.cc
index fe33a09..25a3456 100644
--- a/gr-qtgui/lib/time_sink_c_impl.cc
+++ b/gr-qtgui/lib/time_sink_c_impl.cc
@@ -122,10 +122,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/time_sink_f_impl.cc b/gr-qtgui/lib/time_sink_f_impl.cc
index d0cafd4..3a102e5 100644
--- a/gr-qtgui/lib/time_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_sink_f_impl.cc
@@ -120,10 +120,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/vector_sink_f_impl.cc
b/gr-qtgui/lib/vector_sink_f_impl.cc
index ba139b9..6b1e387 100644
--- a/gr-qtgui/lib/vector_sink_f_impl.cc
+++ b/gr-qtgui/lib/vector_sink_f_impl.cc
@@ -139,10 +139,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.cc
b/gr-qtgui/lib/waterfall_sink_c_impl.cc
index 2c4045a..9cddc90 100644
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
@@ -154,10 +154,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.cc
b/gr-qtgui/lib/waterfall_sink_f_impl.cc
index d8ee567..fd0c691 100644
--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc
@@ -154,10 +154,6 @@ namespace gr {
d_qApplication = qApp;
}
else {
-#if QT_VERSION >= 0x040500
- std::string style = prefs::singleton()->get_string("qtgui", "style",
"raster");
- QApplication::setGraphicsSystem(QString(style.c_str()));
-#endif
d_qApplication = new QApplication(d_argc, &d_argv);
}
diff --git a/gr-qtgui/python/qtgui/range.py b/gr-qtgui/python/qtgui/range.py
index 3eafc90..c04ef75 100755
--- a/gr-qtgui/python/qtgui/range.py
+++ b/gr-qtgui/python/qtgui/range.py
@@ -21,7 +21,7 @@
# Boston, MA 02110-1301, USA.
#
-from PyQt4 import Qt, QtCore, QtGui
+from PyQt5 import Qt, QtCore, QtWidgets
class Range(object):
@@ -63,10 +63,10 @@ class Range(object):
return (val*self.step+self.min)
-class RangeWidget(QtGui.QWidget):
+class RangeWidget(QtWidgets.QWidget):
def __init__(self, ranges, slot, label, style, rangeType=float):
""" Creates the QT Range widget """
- QtGui.QWidget.__init__(self)
+ QtWidgets.QWidget.__init__(self)
self.range = ranges
self.style = style
@@ -97,10 +97,10 @@ class RangeWidget(QtGui.QWidget):
layout.addWidget(self.d_widget)
self.setLayout(layout)
- class Dial(QtGui.QDial):
+ class Dial(QtWidgets.QDial):
""" Creates the range using a dial """
def __init__(self, parent, ranges, slot, rangeType=float):
- QtGui.QDial.__init__(self, parent)
+ QtWidgets.QDial.__init__(self, parent)
self.rangeType = rangeType
@@ -123,10 +123,10 @@ class RangeWidget(QtGui.QWidget):
val = self.range.map_range(value)
self.notifyChanged(self.rangeType(val))
- class Slider(QtGui.QSlider):
+ class Slider(QtWidgets.QSlider):
""" Creates the range using a slider """
def __init__(self, parent, ranges, slot, rangeType=float):
- QtGui.QSlider.__init__(self, QtCore.Qt.Horizontal, parent)
+ QtWidgets.QSlider.__init__(self, QtCore.Qt.Horizontal, parent)
self.rangeType = rangeType
@@ -165,18 +165,18 @@ class RangeWidget(QtGui.QWidget):
event.accept()
# Use repaint rather than calling the super mousePressEvent.
# Calling super causes issue where slider jumps to wrong value.
- QtGui.QSlider.repaint(self)
+ QtWidgets.QSlider.repaint(self)
def mouseMoveEvent(self, event):
new = self.minimum() + ((self.maximum()-self.minimum()) *
event.x()) / self.width()
self.setValue(new)
event.accept()
- QtGui.QSlider.repaint(self)
+ QtWidgets.QSlider.repaint(self)
- class Counter(QtGui.QDoubleSpinBox):
+ class Counter(QtWidgets.QDoubleSpinBox):
""" Creates the range using a counter """
def __init__(self, parent, ranges, slot, rangeType=float):
- QtGui.QDoubleSpinBox.__init__(self, parent)
+ QtWidgets.QDoubleSpinBox.__init__(self, parent)
self.rangeType = rangeType
@@ -195,10 +195,10 @@ class RangeWidget(QtGui.QWidget):
""" Handle the valueChanged signal by converting to the right type
"""
self.notifyChanged(self.rangeType(value))
- class CounterSlider(QtGui.QWidget):
+ class CounterSlider(QtWidgets.QWidget):
""" Creates the range using a counter and slider """
def __init__(self, parent, ranges, slot, rangeType=float):
- QtGui.QWidget.__init__(self, parent)
+ QtWidgets.QWidget.__init__(self, parent)
self.rangeType = rangeType
- [Commit-gnuradio] [gnuradio] branch next-qt5 created (now 480420d), git, 2015/11/28
- [Commit-gnuradio] [gnuradio] 01/08: CMake: Update required minimum version to 2.8.12, git, 2015/11/28
- [Commit-gnuradio] [gnuradio] 04/08: grc: Generate Python scripts that use PyQt5, git, 2015/11/28
- [Commit-gnuradio] [gnuradio] 06/08: gr-qtgui: Add a workaround for an upstream bug of 'uic', git, 2015/11/28
- [Commit-gnuradio] [gnuradio] 08/08: Merge remote-tracking branch 'tom/qt5_next' into next-qt5, git, 2015/11/28
- [Commit-gnuradio] [gnuradio] 02/08: CMake: FindQwt: Find the Qt5 version of QWT instead of the Qt4 version, git, 2015/11/28
- [Commit-gnuradio] [gnuradio] 05/08: CMake: Remove obsolete GrSetupQt4 module, git, 2015/11/28
- [Commit-gnuradio] [gnuradio] 03/08: gr-qtgui: update for Qt5,
git <=
- [Commit-gnuradio] [gnuradio] 07/08: qtgui: fixed examples for Qt5 compatibility., git, 2015/11/28