[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r4545 - in gnuradio/branches/developers/n4hy/qt: confi
From: |
n4hy |
Subject: |
[Commit-gnuradio] r4545 - in gnuradio/branches/developers/n4hy/qt: config gr-qtgui/src gr-qtgui/src/c++ |
Date: |
Tue, 20 Feb 2007 14:24:50 -0700 (MST) |
Author: n4hy
Date: 2007-02-20 14:24:50 -0700 (Tue, 20 Feb 2007)
New Revision: 4545
Added:
gnuradio/branches/developers/n4hy/qt/config/grc_gr_qtgui.m4
Modified:
gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/Makefile
gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/Makefile.in
gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/Makefile.am
gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/fftdisplay.cc
gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/fftdisplay.h
gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/qt_examples.cc
Log:
QWT Build structure added
Added: gnuradio/branches/developers/n4hy/qt/config/grc_gr_qtgui.m4
===================================================================
--- gnuradio/branches/developers/n4hy/qt/config/grc_gr_qtgui.m4
(rev 0)
+++ gnuradio/branches/developers/n4hy/qt/config/grc_gr_qtgui.m4 2007-02-20
21:24:50 UTC (rev 4545)
@@ -0,0 +1,39 @@
+dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Radio
+dnl
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2, or (at your option)
+dnl any later version.
+dnl
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING. If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Boston, MA 02110-1301, USA.
+
+AC_DEFUN([GRC_GR_QTGUI],[
+ GRC_ENABLE([gr-qtgui])
+
+ AC_CONFIG_FILES([ \
+ gr-qtgui/Makefile \
+ gr-qtgui/src/Makefile \
+ gr-qtgui/src/c++/Makefile \
+ ])
+
+ passed=yes
+ PKG_CHECK_MODULES(QT, qt >= 3.3,[],
+ [passed=no;AC_MSG_RESULT([gr-qtgui requires qt, not found. Check for
symlink between qt-mt.pc and qt.pc])])
+
+ PKG_CHECK_MODULES(QWT, qwt >= 5.0.0, [],
+ [passed=no;AC_MSG_RESULT([gr-qtgui requires qwt, not found.])])
+
+ GRC_BUILD_CONDITIONAL([gr-qtgui], [
+ AC_SUBST(QT_LIBS)
+ AC_SUBST(QWT_LIBS)])
+])
Modified: gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/Makefile
===================================================================
--- gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/Makefile 2007-02-20
21:17:15 UTC (rev 4544)
+++ gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/Makefile 2007-02-20
21:24:50 UTC (rev 4545)
@@ -260,6 +260,9 @@
QT_CFLAGS = -DQT_SHARED -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -D_REENTRANT
-I/usr/lib/qt-3.3/include
QT_INCLUDEDIR = /usr/lib/qt-3.3/include
QT_LIBS = -L/usr/lib/qt-3.3/lib -lqt-mt -lmng -ljpeg -lpng -lz -lXrender
-lXrandr -lXcursor -lXinerama -lXft -lfreetype -lfontconfig -lXext -lX11 -lm
-lSM -lICE -ldl -lpthread
+QWT_CFLAGS = -DQT_SHARED -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -D_REENTRANT
-I/usr/lib/qt-3.3/include/qwt
+QWT_INCLUDEDIR = /usr/lib/qt-3.3/include/qwt
+QWT_LIBS = -L/usr/lib/qt-3.3/lib -lqwt -lqt-mt -lmng -ljpeg -lpng -lz
-lXrender -lXrandr -lXcursor -lXinerama -lXft -lfreetype -lfontconfig -lXext
-lX11 -lm -lSM -lICE -ldl -lpthread
RANLIB = ranlib
RM_PROG = /bin/rm
SDL_CFLAGS = -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
Modified: gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/Makefile.in
===================================================================
--- gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/Makefile.in
2007-02-20 21:17:15 UTC (rev 4544)
+++ gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/Makefile.in
2007-02-20 21:24:50 UTC (rev 4545)
@@ -260,6 +260,9 @@
QT_CFLAGS = @QT_CFLAGS@
QT_INCLUDEDIR = @QT_INCLUDEDIR@
QT_LIBS = @QT_LIBS@
+QWT_CFLAGS = @QWT_CFLAGS@
+QWT_INCLUDEDIR = @QWT_INCLUDEDIR@
+QWT_LIBS = @QWT_LIBS@
RANLIB = @RANLIB@
RM_PROG = @RM_PROG@
SDL_CFLAGS = @SDL_CFLAGS@
Modified: gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/Makefile.am
===================================================================
--- gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/Makefile.am
2007-02-20 21:17:15 UTC (rev 4544)
+++ gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/Makefile.am
2007-02-20 21:24:50 UTC (rev 4545)
@@ -21,7 +21,7 @@
include $(top_srcdir)/Makefile.common
-INCLUDES= $(QT_INCLUDEDIR) $(QT_CFLAGS)
+INCLUDES= $(QT_CFLAGS) $(QWT_CFLAGS)
include_HEADERS =
fftdisplay.h \
@@ -34,7 +34,8 @@
fftdisplay.cc \
qt_examples.cc
-qt_examples_LDADD = $(QT_LIBS)
+qt_examples_LDADD = $(QWT_LIBS) $(QT_LIBS)
+qt_examples_LDFLAGS = $(QT_CFLAGS) $(QWT_CFLAGS)
MOSTLYCLEANFILES = \
*~
Modified: gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/fftdisplay.cc
===================================================================
--- gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/fftdisplay.cc
2007-02-20 21:17:15 UTC (rev 4544)
+++ gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/fftdisplay.cc
2007-02-20 21:24:50 UTC (rev 4545)
@@ -3,11 +3,11 @@
#include <fftdisplay.h>
-FFTDisplay::FFTDisplay(){
+fft_display::fft_display(){
}
-FFTDisplay::~FFTDisplay(){
+fft_display::~fft_display(){
}
Modified: gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/fftdisplay.h
===================================================================
--- gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/fftdisplay.h
2007-02-20 21:17:15 UTC (rev 4544)
+++ gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/fftdisplay.h
2007-02-20 21:24:50 UTC (rev 4545)
@@ -1,11 +1,10 @@
#ifndef FFT_DISPLAY_H
#define FFT_DISPLAY_H
-
-class FFTDisplay{
+class fft_display{
public:
- FFTDisplay();
- ~FFTDisplay();
+ fft_display();
+ ~fft_display();
protected:
private:
Modified: gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/qt_examples.cc
===================================================================
--- gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/qt_examples.cc
2007-02-20 21:17:15 UTC (rev 4544)
+++ gnuradio/branches/developers/n4hy/qt/gr-qtgui/src/c++/qt_examples.cc
2007-02-20 21:24:50 UTC (rev 4545)
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <qapplication.h>
+#include <qwt_plot.h>
+#include <qwt_plot_curve.h>
#include <fftdisplay.h>
@@ -9,10 +11,37 @@
// Create the QApplication - this MUST be done before ANY QObjects are
created
QApplication* qApp = new QApplication(argc, argv);
- FFTDisplay* fftDisplay = new FFTDisplay();
+ fft_display* fftDisplay = new fft_display();
- printf("HEY FUNNY STUFF HERE\n");
+ QwtPlot *myPlot;
+ double x[100], y1[100], y2[100]; // x and y values
+
+ myPlot = new QwtPlot(QwtText("Two Curves"), ((QWidget*)0)); // No
Parent Value
+
+ // add curves
+ QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
+ QwtPlotCurve *curve2 = new QwtPlotCurve("Curve 2");
+
+ for(int number = 0; number < 100; number++){
+ x[number] = static_cast<double>(number);
+ y1[number] = pow(-1, static_cast<double>(number))*1000.0;
+ y2[number] = pow(-1, static_cast<double>(number)+1)*-1000.0;
+ }
+
+ // copy the data into the curves
+ curve1->setData(x, y1, 100);
+ curve2->setData(x, y2, 100);
+
+ curve1->attach(myPlot);
+ curve2->attach(myPlot);
+
+ // finally, refresh the plot
+ myPlot->replot();
+ myPlot->show();
+ // Make the closing of the last window call the quit()
+ QObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit()));
+
// Start the Event Thread
qApp->exec();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r4545 - in gnuradio/branches/developers/n4hy/qt: config gr-qtgui/src gr-qtgui/src/c++,
n4hy <=