summaryrefslogtreecommitdiff
path: root/gr-qtgui/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui/lib')
-rw-r--r--gr-qtgui/lib/ConstellationDisplayPlot.cc26
-rw-r--r--gr-qtgui/lib/ConstellationDisplayPlot.h16
-rw-r--r--gr-qtgui/lib/FrequencyDisplayPlot.cc44
-rw-r--r--gr-qtgui/lib/FrequencyDisplayPlot.h26
-rw-r--r--gr-qtgui/lib/SpectrumGUIClass.cc24
-rw-r--r--gr-qtgui/lib/SpectrumGUIClass.h10
-rw-r--r--gr-qtgui/lib/TimeDomainDisplayPlot.cc22
-rw-r--r--gr-qtgui/lib/TimeDomainDisplayPlot.h18
-rw-r--r--gr-qtgui/lib/WaterfallDisplayPlot.cc84
-rw-r--r--gr-qtgui/lib/WaterfallDisplayPlot.h14
-rw-r--r--gr-qtgui/lib/plot_waterfall.cc26
-rw-r--r--gr-qtgui/lib/plot_waterfall.h6
-rw-r--r--gr-qtgui/lib/qtgui_sink_c.cc42
-rw-r--r--gr-qtgui/lib/qtgui_sink_f.cc36
-rw-r--r--gr-qtgui/lib/qtgui_time_sink_c.cc20
-rw-r--r--gr-qtgui/lib/qtgui_time_sink_f.cc20
-rw-r--r--gr-qtgui/lib/spectrumUpdateEvents.cc2
-rw-r--r--gr-qtgui/lib/spectrumUpdateEvents.h2
-rw-r--r--gr-qtgui/lib/spectrumdisplayform.cc72
-rw-r--r--gr-qtgui/lib/spectrumdisplayform.h16
-rw-r--r--gr-qtgui/lib/timedisplayform.cc14
-rw-r--r--gr-qtgui/lib/timedisplayform.h14
-rw-r--r--gr-qtgui/lib/waterfallGlobalData.cc30
-rw-r--r--gr-qtgui/lib/waterfallGlobalData.h12
24 files changed, 298 insertions, 298 deletions
diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.cc b/gr-qtgui/lib/ConstellationDisplayPlot.cc
index fb549b697..7a595fef4 100644
--- a/gr-qtgui/lib/ConstellationDisplayPlot.cc
+++ b/gr-qtgui/lib/ConstellationDisplayPlot.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -40,14 +40,14 @@ public:
virtual ~ConstellationDisplayZoomer(){
}
-
+
virtual void updateTrackerText(){
updateDisplay();
}
protected:
using QwtPlotZoomer::trackerText;
- virtual QwtText trackerText( const QwtDoublePoint& p ) const
+ virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
QwtText t(QString("(%1, %2)").arg(p.x(), 0, 'f', 4).
arg(p.y(), 0, 'f', 4));
@@ -73,7 +73,7 @@ ConstellationDisplayPlot::ConstellationDisplayPlot(QWidget* parent)
#else
QwtPainter::setPolylineSplitting(false);
#endif
-
+
#if QWT_VERSION < 0x060000
// We don't need the cache here
canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false);
@@ -82,7 +82,7 @@ ConstellationDisplayPlot::ConstellationDisplayPlot(QWidget* parent)
QPalette palette;
palette.setColor(canvas()->backgroundRole(), QColor("white"));
- canvas()->setPalette(palette);
+ canvas()->setPalette(palette);
setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine);
set_xaxis(-2.0, 2.0);
@@ -144,7 +144,7 @@ ConstellationDisplayPlot::ConstellationDisplayPlot(QWidget* parent)
this, SLOT(OnPickerPointSelected6(const QPointF &)));
#endif
- connect(this, SIGNAL(legendChecked(QwtPlotItem *, bool ) ),
+ connect(this, SIGNAL(legendChecked(QwtPlotItem *, bool ) ),
this, SLOT(LegendEntryChecked(QwtPlotItem *, bool ) ));
}
@@ -157,7 +157,7 @@ ConstellationDisplayPlot::~ConstellationDisplayPlot()
// _zoomer and _panner deleted when parent deleted
}
-void
+void
ConstellationDisplayPlot::set_pen_size(int size)
{
if(size > 0 && size < 30){
@@ -203,7 +203,7 @@ void ConstellationDisplayPlot::PlotNewData(const double* realDataPoints,
const int64_t numDataPoints,
const double timeInterval)
{
- if((numDataPoints > 0) &&
+ if((numDataPoints > 0) &&
(gruel::high_res_timer_now() - _lastReplot > timeInterval*gruel::high_res_timer_tps())) {
if(numDataPoints != _numPoints){
@@ -213,12 +213,12 @@ void ConstellationDisplayPlot::PlotNewData(const double* realDataPoints,
delete[] _imagDataPoints;
_realDataPoints = new double[_numPoints];
_imagDataPoints = new double[_numPoints];
-
+
#if QWT_VERSION < 0x060000
_plot_curve->setRawData(_realDataPoints, _imagDataPoints, _numPoints);
#else
_plot_curve->setRawSamples(_realDataPoints, _imagDataPoints, _numPoints);
-#endif
+#endif
}
memcpy(_realDataPoints, realDataPoints, numDataPoints*sizeof(double));
diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h
index 80ac3a63a..9e0f6f26a 100644
--- a/gr-qtgui/lib/ConstellationDisplayPlot.h
+++ b/gr-qtgui/lib/ConstellationDisplayPlot.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -51,11 +51,11 @@ public:
ConstellationDisplayPlot(QWidget*);
virtual ~ConstellationDisplayPlot();
- void PlotNewData(const double* realDataPoints,
- const double* imagDataPoints,
+ void PlotNewData(const double* realDataPoints,
+ const double* imagDataPoints,
const int64_t numDataPoints,
const double timeInterval);
-
+
virtual void replot();
void set_xaxis(double min, double max);
@@ -86,7 +86,7 @@ private:
QwtPlotPanner* _panner;
QwtPlotZoomer* _zoomer;
-
+
QwtDblClickPlotPicker *_picker;
double* _realDataPoints;
diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.cc b/gr-qtgui/lib/FrequencyDisplayPlot.cc
index b48cd7233..b74d46015 100644
--- a/gr-qtgui/lib/FrequencyDisplayPlot.cc
+++ b/gr-qtgui/lib/FrequencyDisplayPlot.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -63,7 +63,7 @@ public:
{
}
- virtual ~FreqDisplayScaleDraw()
+ virtual ~FreqDisplayScaleDraw()
{
}
@@ -90,7 +90,7 @@ public:
virtual ~FreqDisplayZoomer(){
}
-
+
virtual void updateTrackerText(){
updateDisplay();
}
@@ -119,11 +119,11 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent)
{
_startFrequency = 0;
_stopFrequency = 4000;
-
+
_lastReplot = 0;
resize(parent->width(), parent->height());
-
+
_useCenterFrequencyFlag = false;
_numPoints = 1024;
@@ -138,16 +138,16 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent)
#else
QwtPainter::setPolylineSplitting(false);
#endif
-
+
#if QWT_VERSION < 0x060000
// We don't need the cache here
canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false);
canvas()->setPaintAttribute(QwtPlotCanvas::PaintPacked, false);
#endif
-
+
QPalette palette;
palette.setColor(canvas()->backgroundRole(), QColor("white"));
- canvas()->setPalette(palette);
+ canvas()->setPalette(palette);
setAxisTitle(QwtPlot::xBottom, "Frequency (Hz)");
setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(0));
@@ -229,7 +229,7 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent)
/// THIS CAUSES A PROBLEM!
//_markerPeakAmplitude->attach(this);
-
+
_markerNoiseFloorAmplitude = new QwtPlotMarker();
_markerNoiseFloorAmplitude->setLineStyle(QwtPlotMarker::HLine);
_markerNoiseFloorAmplitude->setLinePen(QPen(Qt::darkRed, 0, Qt::DotLine));
@@ -344,7 +344,7 @@ FrequencyDisplayPlot::SetFrequencyRange(const double constStartFreq,
if(stopFreq > startFreq) {
_startFrequency = startFreq;
_stopFrequency = stopFreq;
-
+
if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (_zoomer != NULL)){
double display_units = ceil(log10(units)/2.0);
setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(display_units));
@@ -352,7 +352,7 @@ FrequencyDisplayPlot::SetFrequencyRange(const double constStartFreq,
if(reset)
_resetXAxisPoints();
-
+
((FreqDisplayZoomer*)_zoomer)->SetFrequencyPrecision(display_units);
((FreqDisplayZoomer*)_zoomer)->SetUnitType(strunits);
}
@@ -376,7 +376,7 @@ void
FrequencyDisplayPlot::replot()
{
_markerNoiseFloorAmplitude->setYValue(_noiseFloorAmplitude);
-
+
// Make sure to take into account the start frequency
if(_useCenterFrequencyFlag){
_markerPeakAmplitude->setXValue((_peakFrequency/1000.0) + _startFrequency);
@@ -385,10 +385,10 @@ FrequencyDisplayPlot::replot()
_markerPeakAmplitude->setXValue(_peakFrequency + _startFrequency);
}
_markerPeakAmplitude->setYValue(_peakAmplitude);
-
+
QwtPlot::replot();
}
-
+
void
FrequencyDisplayPlot::resizeSlot( QSize *s )
{
@@ -401,12 +401,12 @@ FrequencyDisplayPlot::PlotNewData(const double* dataPoints, const int64_t numDat
const double peakAmplitude, const double timeInterval)
{
// Only update plot if there is data and if the time interval has elapsed
- if((numDataPoints > 0) &&
+ if((numDataPoints > 0) &&
(gruel::high_res_timer_now() - _lastReplot > timeInterval*gruel::high_res_timer_tps())) {
-
+
if(numDataPoints != _numPoints) {
_numPoints = numDataPoints;
-
+
delete[] _dataPoints;
delete[] _minFFTPoints;
delete[] _maxFFTPoints;
@@ -425,7 +425,7 @@ FrequencyDisplayPlot::PlotNewData(const double* dataPoints, const int64_t numDat
_min_fft_plot_curve->setRawSamples(_xAxisPoints, _minFFTPoints, _numPoints);
_max_fft_plot_curve->setRawSamples(_xAxisPoints, _maxFFTPoints, _numPoints);
#endif
-
+
_resetXAxisPoints();
ClearMaxData();
ClearMinData();
@@ -521,7 +521,7 @@ FrequencyDisplayPlot::SetTraceColour (QColor c)
_fft_plot_curve->setPen(QPen(c));
}
-void
+void
FrequencyDisplayPlot::SetBGColour (QColor c)
{
QPalette palette;
diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.h b/gr-qtgui/lib/FrequencyDisplayPlot.h
index e79000789..5c3ea708c 100644
--- a/gr-qtgui/lib/FrequencyDisplayPlot.h
+++ b/gr-qtgui/lib/FrequencyDisplayPlot.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -50,9 +50,9 @@ public:
FrequencyDisplayPlot(QWidget*);
virtual ~FrequencyDisplayPlot();
- void SetFrequencyRange(const double, const double,
+ void SetFrequencyRange(const double, const double,
const double, const bool,
- const double units=1000.0,
+ const double units=1000.0,
const std::string &strunits = "kHz");
double GetStartFrequency()const;
double GetStopFrequency()const;
@@ -60,13 +60,13 @@ public:
void PlotNewData(const double* dataPoints, const int64_t numDataPoints,
const double noiseFloorAmplitude, const double peakFrequency,
const double peakAmplitude, const double timeInterval);
-
+
void ClearMaxData();
void ClearMinData();
-
+
void SetMaxFFTVisible(const bool);
void SetMinFFTVisible(const bool);
-
+
virtual void replot();
void set_yaxis(double min, double max);
@@ -94,12 +94,12 @@ protected:
private:
void _resetXAxisPoints();
-
+
double _startFrequency;
double _stopFrequency;
double _maxYAxis;
double _minYAxis;
-
+
QwtPlotCurve* _fft_plot_curve;
QwtPlotCurve* _min_fft_plot_curve;
QwtPlotCurve* _max_fft_plot_curve;
@@ -115,9 +115,9 @@ private:
QwtPlotMarker *_markerCF;
QwtDblClickPlotPicker *_picker;
-
+
QwtPlotMagnifier *_magnifier;
-
+
double* _dataPoints;
double* _xAxisPoints;
int _xAxisMultiplier;
diff --git a/gr-qtgui/lib/SpectrumGUIClass.cc b/gr-qtgui/lib/SpectrumGUIClass.cc
index 1e9aa0169..d2dbc7772 100644
--- a/gr-qtgui/lib/SpectrumGUIClass.cc
+++ b/gr-qtgui/lib/SpectrumGUIClass.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -54,7 +54,7 @@ SpectrumGUIClass::SpectrumGUIClass(const uint64_t maxDataSize,
_windowType = 5;
- _lastGUIUpdateTime = 0;
+ _lastGUIUpdateTime = 0;
_windowOpennedFlag = false;
_fftBuffersCreatedFlag = false;
@@ -92,16 +92,16 @@ SpectrumGUIClass::OpenSpectrumWindow(QWidget* parent,
_realTimeDomainPoints = new double[_dataPoints];
_imagTimeDomainPoints = new double[_dataPoints];
_fftBuffersCreatedFlag = true;
-
-
+
+
memset(_fftPoints, 0x0, _dataPoints*sizeof(std::complex<float>));
memset(_realTimeDomainPoints, 0x0, _dataPoints*sizeof(double));
memset(_imagTimeDomainPoints, 0x0, _dataPoints*sizeof(double));
}
-
+
// Called from the Event Thread
_spectrumDisplayForm = new SpectrumDisplayForm(parent);
-
+
// Toggle Windows on/off
_spectrumDisplayForm->ToggleTabFrequency(frequency);
_spectrumDisplayForm->ToggleTabWaterfall(waterfall);
@@ -140,8 +140,8 @@ SpectrumGUIClass::Reset()
{
if(GetWindowOpenFlag()) {
qApp->postEvent(_spectrumDisplayForm,
- new SpectrumFrequencyRangeEvent(_centerFrequency,
- _startFrequency,
+ new SpectrumFrequencyRangeEvent(_centerFrequency,
+ _startFrequency,
_stopFrequency));
qApp->postEvent(_spectrumDisplayForm, new SpectrumWindowResetEvent());
}
@@ -304,7 +304,7 @@ SpectrumGUIClass::UpdateWindow(const bool updateDisplayFlag,
lastOfMultipleFFTUpdateFlag,
currentTime,
_droppedEntriesCount));
-
+
// Only reset the dropped entries counter if this is not
// repeat data since repeat data is dropped by the display systems
if(!repeatDataFlag){
diff --git a/gr-qtgui/lib/SpectrumGUIClass.h b/gr-qtgui/lib/SpectrumGUIClass.h
index 857c2515f..e0612413b 100644
--- a/gr-qtgui/lib/SpectrumGUIClass.h
+++ b/gr-qtgui/lib/SpectrumGUIClass.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -44,7 +44,7 @@ class SpectrumGUIClass
public:
SpectrumGUIClass(const uint64_t maxDataSize, const uint64_t fftSize,
const double newCenterFrequency,
- const double newStartFrequency,
+ const double newStartFrequency,
const double newStopFrequency);
~SpectrumGUIClass();
void Reset();
diff --git a/gr-qtgui/lib/TimeDomainDisplayPlot.cc b/gr-qtgui/lib/TimeDomainDisplayPlot.cc
index 192ec82ee..84b09af90 100644
--- a/gr-qtgui/lib/TimeDomainDisplayPlot.cc
+++ b/gr-qtgui/lib/TimeDomainDisplayPlot.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -68,7 +68,7 @@ public:
virtual ~TimeDomainDisplayZoomer(){
}
-
+
virtual void updateTrackerText(){
updateDisplay();
}
@@ -80,7 +80,7 @@ public:
protected:
using QwtPlotZoomer::trackerText;
- virtual QwtText trackerText( const QwtDoublePoint& p ) const
+ virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
QwtText t(QString("%1 %2, %3 V").arg(p.x(), 0, 'f', GetTimePrecision()).
arg(_unitType.c_str()).
@@ -114,7 +114,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent)
#else
QwtPainter::setPolylineSplitting(false);
#endif
-
+
#if QWT_VERSION < 0x060000
// We don't need the cache here
canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false);
@@ -123,7 +123,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent)
QPalette palette;
palette.setColor(canvas()->backgroundRole(), QColor("white"));
- canvas()->setPalette(palette);
+ canvas()->setPalette(palette);
setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine);
setXaxis(0, _numPoints);
@@ -198,7 +198,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent)
legendDisplay->setItemMode(QwtLegend::CheckableItem);
insertLegend(legendDisplay);
- connect(this, SIGNAL( legendChecked(QwtPlotItem *, bool ) ),
+ connect(this, SIGNAL( legendChecked(QwtPlotItem *, bool ) ),
this, SLOT( LegendEntryChecked(QwtPlotItem *, bool ) ));
}
@@ -270,7 +270,7 @@ void TimeDomainDisplayPlot::PlotNewData(const std::vector<double*> dataPoints,
_plot_curve[i]->setRawSamples(_xAxisPoints, _dataPoints[i], _numPoints);
#endif
}
-
+
setXaxis(0, numDataPoints);
_resetXAxisPoints();
}
@@ -314,7 +314,7 @@ TimeDomainDisplayPlot::SetSampleRate(double sr, double units,
if(newsr != _sampleRate) {
_sampleRate = sr/units;
_resetXAxisPoints();
-
+
// While we could change the displayed sigfigs based on the unit being
// displayed, I think it looks better by just setting it to 4 regardless.
//double display_units = ceil(log10(units)/2.0);
diff --git a/gr-qtgui/lib/TimeDomainDisplayPlot.h b/gr-qtgui/lib/TimeDomainDisplayPlot.h
index 1f3f2c574..356da25ad 100644
--- a/gr-qtgui/lib/TimeDomainDisplayPlot.h
+++ b/gr-qtgui/lib/TimeDomainDisplayPlot.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -50,9 +50,9 @@ public:
TimeDomainDisplayPlot(int nplots, QWidget*);
virtual ~TimeDomainDisplayPlot();
- void PlotNewData(const std::vector<double*> dataPoints,
+ void PlotNewData(const std::vector<double*> dataPoints,
const int64_t numDataPoints, const double timeInterval);
-
+
virtual void replot();
public slots:
@@ -62,7 +62,7 @@ public slots:
void setColor(int which, QString color);
void resizeSlot( QSize *s );
- void SetSampleRate(double sr, double units,
+ void SetSampleRate(double sr, double units,
const std::string &strunits);
// Because of the preprocessing of slots in QT, these are no
@@ -87,10 +87,10 @@ private:
QwtPlotPanner* _panner;
QwtPlotZoomer* _zoomer;
-
+
QwtDblClickPlotPicker *_picker;
QwtPlotMagnifier *_magnifier;
-
+
std::vector<double*> _dataPoints;
double* _xAxisPoints;
diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.cc b/gr-qtgui/lib/WaterfallDisplayPlot.cc
index ffb27f2aa..63eb57ffe 100644
--- a/gr-qtgui/lib/WaterfallDisplayPlot.cc
+++ b/gr-qtgui/lib/WaterfallDisplayPlot.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -113,16 +113,16 @@ public:
_zeroTime = 0;
_secondsPerLine = 1.0;
}
-
+
virtual ~TimeScaleData()
- {
+ {
}
virtual gruel::high_res_timer_type GetZeroTime() const
{
return _zeroTime;
}
-
+
virtual void SetZeroTime(const gruel::high_res_timer_type newTime)
{
_zeroTime = newTime - gruel::high_res_timer_epoch();
@@ -138,13 +138,13 @@ public:
return _secondsPerLine;
}
-
+
protected:
gruel::high_res_timer_type _zeroTime;
double _secondsPerLine;
-
+
private:
-
+
};
static QString
@@ -164,11 +164,11 @@ class QwtTimeScaleDraw: public QwtScaleDraw, public TimeScaleData
{
public:
QwtTimeScaleDraw():QwtScaleDraw(),TimeScaleData()
- {
+ {
}
virtual ~QwtTimeScaleDraw()
- {
+ {
}
virtual QwtText label(double value) const
@@ -183,19 +183,19 @@ public:
// updates is to prevent the display from being updated too often...
invalidateCache();
}
-
+
protected:
private:
};
-class WaterfallZoomer: public QwtPlotZoomer, public TimeScaleData,
+class WaterfallZoomer: public QwtPlotZoomer, public TimeScaleData,
public FreqOffsetAndPrecisionClass
{
public:
WaterfallZoomer(QwtPlotCanvas* canvas, const unsigned int freqPrecision)
- : QwtPlotZoomer(canvas), TimeScaleData(),
+ : QwtPlotZoomer(canvas), TimeScaleData(),
FreqOffsetAndPrecisionClass(freqPrecision)
{
setTrackerMode(QwtPicker::AlwaysOn);
@@ -204,7 +204,7 @@ public:
virtual ~WaterfallZoomer()
{
}
-
+
virtual void updateTrackerText()
{
updateDisplay();
@@ -217,7 +217,7 @@ public:
protected:
using QwtPlotZoomer::trackerText;
- virtual QwtText trackerText( const QwtDoublePoint& p ) const
+ virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
double secs = GetZeroTime()/double(gruel::high_res_timer_tps()) - (p.y() * GetSecondsPerLine());
QwtText t(QString("%1 %2, %3").
@@ -289,13 +289,13 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent)
_zoomer = NULL;
_startFrequency = 0;
_stopFrequency = 4000;
-
+
resize(parent->width(), parent->height());
_numPoints = 1024;
QPalette palette;
palette.setColor(canvas()->backgroundRole(), QColor("white"));
- canvas()->setPalette(palette);
+ canvas()->setPalette(palette);
setAxisTitle(QwtPlot::xBottom, "Frequency (Hz)");
setAxisScaleDraw(QwtPlot::xBottom, new WaterfallFreqDisplayScaleDraw(0));
@@ -309,7 +309,7 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent)
d_data = new WaterfallData(_startFrequency, _stopFrequency,
_numPoints, 200);
-
+
#if QWT_VERSION < 0x060000
d_spectrogram = new PlotWaterfall(d_data, "Waterfall Display");
@@ -324,7 +324,7 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent)
#endif
d_spectrogram->attach(this);
-
+
// LeftButton for the zooming
// MidButton for the panning
// RightButton: zoom out by 1
@@ -337,11 +337,11 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent)
Qt::RightButton, Qt::ControlModifier);
_zoomer->setMousePattern(QwtEventPattern::MouseSelect3,
Qt::RightButton);
-
+
_panner = new QwtPlotPanner(canvas());
_panner->setAxisEnabled(QwtPlot::yRight, false);
_panner->setMouseButton(Qt::MidButton);
-
+
// emit the position of clicks on widget
_picker = new QwtDblClickPlotPicker(canvas());
#if QWT_VERSION < 0x060000
@@ -354,11 +354,11 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent)
// Avoid jumping when labels with more/less digits
// appear/disappear when scrolling vertically
-
+
const QFontMetrics fm(axisWidget(QwtPlot::yLeft)->font());
QwtScaleDraw *sd = axisScaleDraw(QwtPlot::yLeft);
sd->setMinimumExtent( fm.width("100.00") );
-
+
const QColor c(Qt::black);
_zoomer->setRubberBandPen(c);
_zoomer->setTrackerPen(c);
@@ -374,7 +374,7 @@ WaterfallDisplayPlot::~WaterfallDisplayPlot()
delete d_spectrogram;
}
-void
+void
WaterfallDisplayPlot::Reset()
{
d_data->ResizeData(_startFrequency, _stopFrequency, _numPoints);
@@ -418,7 +418,7 @@ WaterfallDisplayPlot::SetFrequencyRange(const double constStartFreq,
if(stopFreq > startFreq) {
_startFrequency = startFreq;
_stopFrequency = stopFreq;
-
+
if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (_zoomer != NULL)){
double display_units = ceil(log10(units)/2.0);
setAxisScaleDraw(QwtPlot::xBottom, new WaterfallFreqDisplayScaleDraw(display_units));
@@ -448,7 +448,7 @@ WaterfallDisplayPlot::GetStopFrequency() const
}
void
-WaterfallDisplayPlot::PlotNewData(const double* dataPoints,
+WaterfallDisplayPlot::PlotNewData(const double* dataPoints,
const int64_t numDataPoints,
const double timePerFFT,
const gruel::high_res_timer_type timestamp,
@@ -457,30 +457,30 @@ WaterfallDisplayPlot::PlotNewData(const double* dataPoints,
if(numDataPoints > 0){
if(numDataPoints != _numPoints){
_numPoints = numDataPoints;
-
+
Reset();
-
+
d_spectrogram->invalidateCache();
d_spectrogram->itemChanged();
-
+
if(isVisible()){
replot();
}
-
+
_lastReplot = gruel::high_res_timer_now();
}
if(gruel::high_res_timer_now() - _lastReplot > timePerFFT*gruel::high_res_timer_tps()) {
d_data->addFFTData(dataPoints, numDataPoints, droppedFrames);
d_data->IncrementNumLinesToUpdate();
-
+
QwtTimeScaleDraw* timeScale = (QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
timeScale->SetSecondsPerLine(timePerFFT);
timeScale->SetZeroTime(timestamp);
-
+
((WaterfallZoomer*)_zoomer)->SetSecondsPerLine(timePerFFT);
((WaterfallZoomer*)_zoomer)->SetZeroTime(timestamp);
-
+
d_spectrogram->invalidateCache();
d_spectrogram->itemChanged();
@@ -492,7 +492,7 @@ WaterfallDisplayPlot::PlotNewData(const double* dataPoints,
}
void
-WaterfallDisplayPlot::SetIntensityRange(const double minIntensity,
+WaterfallDisplayPlot::SetIntensityRange(const double minIntensity,
const double maxIntensity)
{
#if QWT_VERSION < 0x060000
@@ -547,11 +547,11 @@ WaterfallDisplayPlot::GetIntensityColorMapType() const
}
void
-WaterfallDisplayPlot::SetIntensityColorMapType(const int newType,
- const QColor lowColor,
+WaterfallDisplayPlot::SetIntensityColorMapType(const int newType,
+ const QColor lowColor,
const QColor highColor)
{
- if((_intensityColorMapType != newType) ||
+ if((_intensityColorMapType != newType) ||
((newType == INTENSITY_COLOR_MAP_TYPE_USER_DEFINED) &&
(lowColor.isValid() && highColor.isValid()))){
switch(newType){
@@ -609,7 +609,7 @@ WaterfallDisplayPlot::SetIntensityColorMapType(const int newType,
}
default: break;
}
-
+
_UpdateIntensityRangeDisplay();
}
}
@@ -636,7 +636,7 @@ WaterfallDisplayPlot::_UpdateIntensityRangeDisplay()
#if QWT_VERSION < 0x060000
rightAxis->setColorMap(d_spectrogram->data()->range(),
d_spectrogram->colorMap());
- setAxisScale(QwtPlot::yRight,
+ setAxisScale(QwtPlot::yRight,
d_spectrogram->data()->range().minValue(),
d_spectrogram->data()->range().maxValue());
#else
@@ -660,7 +660,7 @@ WaterfallDisplayPlot::_UpdateIntensityRangeDisplay()
#endif
enableAxis(QwtPlot::yRight);
-
+
plotLayout()->setAlignCanvasToScales(true);
// Tell the display to redraw everything
diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.h b/gr-qtgui/lib/WaterfallDisplayPlot.h
index b78c750ff..d189ca2cb 100644
--- a/gr-qtgui/lib/WaterfallDisplayPlot.h
+++ b/gr-qtgui/lib/WaterfallDisplayPlot.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -49,9 +49,9 @@ public:
void Reset();
- void SetFrequencyRange(const double, const double,
+ void SetFrequencyRange(const double, const double,
const double, const bool,
- const double units=1000.0,
+ const double units=1000.0,
const std::string &strunits = "kHz");
double GetStartFrequency()const;
double GetStopFrequency()const;
@@ -85,7 +85,7 @@ public slots:
// version until it's worked out.
void OnPickerPointSelected(const QwtDoublePoint & p);
void OnPickerPointSelected6(const QPointF & p);
-
+
signals:
void UpdatedLowerIntensityLevel(const double);
void UpdatedUpperIntensityLevel(const double);
diff --git a/gr-qtgui/lib/plot_waterfall.cc b/gr-qtgui/lib/plot_waterfall.cc
index dbba657b8..517ec0275 100644
--- a/gr-qtgui/lib/plot_waterfall.cc
+++ b/gr-qtgui/lib/plot_waterfall.cc
@@ -21,12 +21,12 @@ public:
? QImage::Format_ARGB32 : QImage::Format_Indexed8 )
{
}
-
+
PlotWaterfallImage(const QImage &other):
QImage(other)
{
}
-
+
void initColorTable(const QImage& other)
{
setColorTable(other.colorTable());
@@ -45,7 +45,7 @@ public:
{
delete colorMap;
}
-
+
WaterfallData *data;
QwtColorMap *colorMap;
};
@@ -56,7 +56,7 @@ public:
- QwtPlotItem::Legend: false
The z value is initialized by 8.0.
-
+
\param title Title
\sa QwtPlotItem::setItemAttribute(), QwtPlotItem::setZ()
@@ -131,7 +131,7 @@ QwtDoubleRect PlotWaterfall::boundingRect() const
{
return d_data->data->boundingRect();
}
-#endif
+#endif
/*!
\brief Returns the recommended raster for a given rect.
@@ -152,7 +152,7 @@ QSize PlotWaterfall::rasterHint(const QwtDoubleRect &rect) const
/*!
\brief Render an image from the data and color map.
- The area is translated into a rect of the paint device.
+ The area is translated into a rect of the paint device.
For each pixel of this rect the intensity is mapped
into a color.
@@ -160,7 +160,7 @@ QSize PlotWaterfall::rasterHint(const QwtDoubleRect &rect) const
\param yMap Y-Scale Map
\param area Area that should be rendered in scale coordinates.
- \return A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending
+ \return A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending
on the color map.
\sa QwtRasterData::intensity(), QwtColorMap::rgb(),
@@ -168,11 +168,11 @@ QSize PlotWaterfall::rasterHint(const QwtDoubleRect &rect) const
*/
#if QWT_VERSION < 0x060000
QImage PlotWaterfall::renderImage(const QwtScaleMap &xMap,
- const QwtScaleMap &yMap,
+ const QwtScaleMap &yMap,
const QwtDoubleRect &area) const
#else
QImage PlotWaterfall::renderImage(const QwtScaleMap &xMap,
- const QwtScaleMap &yMap,
+ const QwtScaleMap &yMap,
const QRectF &area,
const QSize &size) const
#endif
@@ -224,7 +224,7 @@ QImage PlotWaterfall::renderImage(const QwtScaleMap &xMap,
xxMap.setPaintInterval(px1, px2);
xxMap.setScaleInterval(sx1, sx2);
yyMap.setPaintInterval(py1, py2);
- yyMap.setScaleInterval(sy1, sy2);
+ yyMap.setScaleInterval(sy1, sy2);
}
PlotWaterfallImage image(rect.size(), d_data->colorMap->format());
@@ -233,7 +233,7 @@ QImage PlotWaterfall::renderImage(const QwtScaleMap &xMap,
const QwtDoubleInterval intensityRange = d_data->data->range();
#else
const QwtInterval intensityRange = d_data->data->interval(Qt::ZAxis);
-#endif
+#endif
if ( !intensityRange.isValid() )
return image;
@@ -294,9 +294,9 @@ QImage PlotWaterfall::renderImage(const QwtScaleMap &xMap,
\param painter Painter
\param xMap Maps x-values into pixel coordinates.
\param yMap Maps y-values into pixel coordinates.
- \param canvasRect Contents rect of the canvas in painter coordinates
+ \param canvasRect Contents rect of the canvas in painter coordinates
- \sa setDisplayMode, renderImage,
+ \sa setDisplayMode, renderImage,
QwtPlotRasterItem::draw, drawContourLines
*/
diff --git a/gr-qtgui/lib/plot_waterfall.h b/gr-qtgui/lib/plot_waterfall.h
index 1613dd8de..df2537b57 100644
--- a/gr-qtgui/lib/plot_waterfall.h
+++ b/gr-qtgui/lib/plot_waterfall.h
@@ -18,7 +18,7 @@ class QwtColorMap;
A waterfall displays threedimenional data, where the 3rd dimension
( the intensity ) is displayed using colors. The colors are calculated
from the values using a color map.
-
+
\sa QwtRasterData, QwtColorMap
*/
@@ -50,11 +50,11 @@ public:
protected:
#if QWT_VERSION < 0x060000
QImage renderImage(const QwtScaleMap &xMap,
- const QwtScaleMap &yMap,
+ const QwtScaleMap &yMap,
const QwtDoubleRect &rect) const;
#else
QImage renderImage(const QwtScaleMap &xMap,
- const QwtScaleMap &yMap,
+ const QwtScaleMap &yMap,
const QRectF &rect,
const QSize &size=QSize(0,0)) const;
#endif
diff --git a/gr-qtgui/lib/qtgui_sink_c.cc b/gr-qtgui/lib/qtgui_sink_c.cc
index b99a0c56a..de730a871 100644
--- a/gr-qtgui/lib/qtgui_sink_c.cc
+++ b/gr-qtgui/lib/qtgui_sink_c.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -55,7 +55,7 @@ qtgui_sink_c::qtgui_sink_c (int fftsize, int wintype,
gr_make_io_signature (1, -1, sizeof(gr_complex)),
gr_make_io_signature (0, 0, 0)),
d_fftsize(fftsize),
- d_wintype((gr_firdes::win_type)(wintype)),
+ d_wintype((gr_firdes::win_type)(wintype)),
d_center_freq(fc), d_bandwidth(bw), d_name(name),
d_plotfreq(plotfreq), d_plotwaterfall(plotwaterfall),
d_plottime(plottime), d_plotconst(plotconst),
@@ -65,7 +65,7 @@ qtgui_sink_c::qtgui_sink_c (int fftsize, int wintype,
// Perform fftshift operation;
// this is usually desired when plotting
- d_shift = true;
+ d_shift = true;
d_fft = new gri_fft_complex (d_fftsize, true);
@@ -110,16 +110,16 @@ qtgui_sink_c::initialize()
}
uint64_t maxBufferSize = 32768;
- d_main_gui = new SpectrumGUIClass(maxBufferSize, d_fftsize,
- d_center_freq,
- -d_bandwidth/2.0,
+ d_main_gui = new SpectrumGUIClass(maxBufferSize, d_fftsize,
+ d_center_freq,
+ -d_bandwidth/2.0,
d_bandwidth/2.0);
d_main_gui->SetDisplayTitle(d_name);
d_main_gui->SetFFTSize(d_fftsize);
d_main_gui->SetWindowType((int)d_wintype);
- d_main_gui->OpenSpectrumWindow(d_parent,
+ d_main_gui->OpenSpectrumWindow(d_parent,
d_plotfreq, d_plotwaterfall,
d_plottime, d_plotconst);
@@ -152,12 +152,12 @@ qtgui_sink_c::pyqwidget()
}
void
-qtgui_sink_c::set_frequency_range(const double centerfreq,
+qtgui_sink_c::set_frequency_range(const double centerfreq,
const double bandwidth)
{
d_center_freq = centerfreq;
d_bandwidth = bandwidth;
- d_main_gui->SetFrequencyRange(d_center_freq,
+ d_main_gui->SetFrequencyRange(d_center_freq,
-d_bandwidth/2.0,
d_bandwidth/2.0);
}
@@ -175,7 +175,7 @@ qtgui_sink_c::set_constellation_axis(double xmin, double xmax,
d_main_gui->SetConstellationAxis(xmin, xmax, ymin, ymax);
}
-void
+void
qtgui_sink_c::set_constellation_pen_size(int size)
{
d_main_gui->SetConstellationPenSize(size);
@@ -211,10 +211,10 @@ qtgui_sink_c::fft(const gr_complex *data_in, int size)
d_fft->execute (); // compute the fft
}
-void
+void
qtgui_sink_c::windowreset()
{
- gr_firdes::win_type newwintype = (gr_firdes::win_type)d_main_gui->GetWindowType();
+ gr_firdes::win_type newwintype = (gr_firdes::win_type)d_main_gui->GetWindowType();
if(d_wintype != newwintype) {
d_wintype = newwintype;
buildwindow();
@@ -241,11 +241,11 @@ qtgui_sink_c::fftresize()
delete [] d_residbuf;
d_residbuf = new gr_complex[newfftsize];
- // Set new fft size and reset buffer index
- // (throws away any currently held data, but who cares?)
+ // Set new fft size and reset buffer index
+ // (throws away any currently held data, but who cares?)
d_fftsize = newfftsize;
d_index = 0;
-
+
// Reset window to reflect new size
buildwindow();
@@ -284,14 +284,14 @@ qtgui_sink_c::general_work (int noutput_items,
// If we have enough input for one full FFT, do it
if(datasize >= resid) {
const gruel::high_res_timer_type currentTime = gruel::high_res_timer_now();
-
+
// Fill up residbuf with d_fftsize number of items
memcpy(d_residbuf+d_index, &in[j], sizeof(gr_complex)*resid);
d_index = 0;
j += resid;
fft(d_residbuf, d_fftsize);
-
+
d_main_gui->UpdateWindow(true, d_fft->get_outbuf(), d_fftsize,
NULL, 0, (float*)d_residbuf, d_fftsize,
currentTime, true);
@@ -302,7 +302,7 @@ qtgui_sink_c::general_work (int noutput_items,
memcpy(d_residbuf+d_index, &in[j], sizeof(gr_complex)*datasize);
d_index += datasize;
j += datasize;
- }
+ }
}
consume_each(j);
diff --git a/gr-qtgui/lib/qtgui_sink_f.cc b/gr-qtgui/lib/qtgui_sink_f.cc
index a435064c0..a02f89d0a 100644
--- a/gr-qtgui/lib/qtgui_sink_f.cc
+++ b/gr-qtgui/lib/qtgui_sink_f.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -108,8 +108,8 @@ qtgui_sink_f::initialize()
uint64_t maxBufferSize = 32768;
d_main_gui = new SpectrumGUIClass(maxBufferSize, d_fftsize,
- d_center_freq,
- -d_bandwidth/2.0,
+ d_center_freq,
+ -d_bandwidth/2.0,
d_bandwidth/2.0);
d_main_gui->SetDisplayTitle(d_name);
d_main_gui->SetFFTSize(d_fftsize);
@@ -144,12 +144,12 @@ qtgui_sink_f::pyqwidget()
}
void
-qtgui_sink_f::set_frequency_range(const double centerfreq,
+qtgui_sink_f::set_frequency_range(const double centerfreq,
const double bandwidth)
{
d_center_freq = centerfreq;
d_bandwidth = bandwidth;
- d_main_gui->SetFrequencyRange(d_center_freq,
+ d_main_gui->SetFrequencyRange(d_center_freq,
-d_bandwidth/2.0,
d_bandwidth/2.0);
}
@@ -167,7 +167,7 @@ qtgui_sink_f::set_constellation_axis(double xmin, double xmax,
d_main_gui->SetConstellationAxis(xmin, xmax, ymin, ymax);
}
-void
+void
qtgui_sink_f::set_constellation_pen_size(int size)
{
d_main_gui->SetConstellationPenSize(size);
@@ -200,14 +200,14 @@ qtgui_sink_f::fft(const float *data_in, int size)
for (int i = 0; i < size; i++) // float to complex conversion
dst[i] = data_in[i];
}
-
+
d_fft->execute (); // compute the fft
}
-void
+void
qtgui_sink_f::windowreset()
{
- gr_firdes::win_type newwintype = (gr_firdes::win_type)d_main_gui->GetWindowType();
+ gr_firdes::win_type newwintype = (gr_firdes::win_type)d_main_gui->GetWindowType();
if(d_wintype != newwintype) {
d_wintype = newwintype;
buildwindow();
@@ -234,11 +234,11 @@ qtgui_sink_f::fftresize()
delete [] d_residbuf;
d_residbuf = new float[newfftsize];
- // Set new fft size and reset buffer index
- // (throws away any currently held data, but who cares?)
+ // Set new fft size and reset buffer index
+ // (throws away any currently held data, but who cares?)
d_fftsize = newfftsize;
d_index = 0;
-
+
// Reset window to reflect new size
buildwindow();
@@ -269,14 +269,14 @@ qtgui_sink_f::general_work (int noutput_items,
// If we have enough input for one full FFT, do it
if(datasize >= resid) {
const gruel::high_res_timer_type currentTime = gruel::high_res_timer_now();
-
+
// Fill up residbuf with d_fftsize number of items
memcpy(d_residbuf+d_index, &in[j], sizeof(float)*resid);
d_index = 0;
j += resid;
fft(d_residbuf, d_fftsize);
-
+
d_main_gui->UpdateWindow(true, d_fft->get_outbuf(), d_fftsize,
(float*)d_residbuf, d_fftsize, NULL, 0,
currentTime, true);
@@ -286,7 +286,7 @@ qtgui_sink_f::general_work (int noutput_items,
memcpy(d_residbuf+d_index, &in[j], sizeof(float)*datasize);
d_index += datasize;
j += datasize;
- }
+ }
}
consume_each(j);
diff --git a/gr-qtgui/lib/qtgui_time_sink_c.cc b/gr-qtgui/lib/qtgui_time_sink_c.cc
index 207d4a924..574fd93ad 100644
--- a/gr-qtgui/lib/qtgui_time_sink_c.cc
+++ b/gr-qtgui/lib/qtgui_time_sink_c.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* 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,
@@ -147,11 +147,11 @@ qtgui_time_sink_c::work (int noutput_items,
unsigned int datasize = noutput_items - i;
unsigned int resid = d_size-d_index;
idx = 0;
-
+
// If we have enough input for one full plot, do it
if(datasize >= resid) {
d_current_time = gruel::high_res_timer_now();
-
+
// Fill up residbufs with d_size number of items
for(n = 0; n < d_nconnections; n+=2) {
in = (const gr_complex*)input_items[idx++];
@@ -159,15 +159,15 @@ qtgui_time_sink_c::work (int noutput_items,
d_residbufs[n][d_index+k] = in[j+k].real();
d_residbufs[n+1][d_index+k] = in[j+k].imag();
}
- }
+ }
// Update the plot if its time
if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
d_last_time = d_current_time;
d_qApplication->postEvent(d_main_gui,
- new TimeUpdateEvent(d_residbufs, d_size));
+ new TimeUpdateEvent(d_residbufs, d_size));
}
-
+
d_index = 0;
j += resid;
}
@@ -184,7 +184,7 @@ qtgui_time_sink_c::work (int noutput_items,
}
d_index += datasize;
j += datasize;
- }
+ }
}
return noutput_items;
diff --git a/gr-qtgui/lib/qtgui_time_sink_f.cc b/gr-qtgui/lib/qtgui_time_sink_f.cc
index 2fe99f43c..09fdf0a92 100644
--- a/gr-qtgui/lib/qtgui_time_sink_f.cc
+++ b/gr-qtgui/lib/qtgui_time_sink_f.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* 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,
@@ -147,26 +147,26 @@ qtgui_time_sink_f::work (int noutput_items,
unsigned int datasize = noutput_items - i;
unsigned int resid = d_size-d_index;
idx = 0;
-
+
// If we have enough input for one full plot, do it
if(datasize >= resid) {
d_current_time = gruel::high_res_timer_now();
-
+
// Fill up residbufs with d_size number of items
for(n = 0; n < d_nconnections; n++) {
in = (const float*)input_items[idx++];
for(unsigned int k = 0; k < resid; k++) {
d_residbufs[n][d_index+k] = in[j+k];
}
- }
+ }
// Update the plot if its time
if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
d_last_time = d_current_time;
d_qApplication->postEvent(d_main_gui,
- new TimeUpdateEvent(d_residbufs, d_size));
+ new TimeUpdateEvent(d_residbufs, d_size));
}
-
+
d_index = 0;
j += resid;
}
@@ -184,6 +184,6 @@ qtgui_time_sink_f::work (int noutput_items,
j += datasize;
}
}
-
+
return noutput_items;
}
diff --git a/gr-qtgui/lib/spectrumUpdateEvents.cc b/gr-qtgui/lib/spectrumUpdateEvents.cc
index 9be2f5357..bec39747b 100644
--- a/gr-qtgui/lib/spectrumUpdateEvents.cc
+++ b/gr-qtgui/lib/spectrumUpdateEvents.cc
@@ -145,7 +145,7 @@ SpectrumWindowResetEvent::~SpectrumWindowResetEvent()
{
}
-SpectrumFrequencyRangeEvent::SpectrumFrequencyRangeEvent(const double centerFreq,
+SpectrumFrequencyRangeEvent::SpectrumFrequencyRangeEvent(const double centerFreq,
const double startFreq,
const double stopFreq)
: QEvent(QEvent::Type(10010))
diff --git a/gr-qtgui/lib/spectrumUpdateEvents.h b/gr-qtgui/lib/spectrumUpdateEvents.h
index 760619f88..faef0f087 100644
--- a/gr-qtgui/lib/spectrumUpdateEvents.h
+++ b/gr-qtgui/lib/spectrumUpdateEvents.h
@@ -95,7 +95,7 @@ class TimeUpdateEvent: public QEvent
public:
TimeUpdateEvent(const std::vector<double*> timeDomainPoints,
const uint64_t numTimeDomainDataPoints);
-
+
~TimeUpdateEvent();
int which() const;
diff --git a/gr-qtgui/lib/spectrumdisplayform.cc b/gr-qtgui/lib/spectrumdisplayform.cc
index 9fe553557..dd9011dbd 100644
--- a/gr-qtgui/lib/spectrumdisplayform.cc
+++ b/gr-qtgui/lib/spectrumdisplayform.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008-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,
@@ -41,30 +41,30 @@ SpectrumDisplayForm::SpectrumDisplayForm(QWidget* parent)
_realFFTDataPoints = new double[_numRealDataPoints];
_averagedValues = new double[_numRealDataPoints];
_historyVector = new std::vector<double*>;
-
+
_timeDomainDisplayPlot->setTitle(0, "real");
_timeDomainDisplayPlot->setTitle(1, "imag");
AvgLineEdit->setRange(0, 500); // Set range of Average box value from 0 to 500
MinHoldCheckBox_toggled( false );
MaxHoldCheckBox_toggled( false );
-
+
WaterfallMaximumIntensityWheel->setRange(-200, 0);
WaterfallMaximumIntensityWheel->setTickCnt(50);
WaterfallMinimumIntensityWheel->setRange(-200, 0);
WaterfallMinimumIntensityWheel->setTickCnt(50);
WaterfallMinimumIntensityWheel->setValue(-200);
-
+
_peakFrequency = 0;
_peakAmplitude = -HUGE_VAL;
-
+
_noiseFloorAmplitude = -HUGE_VAL;
- connect(_waterfallDisplayPlot, SIGNAL(UpdatedLowerIntensityLevel(const double)),
+ connect(_waterfallDisplayPlot, SIGNAL(UpdatedLowerIntensityLevel(const double)),
_frequencyDisplayPlot, SLOT(SetLowerIntensityLevel(const double)));
- connect(_waterfallDisplayPlot, SIGNAL(UpdatedUpperIntensityLevel(const double)),
+ connect(_waterfallDisplayPlot, SIGNAL(UpdatedUpperIntensityLevel(const double)),
_frequencyDisplayPlot, SLOT(SetUpperIntensityLevel(const double)));
-
+
_frequencyDisplayPlot->SetLowerIntensityLevel(-200);
_frequencyDisplayPlot->SetUpperIntensityLevel(-200);
@@ -90,13 +90,13 @@ SpectrumDisplayForm::SpectrumDisplayForm(QWidget* parent)
// Connect double click signals up
connect(_frequencyDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
this, SLOT(onFFTPlotPointSelected(const QPointF)));
-
+
connect(_waterfallDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
this, SLOT(onWFallPlotPointSelected(const QPointF)));
-
+
connect(_timeDomainDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
this, SLOT(onTimePlotPointSelected(const QPointF)));
-
+
connect(_constellationDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
this, SLOT(onConstPlotPointSelected(const QPointF)));
}
@@ -122,12 +122,12 @@ SpectrumDisplayForm::~SpectrumDisplayForm()
}
void
-SpectrumDisplayForm::setSystem( SpectrumGUIClass * newSystem,
- const uint64_t numFFTDataPoints,
+SpectrumDisplayForm::setSystem( SpectrumGUIClass * newSystem,
+ const uint64_t numFFTDataPoints,
const uint64_t numTimeDomainDataPoints )
{
ResizeBuffers(numFFTDataPoints, numTimeDomainDataPoints);
-
+
if(newSystem != NULL){
_system = newSystem;
_systemSpecifiedFlag = true;
@@ -179,12 +179,12 @@ SpectrumDisplayForm::newFrequencyData( const SpectrumUpdateEvent* spectrumUpdate
localPeakAmplitude = *realFFTDataPointsPtr;
}
sumMean += *realFFTDataPointsPtr;
-
+
complexDataPointsPtr++;
realFFTDataPointsPtr++;
}
-
- // This loop takes the first half of the input data and puts it in the
+
+ // This loop takes the first half of the input data and puts it in the
// second half of the plotted data
complexDataPointsPtr = complexDataPoints;
for(uint64_t point = 0; point < numFFTDataPoints/2; point++){
@@ -233,18 +233,18 @@ SpectrumDisplayForm::newFrequencyData( const SpectrumUpdateEvent* spectrumUpdate
if(lastOfMultipleUpdatesFlag){
int tabindex = SpectrumTypeTab->currentIndex();
if(tabindex == d_plot_fft) {
- _frequencyDisplayPlot->PlotNewData(_averagedValues, numFFTDataPoints,
- _noiseFloorAmplitude, _peakFrequency,
+ _frequencyDisplayPlot->PlotNewData(_averagedValues, numFFTDataPoints,
+ _noiseFloorAmplitude, _peakFrequency,
_peakAmplitude, d_update_time);
}
if(tabindex == d_plot_time) {
- _timeDomainDisplayPlot->PlotNewData(timeDomainDataPoints,
+ _timeDomainDisplayPlot->PlotNewData(timeDomainDataPoints,
numTimeDomainDataPoints,
d_update_time);
}
if(tabindex == d_plot_constellation) {
- _constellationDisplayPlot->PlotNewData(realTimeDomainDataPoints,
- imagTimeDomainDataPoints,
+ _constellationDisplayPlot->PlotNewData(realTimeDomainDataPoints,
+ imagTimeDomainDataPoints,
numTimeDomainDataPoints,
d_update_time);
}
@@ -252,12 +252,12 @@ SpectrumDisplayForm::newFrequencyData( const SpectrumUpdateEvent* spectrumUpdate
// Don't update the repeated data for the waterfall
if(!repeatDataFlag){
if(tabindex == d_plot_waterfall) {
- _waterfallDisplayPlot->PlotNewData(_realFFTDataPoints, numFFTDataPoints,
- d_update_time, dataTimestamp,
+ _waterfallDisplayPlot->PlotNewData(_realFFTDataPoints, numFFTDataPoints,
+ d_update_time, dataTimestamp,
spectrumUpdateEvent->getDroppedFFTFrames());
}
}
-
+
// Tell the system the GUI has been updated
if(_systemSpecifiedFlag){
_system->SetLastGUIUpdateTime(generatedTimestamp);
@@ -381,12 +381,12 @@ void
SpectrumDisplayForm::TabChanged(int index)
{
// This might be dangerous to call this with NULL
- resizeEvent(NULL);
+ resizeEvent(NULL);
}
void
SpectrumDisplayForm::SetFrequencyRange(const double newCenterFrequency,
- const double newStartFrequency,
+ const double newStartFrequency,
const double newStopFrequency)
{
double fdiff;
@@ -404,7 +404,7 @@ SpectrumDisplayForm::SetFrequencyRange(const double newCenterFrequency,
double units3 = std::max(floor(units10 / 3.0), 0.0);
double units = pow(10, (units10-fmod(units10, 3.0)));
int iunit = static_cast<int>(units3);
-
+
_startFrequency = newStartFrequency;
_stopFrequency = newStopFrequency;
_centerFrequency = newCenterFrequency;
@@ -491,15 +491,15 @@ SpectrumDisplayForm::ResizeBuffers( const uint64_t numFFTDataPoints,
_numRealDataPoints = numFFTDataPoints;
delete[] _realFFTDataPoints;
delete[] _averagedValues;
-
+
_realFFTDataPoints = new double[_numRealDataPoints];
_averagedValues = new double[_numRealDataPoints];
memset(_realFFTDataPoints, 0x0, _numRealDataPoints*sizeof(double));
-
+
const int historySize = _historyVector->size();
SetAverageCount(0); // Clear the existing history
SetAverageCount(historySize);
-
+
Reset();
}
}
@@ -622,7 +622,7 @@ SpectrumDisplayForm::WaterfallIntensityColorTypeChanged( int newType )
}
QMessageBox::information(this, "Low Intensity Color Selection", "In the next window, select the low intensity color for the waterfall display", QMessageBox::Ok);
lowIntensityColor = QColorDialog::getColor(lowIntensityColor, this);
-
+
// Select the High Intensity Color
highIntensityColor = _waterfallDisplayPlot->GetUserDefinedHighIntensityColor();
if(!highIntensityColor.isValid()){
@@ -631,7 +631,7 @@ SpectrumDisplayForm::WaterfallIntensityColorTypeChanged( int newType )
QMessageBox::information(this, "High Intensity Color Selection", "In the next window, select the high intensity color for the waterfall display", QMessageBox::Ok);
highIntensityColor = QColorDialog::getColor(highIntensityColor, this);
}
-
+
_waterfallDisplayPlot->SetIntensityColorMapType(newType, lowIntensityColor, highIntensityColor);
}
diff --git a/gr-qtgui/lib/spectrumdisplayform.h b/gr-qtgui/lib/spectrumdisplayform.h
index 30303a36f..63dd304d5 100644
--- a/gr-qtgui/lib/spectrumdisplayform.h
+++ b/gr-qtgui/lib/spectrumdisplayform.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2008,2009,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,
@@ -44,7 +44,7 @@ class SpectrumDisplayForm : public QWidget, public Ui::SpectrumDisplayForm
public:
SpectrumDisplayForm(QWidget* parent = 0);
~SpectrumDisplayForm();
-
+
void setSystem( SpectrumGUIClass * newSystem, const uint64_t numFFTDataPoints,
const uint64_t numTimeDomainDataPoints );
@@ -54,7 +54,7 @@ class SpectrumDisplayForm : public QWidget, public Ui::SpectrumDisplayForm
void AverageDataReset();
void ResizeBuffers( const uint64_t numFFTDataPoints,
const uint64_t numTimeDomainDataPoints );
-
+
public slots:
void resizeEvent( QResizeEvent * e );
void customEvent( QEvent * e );
@@ -123,9 +123,9 @@ private:
double _peakFrequency;
double _peakAmplitude;
double _stopFrequency;
-
+
//SpectrumUpdateEvent _lastSpectrumEvent;
-
+
// whether or not to use a particular display
int d_plot_fft;
int d_plot_waterfall;
diff --git a/gr-qtgui/lib/timedisplayform.cc b/gr-qtgui/lib/timedisplayform.cc
index cc4ac9951..c650cd3eb 100644
--- a/gr-qtgui/lib/timedisplayform.cc
+++ b/gr-qtgui/lib/timedisplayform.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* 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,
@@ -67,7 +67,7 @@ TimeDisplayForm::newData( const TimeUpdateEvent* spectrumUpdateEvent)
{
const std::vector<double*> timeDomainDataPoints = spectrumUpdateEvent->getTimeDomainPoints();
const uint64_t numTimeDomainDataPoints = spectrumUpdateEvent->getNumTimeDomainDataPoints();
-
+
_timeDomainDisplayPlot->PlotNewData(timeDomainDataPoints,
numTimeDomainDataPoints,
d_update_time);
@@ -112,7 +112,7 @@ TimeDisplayForm::onTimePlotPointSelected(const QPointF p)
void
TimeDisplayForm::setFrequencyRange(const double newCenterFrequency,
- const double newStartFrequency,
+ const double newStartFrequency,
const double newStopFrequency)
{
double fdiff = std::max(fabs(newStartFrequency), fabs(newStopFrequency));
@@ -123,7 +123,7 @@ TimeDisplayForm::setFrequencyRange(const double newCenterFrequency,
double units3 = std::max(floor(units10 / 3.0), 0.0);
double units = pow(10, (units10-fmod(units10, 3.0)));
int iunit = static_cast<int>(units3);
-
+
_startFrequency = newStartFrequency;
_stopFrequency = newStopFrequency;
diff --git a/gr-qtgui/lib/timedisplayform.h b/gr-qtgui/lib/timedisplayform.h
index 1216a1ef5..dd3f62a83 100644
--- a/gr-qtgui/lib/timedisplayform.h
+++ b/gr-qtgui/lib/timedisplayform.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* 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,
@@ -41,9 +41,9 @@ class TimeDisplayForm : public QWidget
public:
TimeDisplayForm(int nplots=1, QWidget* parent = 0);
~TimeDisplayForm();
-
+
void Reset();
-
+
public slots:
void resizeEvent( QResizeEvent * e );
void customEvent( QEvent * e );
@@ -77,7 +77,7 @@ private:
bool _systemSpecifiedFlag;
double _startFrequency;
double _stopFrequency;
-
+
QTimer *displayTimer;
double d_update_time;
};
diff --git a/gr-qtgui/lib/waterfallGlobalData.cc b/gr-qtgui/lib/waterfallGlobalData.cc
index 04366a297..f64ed14f1 100644
--- a/gr-qtgui/lib/waterfallGlobalData.cc
+++ b/gr-qtgui/lib/waterfallGlobalData.cc
@@ -9,15 +9,15 @@ WaterfallData::WaterfallData(const double minimumFrequency,
const uint64_t fftPoints,
const unsigned int historyExtent)
#if QWT_VERSION < 0x060000
- : QwtRasterData(QwtDoubleRect(minimumFrequency /* X START */, 0 /* Y START */,
- maximumFrequency - minimumFrequency /* WIDTH */,
+ : QwtRasterData(QwtDoubleRect(minimumFrequency /* X START */, 0 /* Y START */,
+ maximumFrequency - minimumFrequency /* WIDTH */,
static_cast<double>(historyExtent)/* HEIGHT */))
#else
: QwtRasterData()
#endif
{
_intensityRange = QwtDoubleInterval(-200.0, 0.0);
-
+
_fftPoints = fftPoints;
_historyLength = historyExtent;
@@ -46,7 +46,7 @@ void WaterfallData::Reset()
void WaterfallData::Copy(const WaterfallData* rhs)
{
-#if QWT_VERSION < 0x060000
+#if QWT_VERSION < 0x060000
if((_fftPoints != rhs->GetNumFFTPoints()) ||
(boundingRect() != rhs->boundingRect()) ){
_fftPoints = rhs->GetNumFFTPoints();
@@ -66,24 +66,24 @@ void WaterfallData::Copy(const WaterfallData* rhs)
SetSpectrumDataBuffer(rhs->GetSpectrumDataBuffer());
SetNumLinesToUpdate(rhs->GetNumLinesToUpdate());
-#if QWT_VERSION < 0x060000
+#if QWT_VERSION < 0x060000
setRange(rhs->range());
#else
setInterval(Qt::XAxis, rhs->interval(Qt::XAxis));
setInterval(Qt::YAxis, rhs->interval(Qt::YAxis));
setInterval(Qt::ZAxis, rhs->interval(Qt::ZAxis));
-#endif
+#endif
}
void WaterfallData::ResizeData(const double startFreq,
const double stopFreq,
const uint64_t fftPoints)
{
-#if QWT_VERSION < 0x060000
+#if QWT_VERSION < 0x060000
if((fftPoints != GetNumFFTPoints()) ||
(boundingRect().width() != (stopFreq - startFreq)) ||
(boundingRect().left() != startFreq)){
-
+
setBoundingRect(QwtDoubleRect(startFreq, 0,
stopFreq-startFreq,
boundingRect().height()));
@@ -96,7 +96,7 @@ void WaterfallData::ResizeData(const double startFreq,
if((fftPoints != GetNumFFTPoints()) ||
(interval(Qt::XAxis).width() != (stopFreq - startFreq)) ||
(interval(Qt::XAxis).minValue() != startFreq)){
-
+
setInterval(Qt::XAxis, QwtInterval(startFreq, stopFreq));
_fftPoints = fftPoints;
@@ -104,13 +104,13 @@ void WaterfallData::ResizeData(const double startFreq,
_spectrumData = new double[_fftPoints * _historyLength];
}
#endif
-
+
Reset();
}
QwtRasterData *WaterfallData::copy() const
{
-#if QWT_VERSION < 0x060000
+#if QWT_VERSION < 0x060000
WaterfallData* returnData = new WaterfallData(boundingRect().left(),
boundingRect().right(),
_fftPoints, _historyLength);
@@ -142,11 +142,11 @@ void WaterfallData::setRange(const QwtDoubleInterval& newRange)
double WaterfallData::value(double x, double y) const
{
double returnValue = 0.0;
-
+
#if QWT_VERSION < 0x060000
- const unsigned int intY = static_cast<unsigned int>((1.0 - (y/boundingRect().height())) *
+ const unsigned int intY = static_cast<unsigned int>((1.0 - (y/boundingRect().height())) *
static_cast<double>(_historyLength-1));
- const unsigned int intX = static_cast<unsigned int>((((x - boundingRect().left()) / boundingRect().width()) *
+ const unsigned int intX = static_cast<unsigned int>((((x - boundingRect().left()) / boundingRect().width()) *
static_cast<double>(_fftPoints-1)) + 0.5);
#else
double height = interval(Qt::YAxis).maxValue();
@@ -183,7 +183,7 @@ void WaterfallData::addFFTData(const double* fftData,
heightOffset = 0;
drawingDroppedFrames = static_cast<uint64_t>(_historyLength-1);
}
-
+
// Copy the old data over if any available
if(heightOffset > 0){
memmove( _spectrumData, &_spectrumData[(drawingDroppedFrames+1) * _fftPoints],
diff --git a/gr-qtgui/lib/waterfallGlobalData.h b/gr-qtgui/lib/waterfallGlobalData.h
index 89e48da5f..928c3b175 100644
--- a/gr-qtgui/lib/waterfallGlobalData.h
+++ b/gr-qtgui/lib/waterfallGlobalData.h
@@ -14,12 +14,12 @@ class WaterfallData: public QwtRasterData
public:
WaterfallData(const double, const double, const uint64_t, const unsigned int);
virtual ~WaterfallData();
-
+
virtual void Reset();
virtual void Copy(const WaterfallData*);
-
+
virtual void ResizeData(const double, const double, const uint64_t);
-
+
virtual QwtRasterData *copy() const;
#if QWT_VERSION < 0x060000
@@ -28,13 +28,13 @@ public:
#endif
virtual double value(double x, double y) const;
-
+
virtual uint64_t GetNumFFTPoints()const;
virtual void addFFTData(const double*, const uint64_t, const int);
-
+
virtual double* GetSpectrumDataBuffer()const;
virtual void SetSpectrumDataBuffer(const double*);
-
+
virtual int GetNumLinesToUpdate()const;
virtual void SetNumLinesToUpdate(const int);
virtual void IncrementNumLinesToUpdate();