summaryrefslogtreecommitdiff
path: root/gr-qtgui
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui')
-rw-r--r--gr-qtgui/src/lib/FrequencyDisplayPlot.h1
-rw-r--r--gr-qtgui/src/lib/Makefile.am6
-rw-r--r--gr-qtgui/src/lib/SpectrumGUIClass.cc4
-rw-r--r--gr-qtgui/src/lib/SpectrumGUIClass.h4
-rw-r--r--gr-qtgui/src/lib/TimeDomainDisplayPlot.h1
-rw-r--r--gr-qtgui/src/lib/WaterfallDisplayPlot.cc40
-rw-r--r--gr-qtgui/src/lib/WaterfallDisplayPlot.h13
-rw-r--r--gr-qtgui/src/lib/plot_waterfall.h2
8 files changed, 36 insertions, 35 deletions
diff --git a/gr-qtgui/src/lib/FrequencyDisplayPlot.h b/gr-qtgui/src/lib/FrequencyDisplayPlot.h
index c78e1667e..3c22c1397 100644
--- a/gr-qtgui/src/lib/FrequencyDisplayPlot.h
+++ b/gr-qtgui/src/lib/FrequencyDisplayPlot.h
@@ -1,6 +1,7 @@
#ifndef FREQUENCY_DISPLAY_PLOT_HPP
#define FREQUENCY_DISPLAY_PLOT_HPP
+#include <stdint.h>
#include <cstdio>
#include <qwt_plot.h>
#include <qwt_painter.h>
diff --git a/gr-qtgui/src/lib/Makefile.am b/gr-qtgui/src/lib/Makefile.am
index b45b25c9d..446a07fd0 100644
--- a/gr-qtgui/src/lib/Makefile.am
+++ b/gr-qtgui/src/lib/Makefile.am
@@ -25,7 +25,7 @@ include $(top_srcdir)/Makefile.swig
EXTRA_DIST += spectrumdisplayform.ui
AM_CPPFLAGS = -I. $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \
- $(QT_INCLUDES) $(WITH_INCLUDES)
+ $(QT_INCLUDES) $(BOOST_CPPFLAGS) $(WITH_INCLUDES)
# Only include these files in the build if qtgui passes configure checks
# This is mostly to help make distcheck pass
@@ -82,10 +82,12 @@ QT_MOC_FLAGS=-DQT_SHARED -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LI
$(QT_UIC_EXEC) $< -o $@
# magic flags
-libgnuradio_qtgui_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS)
+libgnuradio_qtgui_la_LDFLAGS = $(NO_UNDEFINED) $(BOOST_LDFLAGS) $(LTVERSIONFLAGS)
libgnuradio_qtgui_la_LIBADD = \
$(GNURADIO_CORE_LA) \
+ $(BOOST_THREAD_LIB) \
+ $(BOOST_DATE_TIME_LIB) \
-lstdc++ \
$(QT_LIBS)
diff --git a/gr-qtgui/src/lib/SpectrumGUIClass.cc b/gr-qtgui/src/lib/SpectrumGUIClass.cc
index 563ed34ba..052730fc2 100644
--- a/gr-qtgui/src/lib/SpectrumGUIClass.cc
+++ b/gr-qtgui/src/lib/SpectrumGUIClass.cc
@@ -6,8 +6,8 @@
#include <QEvent>
#include <QCustomEvent>
-const long SpectrumGUIClass::MAX_FFT_SIZE;
-const long SpectrumGUIClass::MIN_FFT_SIZE;
+const long SpectrumGUIClass::MAX_FFT_SIZE = 32768;
+const long SpectrumGUIClass::MIN_FFT_SIZE = 1024;
SpectrumGUIClass::SpectrumGUIClass(const uint64_t maxDataSize,
const uint64_t fftSize,
diff --git a/gr-qtgui/src/lib/SpectrumGUIClass.h b/gr-qtgui/src/lib/SpectrumGUIClass.h
index 63a340c34..57a749a6a 100644
--- a/gr-qtgui/src/lib/SpectrumGUIClass.h
+++ b/gr-qtgui/src/lib/SpectrumGUIClass.h
@@ -67,8 +67,8 @@ public:
void DecrementPendingGUIUpdateEvents();
void ResetPendingGUIUpdateEvents();
- static const long MAX_FFT_SIZE = /*1048576*/32768;
- static const long MIN_FFT_SIZE = 1024;
+ static const long MAX_FFT_SIZE;
+ static const long MIN_FFT_SIZE;
QWidget* qwidget();
diff --git a/gr-qtgui/src/lib/TimeDomainDisplayPlot.h b/gr-qtgui/src/lib/TimeDomainDisplayPlot.h
index 5525bbabe..952b5c8cf 100644
--- a/gr-qtgui/src/lib/TimeDomainDisplayPlot.h
+++ b/gr-qtgui/src/lib/TimeDomainDisplayPlot.h
@@ -1,6 +1,7 @@
#ifndef TIME_DOMAIN_DISPLAY_PLOT_HPP
#define TIME_DOMAIN_DISPLAY_PLOT_HPP
+#include <stdint.h>
#include <cstdio>
#include <qwt_plot.h>
#include <qwt_painter.h>
diff --git a/gr-qtgui/src/lib/WaterfallDisplayPlot.cc b/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
index 680c44756..a8e5361e7 100644
--- a/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
+++ b/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
@@ -12,6 +12,9 @@
#include <qapplication.h>
+#include <boost/date_time/posix_time/posix_time.hpp>
+namespace pt = boost::posix_time;
+
class FreqOffsetAndPrecisionClass
{
public:
@@ -135,16 +138,14 @@ public:
virtual QwtText label(double value) const
{
- QwtText returnLabel("");
-
timespec lineTime = timespec_add(GetZeroTime(), (-value) * GetSecondsPerLine());
- struct tm timeTm;
- gmtime_r(&lineTime.tv_sec, &timeTm);
- returnLabel = (QString("").sprintf("%04d/%02d/%02d\n%02d:%02d:%02d.%03ld",
- timeTm.tm_year+1900, timeTm.tm_mon+1,
- timeTm.tm_mday, timeTm.tm_hour, timeTm.tm_min,
- timeTm.tm_sec, lineTime.tv_nsec/1000000));
- return returnLabel;
+ std::string time_str = pt::to_simple_string(pt::from_time_t(lineTime.tv_sec));
+
+ // lops off the YYYY-mmm-DD part of the string
+ int ind = time_str.find(" ");
+ if(ind != std::string::npos)
+ time_str = time_str.substr(ind);
+ return QwtText(QString("").sprintf("%s.%03ld", time_str.c_str(), lineTime.tv_nsec/1000000));
}
virtual void initiateUpdate()
@@ -189,15 +190,14 @@ protected:
using QwtPlotZoomer::trackerText;
virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
- QString yLabel("");
-
timespec lineTime = timespec_add(GetZeroTime(), (-p.y()) * GetSecondsPerLine());
- struct tm timeTm;
- gmtime_r(&lineTime.tv_sec, &timeTm);
- yLabel = (QString("").sprintf("%04d/%02d/%02d %02d:%02d:%02d.%03ld",
- timeTm.tm_year+1900, timeTm.tm_mon+1,
- timeTm.tm_mday, timeTm.tm_hour, timeTm.tm_min,
- timeTm.tm_sec, lineTime.tv_nsec/1000000));
+ std::string time_str = pt::to_simple_string(pt::from_time_t(lineTime.tv_sec));
+
+ // lops off the YYYY-mmm-DD part of the string
+ int ind = time_str.find(" ");
+ if(ind != std::string::npos)
+ time_str = time_str.substr(ind);
+ QString yLabel(QString("").sprintf("%s.%03ld", time_str.c_str(), lineTime.tv_nsec/1000000));
QwtText t(QString("%1 %2, %3").
arg(p.x(), 0, 'f', GetFrequencyPrecision()).
@@ -210,12 +210,6 @@ private:
};
-const int WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_MULTI_COLOR;
-const int WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_WHITE_HOT;
-const int WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_BLACK_HOT;
-const int WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_INCANDESCENT;
-const int WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_USER_DEFINED;
-
WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent)
: QwtPlot(parent)
{
diff --git a/gr-qtgui/src/lib/WaterfallDisplayPlot.h b/gr-qtgui/src/lib/WaterfallDisplayPlot.h
index a5ccaec40..6b4e978bb 100644
--- a/gr-qtgui/src/lib/WaterfallDisplayPlot.h
+++ b/gr-qtgui/src/lib/WaterfallDisplayPlot.h
@@ -1,6 +1,7 @@
#ifndef WATERFALL_DISPLAY_PLOT_HPP
#define WATERFALL_DISPLAY_PLOT_HPP
+#include <stdint.h>
#include <cstdio>
#include <qwt_plot.h>
#include <qwt_plot_zoomer.h>
@@ -39,11 +40,13 @@ public:
const QColor GetUserDefinedLowIntensityColor()const;
const QColor GetUserDefinedHighIntensityColor()const;
- static const int INTENSITY_COLOR_MAP_TYPE_MULTI_COLOR = 0;
- static const int INTENSITY_COLOR_MAP_TYPE_WHITE_HOT = 1;
- static const int INTENSITY_COLOR_MAP_TYPE_BLACK_HOT = 2;
- static const int INTENSITY_COLOR_MAP_TYPE_INCANDESCENT = 3;
- static const int INTENSITY_COLOR_MAP_TYPE_USER_DEFINED = 4;
+ enum{
+ INTENSITY_COLOR_MAP_TYPE_MULTI_COLOR = 0,
+ INTENSITY_COLOR_MAP_TYPE_WHITE_HOT = 1,
+ INTENSITY_COLOR_MAP_TYPE_BLACK_HOT = 2,
+ INTENSITY_COLOR_MAP_TYPE_INCANDESCENT = 3,
+ INTENSITY_COLOR_MAP_TYPE_USER_DEFINED = 4
+ };
public slots:
void resizeSlot( QSize *s );
diff --git a/gr-qtgui/src/lib/plot_waterfall.h b/gr-qtgui/src/lib/plot_waterfall.h
index 91746e3f3..a11461611 100644
--- a/gr-qtgui/src/lib/plot_waterfall.h
+++ b/gr-qtgui/src/lib/plot_waterfall.h
@@ -19,7 +19,7 @@ class QwtColorMap;
\sa QwtRasterData, QwtColorMap
*/
-class QWT_EXPORT PlotWaterfall: public QwtPlotRasterItem
+class PlotWaterfall: public QwtPlotRasterItem
{
public:
explicit PlotWaterfall(WaterfallData* data, const QString &title = QString::null);