summaryrefslogtreecommitdiff
path: root/gr-qtgui
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui')
-rw-r--r--gr-qtgui/CMakeLists.txt116
-rw-r--r--gr-qtgui/grc/CMakeLists.txt22
-rw-r--r--gr-qtgui/lib/CMakeLists.txt120
-rw-r--r--gr-qtgui/lib/spectrumUpdateEvents.h1
-rw-r--r--gr-qtgui/python/CMakeLists.txt46
-rw-r--r--gr-qtgui/swig/CMakeLists.txt49
-rw-r--r--gr-qtgui/swig/qtgui_swig.i8
7 files changed, 357 insertions, 5 deletions
diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt
new file mode 100644
index 000000000..280d856af
--- /dev/null
+++ b/gr-qtgui/CMakeLists.txt
@@ -0,0 +1,116 @@
+# 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.
+
+########################################################################
+# Setup dependencies
+########################################################################
+INCLUDE(GrBoost)
+
+FIND_PACKAGE(Qt4 4.2.0 COMPONENTS QtCore QtGui)
+INCLUDE(${QT_USE_FILE}) #sets up the environment
+
+FIND_PACKAGE(Qwt)
+
+FIND_PACKAGE(PythonLibs)
+
+INCLUDE(GrPython)
+GR_PYTHON_CHECK_MODULE("PyQt4" PyQt4 True PYQT4_FOUND)
+
+########################################################################
+# Register component
+########################################################################
+INCLUDE(GrComponent)
+GR_REGISTER_COMPONENT("gr-qtgui" ENABLE_GR_QTGUI
+ Boost_FOUND
+ QT4_FOUND
+ QWT_FOUND
+ ENABLE_GR_CORE_
+ PYTHONLIBS_FOUND
+ PYQT4_FOUND
+)
+
+GR_SET_GLOBAL(GR_QTGUI_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/lib
+ ${CMAKE_CURRENT_BINARY_DIR}/lib
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GR_QTGUI)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_QTGUI_DESCRIPTION "GNU Radio QtGUI Blocks")
+
+CPACK_COMPONENT("qtgui_runtime"
+ GROUP "QtGUI"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Runtime"
+ DEPENDS "core_runtime"
+)
+
+CPACK_COMPONENT("qtgui_devel"
+ GROUP "QtGUI"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "core_devel"
+)
+
+CPACK_COMPONENT("qtgui_python"
+ GROUP "QtGUI"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime; GRC xml files"
+ DEPENDS "core_python;qtgui_runtime"
+)
+
+CPACK_COMPONENT("qtgui_swig"
+ GROUP "QtGUI"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "core_swig;qtgui_python;qtgui_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(lib)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(grc)
+ ADD_SUBDIRECTORY(swig)
+ ADD_SUBDIRECTORY(python)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-qtgui.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-qtgui.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-qtgui.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "qtgui_devel"
+)
+
+ENDIF(ENABLE_GR_QTGUI)
diff --git a/gr-qtgui/grc/CMakeLists.txt b/gr-qtgui/grc/CMakeLists.txt
new file mode 100644
index 000000000..023c38b01
--- /dev/null
+++ b/gr-qtgui/grc/CMakeLists.txt
@@ -0,0 +1,22 @@
+# 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.
+
+########################################################################
+FILE(GLOB xml_files "*.xml")
+INSTALL(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "qtgui_python")
diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt
new file mode 100644
index 000000000..5bc67573e
--- /dev/null
+++ b/gr-qtgui/lib/CMakeLists.txt
@@ -0,0 +1,120 @@
+# 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.
+
+########################################################################
+# Setup the QT file generations stuff
+########################################################################
+SET(qtgui_moc_hdrs
+ spectrumdisplayform.h
+ timedisplayform.h
+ FrequencyDisplayPlot.h
+ TimeDomainDisplayPlot.h
+ WaterfallDisplayPlot.h
+ ConstellationDisplayPlot.h
+)
+QT4_WRAP_CPP(qtgui_moc_srcs ${qtgui_moc_hdrs})
+QT4_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
+SET(spectrum_ui_hdr ${CMAKE_CURRENT_BINARY_DIR}/spectrumdisplayform.ui.h)
+IF(NOT EXISTS ${spectrum_ui_hdr})
+ FILE(WRITE ${spectrum_ui_hdr} "#include <ui_spectrumdisplayform.h>\n")
+ENDIF(NOT EXISTS ${spectrum_ui_hdr})
+
+SET(qtgui_srcs
+ ${qtgui_moc_srcs}
+ ${qtgui_ui_hdrs}
+ FrequencyDisplayPlot.cc
+ TimeDomainDisplayPlot.cc
+ WaterfallDisplayPlot.cc
+ waterfallGlobalData.cc
+ ConstellationDisplayPlot.cc
+ spectrumdisplayform.cc
+ timedisplayform.cc
+ SpectrumGUIClass.cc
+ spectrumUpdateEvents.cc
+ plot_waterfall.cc
+ qtgui_sink_c.cc
+ qtgui_sink_f.cc
+ qtgui_time_sink_c.cc
+ qtgui_time_sink_f.cc
+ qtgui_util.cc
+)
+
+########################################################################
+# Setup the include and linker paths
+########################################################################
+INCLUDE_DIRECTORIES(
+ ${GNURADIO_CORE_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIRS})
+LINK_DIRECTORIES(${QWT_LIBRARY_DIRS})
+
+INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
+
+########################################################################
+# Setup library
+########################################################################
+LIST(APPEND qtgui_libs
+ gnuradio-core
+ ${QT_LIBRARIES}
+ ${QWT_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+)
+
+ADD_DEFINITIONS(-DQWT_DLL) #setup QWT library linkage
+ADD_LIBRARY(gnuradio-qtgui SHARED ${qtgui_srcs})
+TARGET_LINK_LIBRARIES(gnuradio-qtgui ${qtgui_libs})
+SET_TARGET_PROPERTIES(gnuradio-qtgui PROPERTIES DEFINE_SYMBOL "libgnuradio_qtgui_EXPORTS")
+SET_TARGET_PROPERTIES(gnuradio-qtgui PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gnuradio-qtgui
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "qtgui_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "qtgui_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "qtgui_runtime" # .dll file
+)
+
+########################################################################
+# Install the header files
+########################################################################
+INSTALL(FILES
+ FrequencyDisplayPlot.h
+ TimeDomainDisplayPlot.h
+ WaterfallDisplayPlot.h
+ waterfallGlobalData.h
+ ConstellationDisplayPlot.h
+ highResTimeFunctions.h
+ plot_waterfall.h
+ 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/spectrumUpdateEvents.h b/gr-qtgui/lib/spectrumUpdateEvents.h
index 5a17657b7..760619f88 100644
--- a/gr-qtgui/lib/spectrumUpdateEvents.h
+++ b/gr-qtgui/lib/spectrumUpdateEvents.h
@@ -101,7 +101,6 @@ public:
int which() const;
const std::vector<double*> getTimeDomainPoints() const;
uint64_t getNumTimeDomainDataPoints() const;
- timespec getDataTimestamp() const;
bool getRepeatDataFlag() const;
protected:
diff --git a/gr-qtgui/python/CMakeLists.txt b/gr-qtgui/python/CMakeLists.txt
new file mode 100644
index 000000000..e80fa6b75
--- /dev/null
+++ b/gr-qtgui/python/CMakeLists.txt
@@ -0,0 +1,46 @@
+# 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.
+
+########################################################################
+INCLUDE(GrPython)
+
+GR_PYTHON_INSTALL(
+ FILES __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui
+ COMPONENT "qtgui_python"
+)
+
+########################################################################
+# Handle the unit tests
+########################################################################
+IF(ENABLE_TESTING)
+INCLUDE(GrTest)
+FILE(GLOB py_qa_test_files "qa_*.py")
+FOREACH(py_qa_test_file ${py_qa_test_files})
+ GET_FILENAME_COMPONENT(py_qa_test_name ${py_qa_test_file} NAME_WE)
+ SET(GR_TEST_PYTHON_DIRS
+ ${CMAKE_BINARY_DIR}/gnuradio-core/src/python
+ ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig
+ ${CMAKE_BINARY_DIR}/gr-qtgui/python
+ ${CMAKE_BINARY_DIR}/gr-qtgui/swig
+ )
+ SET(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-qtgui)
+ GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file})
+ENDFOREACH(py_qa_test_file)
+ENDIF(ENABLE_TESTING)
diff --git a/gr-qtgui/swig/CMakeLists.txt b/gr-qtgui/swig/CMakeLists.txt
new file mode 100644
index 000000000..047229944
--- /dev/null
+++ b/gr-qtgui/swig/CMakeLists.txt
@@ -0,0 +1,49 @@
+# 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.
+
+########################################################################
+# Setup swig generation
+########################################################################
+INCLUDE(GrPython)
+INCLUDE(GrSwig)
+
+SET(GR_SWIG_INCLUDE_DIRS
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+ ${GR_QTGUI_INCLUDE_DIRS}
+ ${QWT_INCLUDE_DIRS}
+)
+
+SET(GR_SWIG_LIBRARIES gnuradio-qtgui)
+
+GR_SWIG_MAKE(qtgui_swig qtgui_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS qtgui_swig
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui
+ COMPONENT "qtgui_python"
+)
+
+INSTALL(FILES
+ qtgui_sink_c.i
+ qtgui_sink_f.i
+ qtgui_time_sink_c.i
+ qtgui_time_sink_f.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "qtgui_swig"
+)
diff --git a/gr-qtgui/swig/qtgui_swig.i b/gr-qtgui/swig/qtgui_swig.i
index 5a4ffd6fb..7cf8873e7 100644
--- a/gr-qtgui/swig/qtgui_swig.i
+++ b/gr-qtgui/swig/qtgui_swig.i
@@ -23,10 +23,10 @@
%include "gnuradio.i"
%{
-#include <qtgui_sink_c.h>
-#include <qtgui_sink_f.h>
-#include <qtgui_time_sink_c.h>
-#include <qtgui_time_sink_f.h>
+#include "qtgui_sink_c.h"
+#include "qtgui_sink_f.h"
+#include "qtgui_time_sink_c.h"
+#include "qtgui_time_sink_f.h"
%}
%include "qtgui_sink_c.i"