summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-qtgui/lib/SpectrumGUIClass.cc2
-rw-r--r--gr-qtgui/lib/TimeDomainDisplayPlot.cc2
-rw-r--r--gr-qtgui/lib/spectrumdisplayform.cc29
-rw-r--r--gr-qtgui/lib/spectrumdisplayform.h6
4 files changed, 19 insertions, 20 deletions
diff --git a/gr-qtgui/lib/SpectrumGUIClass.cc b/gr-qtgui/lib/SpectrumGUIClass.cc
index e7ab84667..026c1986c 100644
--- a/gr-qtgui/lib/SpectrumGUIClass.cc
+++ b/gr-qtgui/lib/SpectrumGUIClass.cc
@@ -105,7 +105,7 @@ SpectrumGUIClass::OpenSpectrumWindow(QWidget* parent,
// Toggle Windows on/off
_spectrumDisplayForm->ToggleTabFrequency(frequency);
//_spectrumDisplayForm->ToggleTabWaterfall(waterfall);
- //_spectrumDisplayForm->ToggleTabTime(time);
+ _spectrumDisplayForm->ToggleTabTime(time);
//_spectrumDisplayForm->ToggleTabConstellation(constellation);
_windowOpennedFlag = true;
diff --git a/gr-qtgui/lib/TimeDomainDisplayPlot.cc b/gr-qtgui/lib/TimeDomainDisplayPlot.cc
index b3c0a035a..8bc40b998 100644
--- a/gr-qtgui/lib/TimeDomainDisplayPlot.cc
+++ b/gr-qtgui/lib/TimeDomainDisplayPlot.cc
@@ -272,6 +272,8 @@ void TimeDomainDisplayPlot::PlotNewData(const std::vector<double*> dataPoints,
for(int i = 0; i < _nplots; i++) {
memcpy(_dataPoints[i], dataPoints[i], numDataPoints*sizeof(double));
}
+
+ replot();
}
}
diff --git a/gr-qtgui/lib/spectrumdisplayform.cc b/gr-qtgui/lib/spectrumdisplayform.cc
index f52f96241..8c9cc085f 100644
--- a/gr-qtgui/lib/spectrumdisplayform.cc
+++ b/gr-qtgui/lib/spectrumdisplayform.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc.
+ * Copyright 2008-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -35,16 +35,15 @@ SpectrumDisplayForm::SpectrumDisplayForm(QWidget* parent)
_intValidator->setBottom(0);
_frequencyDisplayPlot = new FrequencyDisplayPlot(FrequencyPlotDisplayFrame);
//_waterfallDisplayPlot = new WaterfallDisplayPlot(WaterfallPlotDisplayFrame);
-
- //_timeDomainDisplayPlot = new TimeDomainDisplayPlot(2, TimeDomainDisplayFrame);
+ _timeDomainDisplayPlot = new TimeDomainDisplayPlot(2, TimeDomainDisplayFrame);
//_constellationDisplayPlot = new ConstellationDisplayPlot(ConstellationDisplayFrame);
_numRealDataPoints = 1024;
_realFFTDataPoints = new double[_numRealDataPoints];
_averagedValues = new double[_numRealDataPoints];
_historyVector = new std::vector<double*>;
- //_timeDomainDisplayPlot->setTitle(0, "real");
- //_timeDomainDisplayPlot->setTitle(1, "imag");
+ _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 );
@@ -78,7 +77,7 @@ SpectrumDisplayForm::SpectrumDisplayForm(QWidget* parent)
ToggleTabFrequency(false);
//ToggleTabWaterfall(false);
- //ToggleTabTime(false);
+ ToggleTabTime(false);
//ToggleTabConstellation(false);
_historyEntry = 0;
@@ -95,8 +94,8 @@ SpectrumDisplayForm::SpectrumDisplayForm(QWidget* parent)
//connect(_waterfallDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
// this, SLOT(onWFallPlotPointSelected(const QPointF)));
- //connect(_timeDomainDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
- // this, SLOT(onTimePlotPointSelected(const QPointF)));
+ connect(_timeDomainDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
+ this, SLOT(onTimePlotPointSelected(const QPointF)));
//connect(_constellationDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
// this, SLOT(onConstPlotPointSelected(const QPointF)));
@@ -238,12 +237,12 @@ SpectrumDisplayForm::newFrequencyData( const SpectrumUpdateEvent* spectrumUpdate
_noiseFloorAmplitude, _peakFrequency,
_peakAmplitude, d_update_time);
}
- /*
if(tabindex == d_plot_time) {
_timeDomainDisplayPlot->PlotNewData(timeDomainDataPoints,
numTimeDomainDataPoints,
d_update_time);
- }
+ }
+ /*
if(tabindex == d_plot_constellation) {
_constellationDisplayPlot->PlotNewData(realTimeDomainDataPoints,
imagTimeDomainDataPoints,
@@ -277,11 +276,11 @@ SpectrumDisplayForm::resizeEvent( QResizeEvent *e )
s.setHeight(FrequencyPlotDisplayFrame->height());
emit _frequencyDisplayPlot->resizeSlot(&s);
- /*
s.setWidth(TimeDomainDisplayFrame->width());
s.setHeight(TimeDomainDisplayFrame->height());
emit _timeDomainDisplayPlot->resizeSlot(&s);
+ /*
s.setWidth(WaterfallPlotDisplayFrame->width());
s.setHeight(WaterfallPlotDisplayFrame->height());
emit _waterfallDisplayPlot->resizeSlot(&s);
@@ -337,7 +336,7 @@ SpectrumDisplayForm::UpdateGuiTimer()
// all of the plots.
_frequencyDisplayPlot->canvas()->update();
//_waterfallDisplayPlot->canvas()->update();
- //_timeDomainDisplayPlot->canvas()->update();
+ _timeDomainDisplayPlot->canvas()->update();
//_constellationDisplayPlot->canvas()->update();
}
@@ -426,9 +425,9 @@ SpectrumDisplayForm::SetFrequencyRange(const double newCenterFrequency,
_centerFrequency,
UseRFFrequenciesCheckBox->isChecked(),
units, strunits[iunit]);
+ */
_timeDomainDisplayPlot->SetSampleRate(_stopFrequency - _startFrequency,
units, strtime[iunit]);
- */
}
}
@@ -686,7 +685,6 @@ SpectrumDisplayForm::ToggleTabWaterfall(const bool state)
void
SpectrumDisplayForm::ToggleTabTime(const bool state)
{
- /*
if(state == true) {
if(d_plot_time == -1) {
SpectrumTypeTab->addTab(TimeDomainPage, "Time Domain Display");
@@ -697,7 +695,6 @@ SpectrumDisplayForm::ToggleTabTime(const bool state)
SpectrumTypeTab->removeTab(SpectrumTypeTab->indexOf(TimeDomainPage));
d_plot_time = -1;
}
- */
}
void
@@ -721,7 +718,7 @@ SpectrumDisplayForm::ToggleTabConstellation(const bool state)
void
SpectrumDisplayForm::SetTimeDomainAxis(double min, double max)
{
- //_timeDomainDisplayPlot->setYaxis(min, max);
+ _timeDomainDisplayPlot->setYaxis(min, max);
}
void
diff --git a/gr-qtgui/lib/spectrumdisplayform.h b/gr-qtgui/lib/spectrumdisplayform.h
index 77b796ae1..061ce63a1 100644
--- a/gr-qtgui/lib/spectrumdisplayform.h
+++ b/gr-qtgui/lib/spectrumdisplayform.h
@@ -31,7 +31,7 @@ class SpectrumGUIClass;
#include <SpectrumGUIClass.h>
#include <FrequencyDisplayPlot.h>
//#include <WaterfallDisplayPlot.h>
-//#include <TimeDomainDisplayPlot.h>
+#include <TimeDomainDisplayPlot.h>
//#include <ConstellationDisplayPlot.h>
#include <QValidator>
#include <QTimer>
@@ -113,7 +113,7 @@ private:
QIntValidator* _intValidator;
FrequencyDisplayPlot* _frequencyDisplayPlot;
//WaterfallDisplayPlot* _waterfallDisplayPlot;
- //TimeDomainDisplayPlot* _timeDomainDisplayPlot;
+ TimeDomainDisplayPlot* _timeDomainDisplayPlot;
//ConstellationDisplayPlot* _constellationDisplayPlot;
SpectrumGUIClass* _system;
bool _systemSpecifiedFlag;
@@ -129,7 +129,7 @@ private:
// whether or not to use a particular display
int d_plot_fft;
//int d_plot_waterfall;
- //int d_plot_time;
+ int d_plot_time;
//int d_plot_constellation;
QTimer *displayTimer;