summaryrefslogtreecommitdiff
path: root/gr-qtgui
diff options
context:
space:
mode:
authorJosh Blum2011-10-11 21:35:35 -0700
committerJosh Blum2011-10-11 21:35:35 -0700
commit1259a01a9479071bd1729a9c9496444f0a72509b (patch)
tree55350454454a119fb230cdbaadfb27d361f191ec /gr-qtgui
parent71c0f14a46f85027b95f2f5f6d3d219cc9e3783e (diff)
parent06860c309153890a6a42babfbedf230eb24f0042 (diff)
downloadgnuradio-1259a01a9479071bd1729a9c9496444f0a72509b.tar.gz
gnuradio-1259a01a9479071bd1729a9c9496444f0a72509b.tar.bz2
gnuradio-1259a01a9479071bd1729a9c9496444f0a72509b.zip
Merge branch 'next' of http://gnuradio.org/git/gnuradio into next
Conflicts: gr-digital/include/digital_constellation.h
Diffstat (limited to 'gr-qtgui')
-rw-r--r--gr-qtgui/CMakeLists.txt2
-rw-r--r--gr-qtgui/Makefile.am2
-rw-r--r--gr-qtgui/doc/.gitignore2
-rw-r--r--gr-qtgui/doc/Makefile.am27
-rw-r--r--gr-qtgui/doc/README.qtgui12
-rw-r--r--gr-qtgui/doc/qtgui.dox77
-rw-r--r--gr-qtgui/include/.gitignore2
-rw-r--r--gr-qtgui/include/CMakeLists.txt32
-rw-r--r--gr-qtgui/include/Makefile.am33
-rw-r--r--gr-qtgui/include/gr_qtgui_api.h (renamed from gr-qtgui/lib/gr_qtgui_api.h)0
-rw-r--r--gr-qtgui/include/qtgui_sink_c.h (renamed from gr-qtgui/lib/qtgui_sink_c.h)11
-rw-r--r--gr-qtgui/include/qtgui_sink_f.h (renamed from gr-qtgui/lib/qtgui_sink_f.h)13
-rw-r--r--gr-qtgui/include/qtgui_time_sink_c.h (renamed from gr-qtgui/lib/qtgui_time_sink_c.h)11
-rw-r--r--gr-qtgui/include/qtgui_time_sink_f.h (renamed from gr-qtgui/lib/qtgui_time_sink_f.h)9
-rw-r--r--gr-qtgui/include/qtgui_util.h (renamed from gr-qtgui/lib/qtgui_util.h)0
-rw-r--r--gr-qtgui/lib/CMakeLists.txt7
-rw-r--r--gr-qtgui/lib/Makefile.am12
-rw-r--r--gr-qtgui/python/__init__.py5
-rw-r--r--gr-qtgui/swig/Makefile.am1
-rw-r--r--gr-qtgui/swig/qtgui_sink_f.i2
20 files changed, 242 insertions, 18 deletions
diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt
index 3b522fb59..90371625c 100644
--- a/gr-qtgui/CMakeLists.txt
+++ b/gr-qtgui/CMakeLists.txt
@@ -46,6 +46,7 @@ GR_REGISTER_COMPONENT("gr-qtgui" ENABLE_GR_QTGUI
)
GR_SET_GLOBAL(GR_QTGUI_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/lib
${CMAKE_CURRENT_BINARY_DIR}/lib
)
@@ -92,6 +93,7 @@ CPACK_COMPONENT("qtgui_swig"
########################################################################
# Add subdirectories
########################################################################
+add_subdirectory(include)
add_subdirectory(lib)
if(ENABLE_PYTHON)
add_subdirectory(grc)
diff --git a/gr-qtgui/Makefile.am b/gr-qtgui/Makefile.am
index 38033e1ac..e850567cc 100644
--- a/gr-qtgui/Makefile.am
+++ b/gr-qtgui/Makefile.am
@@ -21,7 +21,7 @@
include $(top_srcdir)/Makefile.common
-SUBDIRS = lib
+SUBDIRS = include lib doc
if PYTHON
SUBDIRS += swig python apps grc examples
diff --git a/gr-qtgui/doc/.gitignore b/gr-qtgui/doc/.gitignore
new file mode 100644
index 000000000..b336cc7ce
--- /dev/null
+++ b/gr-qtgui/doc/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/gr-qtgui/doc/Makefile.am b/gr-qtgui/doc/Makefile.am
new file mode 100644
index 000000000..b65eb062f
--- /dev/null
+++ b/gr-qtgui/doc/Makefile.am
@@ -0,0 +1,27 @@
+#
+# Copyright 2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+include $(top_srcdir)/Makefile.common
+
+SUBDIRS =
+
+dist_gr_doc_DATA = \
+ README.qtgui
diff --git a/gr-qtgui/doc/README.qtgui b/gr-qtgui/doc/README.qtgui
new file mode 100644
index 000000000..e54c3d907
--- /dev/null
+++ b/gr-qtgui/doc/README.qtgui
@@ -0,0 +1,12 @@
+This is the gr-qtgui package. It contains various QT-based graphical
+user interface blocks that add graphical sinks to a GNU Radio
+flowgraph. The Python namespaces is in gnuradio.qtgui, which would be normally
+imported as:
+
+ from gnuradio import qtgui
+
+See the Doxygen documentation for details about the blocks available
+in this package. A quick listing of the details can be found in Python
+after importing by using:
+
+ help(qtgui)
diff --git a/gr-qtgui/doc/qtgui.dox b/gr-qtgui/doc/qtgui.dox
new file mode 100644
index 000000000..c7f4b7146
--- /dev/null
+++ b/gr-qtgui/doc/qtgui.dox
@@ -0,0 +1,77 @@
+/*! \page page_qtgui QT Graphical User Interface
+
+\section Introduction
+
+This is the gr-qtgui package. It contains various QT-based graphical
+user interface blocks that add graphical sinks to a GNU Radio
+flowgraph. The Python namespaces is in gnuradio.qtgui, which would be normally
+imported as:
+
+\code
+ from gnuradio import qtgui
+\endcode
+
+See the Doxygen documentation for details about the blocks available
+in this package. The relevant blocks are listed in the \ref
+qtgui_blk group.
+
+A quick listing of the details can be found in Python after importing
+by using:
+
+\code
+ help(qtgui)
+\endcode
+
+
+\section Dependencies
+
+The QT GUI blocks require the following dependencies.
+
+\li QtCore (version >= 4.4)
+\li QtGui (version >= 4.4)
+\li QtOpenGL (version >= 4.4)
+\li PyQt4 for Qt4 (version >= 4.4)
+\li Qwt (version >= 5.2)
+\li PyQwt5 for Qt4 (version >= 5.2)
+
+\section Usage
+
+To use the qtgui interface, a bit of boiler-plate lines must be
+included. First, the sink is defined, then it must be exposed from C++
+into Python using the "sip.wrapinstance" command, and finally, the
+"show" method is run on the new Python object. This sets up the QT
+environment to show the widget, but the qApplication must also be
+launched.
+
+In the "main" function of the code, the qApp is retrieved. Then, after
+the GNU Radio top block is started (remember that start() is a
+non-blocking call to launch the main thread of the flowgraph), the
+qapp's "exec_()" function is called. This function is a blocking call
+while the GUI is alive.
+
+\code
+from PyQt4 import Qt
+from gnuradio.qtgui import qtgui
+import sys, sip
+
+class grclass(gr.top_block):
+ ....
+
+ self.snk = qtgui.sink_c(1024, #fftsize
+ samp_rate, #bw
+ "QT GUI Plot") #name
+
+ self.snk_win = sip.wrapinstance(self.snk.pyqwidget(), Qt.QWidget)
+ self.snk_win.show()
+
+def main():
+ qapp = Qt.QApplication(sys.argv)
+ tb = grclass()
+ tb.start()
+ qapp.exec_()
+ tb.stop()
+
+
+\endcode
+
+*/
diff --git a/gr-qtgui/include/.gitignore b/gr-qtgui/include/.gitignore
new file mode 100644
index 000000000..b336cc7ce
--- /dev/null
+++ b/gr-qtgui/include/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/gr-qtgui/include/CMakeLists.txt b/gr-qtgui/include/CMakeLists.txt
new file mode 100644
index 000000000..ef4cb1175
--- /dev/null
+++ b/gr-qtgui/include/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Copyright 2010-2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+# Install the header files
+########################################################################
+install(FILES
+ gr_qtgui_api.h
+ qtgui_time_sink_c.h
+ qtgui_time_sink_f.h
+ qtgui_sink_c.h
+ qtgui_sink_f.h
+ qtgui_util.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "qtgui_devel"
+)
diff --git a/gr-qtgui/include/Makefile.am b/gr-qtgui/include/Makefile.am
new file mode 100644
index 000000000..59a030854
--- /dev/null
+++ b/gr-qtgui/include/Makefile.am
@@ -0,0 +1,33 @@
+#
+# Copyright 2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+include $(top_srcdir)/Makefile.common
+
+# These headers get installed in ${prefix}/include/gnuradio
+grinclude_HEADERS = \
+ gr_qtgui_api.h \
+ qtgui_time_sink_c.h \
+ qtgui_time_sink_f.h \
+ qtgui_sink_c.h \
+ qtgui_sink_f.h \
+ qtgui_util.h
+
+libgnuradio_digital_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS)
diff --git a/gr-qtgui/lib/gr_qtgui_api.h b/gr-qtgui/include/gr_qtgui_api.h
index 65033a093..65033a093 100644
--- a/gr-qtgui/lib/gr_qtgui_api.h
+++ b/gr-qtgui/include/gr_qtgui_api.h
diff --git a/gr-qtgui/lib/qtgui_sink_c.h b/gr-qtgui/include/qtgui_sink_c.h
index b0946885c..b04706b14 100644
--- a/gr-qtgui/lib/qtgui_sink_c.h
+++ b/gr-qtgui/include/qtgui_sink_c.h
@@ -41,6 +41,17 @@ GR_QTGUI_API qtgui_sink_c_sptr qtgui_make_sink_c (int fftsize, int wintype,
bool plottime=true, bool plotconst=true,
QWidget *parent=NULL);
+/*!
+ * \brief A graphical sink to display freq, spec, time, and const plots.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes a complex stream and
+ * plots it. The default action is to plot the signal as a PSD (FFT),
+ * spectrogram (waterfall), time domain I&Q, and constellation (I
+ * vs. Q) plots. The plots may be turned off by setting the
+ * appropriate boolean value in the constructor to False.
+ */
+
class GR_QTGUI_API qtgui_sink_c : public gr_block
{
private:
diff --git a/gr-qtgui/lib/qtgui_sink_f.h b/gr-qtgui/include/qtgui_sink_f.h
index 30db05eea..bc14147c2 100644
--- a/gr-qtgui/lib/qtgui_sink_f.h
+++ b/gr-qtgui/include/qtgui_sink_f.h
@@ -39,9 +39,20 @@ GR_QTGUI_API qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, int wintype,
double fc=0, double bw=1.0,
const std::string &name="Spectrum Display",
bool plotfreq=true, bool plotwaterfall=true,
- bool plottime=true, bool plotconst=true,
+ bool plottime=true, bool plotconst=false,
QWidget *parent=NULL);
+/*!
+ * \brief A graphical sink to display freq, spec, and time.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes a float stream and
+ * plots it. The default action is to plot the signal as a PSD (FFT),
+ * spectrogram (waterfall), and time domain plots. The plots may be
+ * turned off by setting the appropriate boolean value in the
+ * constructor to False.
+ */
+
class GR_QTGUI_API qtgui_sink_f : public gr_block
{
private:
diff --git a/gr-qtgui/lib/qtgui_time_sink_c.h b/gr-qtgui/include/qtgui_time_sink_c.h
index 51d5ad183..ec7cc490b 100644
--- a/gr-qtgui/lib/qtgui_time_sink_c.h
+++ b/gr-qtgui/include/qtgui_time_sink_c.h
@@ -39,6 +39,17 @@ GR_QTGUI_API qtgui_time_sink_c_sptr qtgui_make_time_sink_c(int size, double bw,
int nconnectons=1,
QWidget *parent=NULL);
+/*!
+ * \brief A graphical sink to display multiple signals in time.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes set of a complex
+ * streams and plots them in the time domain. For each signal, both
+ * the signal's I and Q parts are plotted, and they are all plotted
+ * with a different color, and the \a set_title and \a set_color
+ * functions can be used to change the lable and color for a given
+ * input number.
+ */
class GR_QTGUI_API qtgui_time_sink_c : public gr_sync_block
{
private:
diff --git a/gr-qtgui/lib/qtgui_time_sink_f.h b/gr-qtgui/include/qtgui_time_sink_f.h
index a69d32877..ff17f8a1b 100644
--- a/gr-qtgui/lib/qtgui_time_sink_f.h
+++ b/gr-qtgui/include/qtgui_time_sink_f.h
@@ -39,6 +39,15 @@ GR_QTGUI_API qtgui_time_sink_f_sptr qtgui_make_time_sink_f(int size, double bw,
int nconnectons=1,
QWidget *parent=NULL);
+/*!
+ * \brief A graphical sink to display multiple signals in time.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes set of a float streams
+ * and plots them in the time domain. Each signal is plotted with a
+ * different color, and the \a set_title and \a set_color functions
+ * can be used to change the lable and color for a given input number.
+ */
class GR_QTGUI_API qtgui_time_sink_f : public gr_sync_block
{
private:
diff --git a/gr-qtgui/lib/qtgui_util.h b/gr-qtgui/include/qtgui_util.h
index 5b129c7b5..5b129c7b5 100644
--- a/gr-qtgui/lib/qtgui_util.h
+++ b/gr-qtgui/include/qtgui_util.h
diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt
index 6cd9e200a..3290b1e77 100644
--- a/gr-qtgui/lib/CMakeLists.txt
+++ b/gr-qtgui/lib/CMakeLists.txt
@@ -63,8 +63,7 @@ set(qtgui_srcs
########################################################################
include_directories(
${GNURADIO_CORE_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
+ ${GR_QTGUI_INCLUDE_DIRS}
)
include_directories(${Boost_INCLUDE_DIRS})
@@ -111,10 +110,6 @@ install(FILES
spectrumdisplayform.h
SpectrumGUIClass.h
spectrumUpdateEvents.h
- qtgui_sink_c.h
- qtgui_sink_f.h
- qtgui_util.h
- gr_qtgui_api.h
DESTINATION ${GR_INCLUDE_DIR}/gnuradio
COMPONENT "qtgui_devel"
)
diff --git a/gr-qtgui/lib/Makefile.am b/gr-qtgui/lib/Makefile.am
index 849ee8360..b87230b23 100644
--- a/gr-qtgui/lib/Makefile.am
+++ b/gr-qtgui/lib/Makefile.am
@@ -24,8 +24,8 @@ include $(top_srcdir)/Makefile.common
EXTRA_DIST += spectrumdisplayform.ui
AM_CPPFLAGS = -I. $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \
- $(QT_INCLUDES) $(BOOST_CPPFLAGS) $(WITH_INCLUDES) \
- -Dlibgnuradio_qtgui_EXPORTS
+ $(QT_INCLUDES) $(BOOST_CPPFLAGS) $(GR_QTGUI_INCLUDES) \
+ $(WITH_INCLUDES) -Dlibgnuradio_qtgui_EXPORTS
# Only include these files in the build if qtgui passes configure checks
# This is mostly to help make distcheck pass
@@ -74,13 +74,7 @@ grinclude_HEADERS = \
spectrumdisplayform.h \
timedisplayform.h \
SpectrumGUIClass.h \
- spectrumUpdateEvents.h \
- gr_qtgui_api.h \
- qtgui_sink_c.h \
- qtgui_sink_f.h \
- qtgui_time_sink_c.h \
- qtgui_time_sink_f.h \
- qtgui_util.h
+ spectrumUpdateEvents.h
#QT_MOC_FLAGS=-DQT_SHARED -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB
QT_MOC_FLAGS=-DQT_SHARED -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB
diff --git a/gr-qtgui/python/__init__.py b/gr-qtgui/python/__init__.py
index db113bbd3..236f211b1 100644
--- a/gr-qtgui/python/__init__.py
+++ b/gr-qtgui/python/__init__.py
@@ -19,6 +19,11 @@
# Boston, MA 02110-1301, USA.
#
+'''
+This is the gr-qtgui package. This package includes QT-based graphical
+sinks.
+'''
+
# The presence of this file turns this directory into a Python package
from qtgui_swig import *
diff --git a/gr-qtgui/swig/Makefile.am b/gr-qtgui/swig/Makefile.am
index 1d8319987..ad6f49e00 100644
--- a/gr-qtgui/swig/Makefile.am
+++ b/gr-qtgui/swig/Makefile.am
@@ -31,6 +31,7 @@ AM_CPPFLAGS = \
$(STD_DEFINES_AND_INCLUDES) \
$(PYTHON_CPPFLAGS) \
$(QT_INCLUDES) \
+ $(GR_QTGUI_INCLUDES) \
$(WITH_INCLUDES)
##############################
diff --git a/gr-qtgui/swig/qtgui_sink_f.i b/gr-qtgui/swig/qtgui_sink_f.i
index c5eb656b9..a34420461 100644
--- a/gr-qtgui/swig/qtgui_sink_f.i
+++ b/gr-qtgui/swig/qtgui_sink_f.i
@@ -32,7 +32,7 @@ qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, int wintype,
double fc=0, double bw=0.0,
const std::string &name="Display",
bool plotfreq=true, bool plotwaterfall=true,
- bool plottime=true, bool plotconst=true,
+ bool plottime=true, bool plotconst=false,
QWidget *parent=NULL);
class qtgui_sink_f : public gr_block