[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r10583 - gnuradio/branches/developers/trondeau/qtdevel
From: |
trondeau |
Subject: |
[Commit-gnuradio] r10583 - gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib |
Date: |
Wed, 11 Mar 2009 19:05:32 -0600 (MDT) |
Author: trondeau
Date: 2009-03-11 19:05:31 -0600 (Wed, 11 Mar 2009)
New Revision: 10583
Modified:
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.cc
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.h
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.ui
Log:
wip: only plotting currently active tab to save cpu.
Modified:
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.cc
===================================================================
---
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.cc
2009-03-11 20:52:08 UTC (rev 10582)
+++
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.cc
2009-03-12 01:05:31 UTC (rev 10583)
@@ -7,15 +7,26 @@
SpectrumDisplayForm::SpectrumDisplayForm(QWidget* parent) : QDialog(parent){
setupUi(this);
+
+ d_plot_fft = true;
+ d_plot_waterfall = true;
+ d_plot_waterfall3d = true;
+ d_plot_time = true;
+ d_plot_constellation = true;
_systemSpecifiedFlag = false;
_intValidator = new QIntValidator(this);
_intValidator->setBottom(0);
- _frequencyDisplayPlot = new FrequencyDisplayPlot(Tab1PlotDisplayFrame);
- _waterfallDisplayPlot = new WaterfallDisplayPlot(Tab2PlotDisplayFrame);
- _waterfall3DDisplayPlot = new
Waterfall3DDisplayPlot(Waterfall3DPlotDisplayFrame);
- _timeDomainDisplayPlot = new TimeDomainDisplayPlot(TimeDomainDisplayFrame);
- _constellationDisplayPlot = new
ConstellationDisplayPlot(ConstellationDisplayFrame);
+ if(d_plot_fft)
+ _frequencyDisplayPlot = new
FrequencyDisplayPlot(FrequencyPlotDisplayFrame);
+ if(d_plot_waterfall)
+ _waterfallDisplayPlot = new
WaterfallDisplayPlot(WaterfallPlotDisplayFrame);
+ if(d_plot_waterfall3d)
+ _waterfall3DDisplayPlot = new
Waterfall3DDisplayPlot(Waterfall3DPlotDisplayFrame);
+ if(d_plot_time)
+ _timeDomainDisplayPlot = new TimeDomainDisplayPlot(TimeDomainDisplayFrame);
+ if(d_plot_constellation)
+ _constellationDisplayPlot = new
ConstellationDisplayPlot(ConstellationDisplayFrame);
_numRealDataPoints = 1024;
_realFFTDataPoints = new double[_numRealDataPoints];
_averagedValues = new double[_numRealDataPoints];
@@ -42,15 +53,19 @@
_peakAmplitude = -HUGE_VAL;
_noiseFloorAmplitude = -HUGE_VAL;
-
- connect(_waterfallDisplayPlot, SIGNAL(UpdatedLowerIntensityLevel(const
double)),
- _frequencyDisplayPlot, SLOT(SetLowerIntensityLevel(const double)));
- connect(_waterfallDisplayPlot, SIGNAL(UpdatedUpperIntensityLevel(const
double)),
- _frequencyDisplayPlot, SLOT(SetUpperIntensityLevel(const double)));
-
- _frequencyDisplayPlot->SetLowerIntensityLevel(-200);
- _frequencyDisplayPlot->SetUpperIntensityLevel(-200);
-
+
+ if(d_plot_fft && d_plot_waterfall) {
+ connect(_waterfallDisplayPlot, SIGNAL(UpdatedLowerIntensityLevel(const
double)),
+ _frequencyDisplayPlot, SLOT(SetLowerIntensityLevel(const double)));
+ connect(_waterfallDisplayPlot, SIGNAL(UpdatedUpperIntensityLevel(const
double)),
+ _frequencyDisplayPlot, SLOT(SetUpperIntensityLevel(const double)));
+ }
+
+ if(d_plot_fft) {
+ _frequencyDisplayPlot->SetLowerIntensityLevel(-200);
+ _frequencyDisplayPlot->SetUpperIntensityLevel(-200);
+ }
+
// Load up the acceptable FFT sizes...
FFTSizeComboBox->clear();
for(long fftSize = SpectrumGUIClass::MIN_FFT_SIZE; fftSize <=
SpectrumGUIClass::MAX_FFT_SIZE; fftSize *= 2){
@@ -116,13 +131,29 @@
// 75 ohm load assumption
// 10 * log10 (v^2 / (2 * 75.0 * .001)) = 10 * log10( v^2 * 15)
- *realFFTDataPointsPtr = 10.0*log10((((*complexDataPointsPtr).real() *
(*complexDataPointsPtr).real()) +
((*complexDataPointsPtr).imag()*(*complexDataPointsPtr).imag())) + 1e-20);
+ *realFFTDataPointsPtr = 10.0*log10((((*complexDataPointsPtr).real() *
(*complexDataPointsPtr).real()) +
+
((*complexDataPointsPtr).imag()*(*complexDataPointsPtr).imag())) + 1e-20);
complexDataPointsPtr++;
realFFTDataPointsPtr++;
}
+ d_plot_fft = false;
+ d_plot_waterfall = false;
+ d_plot_waterfall3d = false;
+ d_plot_time = false;
+ d_plot_constellation = false;
+ switch(SpectrumTypeTab->currentIndex()) {
+ case(0): d_plot_fft = true; break;
+ case(1): d_plot_waterfall = true; break;
+ case(2): d_plot_waterfall3d = true; break;
+ case(3): d_plot_time = true; break;
+ case(4): d_plot_constellation = true; break;
+ }
+
+
+
// Don't update the averaging history if this is repeated data
if(!repeatDataFlag){
_AverageHistory(_realFFTDataPoints);
@@ -167,22 +198,30 @@
}
if(lastOfMultipleUpdatesFlag){
- _frequencyDisplayPlot->PlotNewData(_averagedValues, numFFTDataPoints,
- _noiseFloorAmplitude, _peakFrequency,
- _peakAmplitude);
- _timeDomainDisplayPlot->PlotNewData(realTimeDomainDataPoints,
- imagTimeDomainDataPoints,
- numTimeDomainDataPoints);
- _constellationDisplayPlot->PlotNewData(realTimeDomainDataPoints,
- imagTimeDomainDataPoints,
- numTimeDomainDataPoints);
+ if(d_plot_fft) {
+ _frequencyDisplayPlot->PlotNewData(_averagedValues, numFFTDataPoints,
+ _noiseFloorAmplitude, _peakFrequency,
+ _peakAmplitude);
+ }
+ if(d_plot_time) {
+ _timeDomainDisplayPlot->PlotNewData(realTimeDomainDataPoints,
+ imagTimeDomainDataPoints,
+ numTimeDomainDataPoints);
+ }
+ if(d_plot_constellation) {
+ _constellationDisplayPlot->PlotNewData(realTimeDomainDataPoints,
+ imagTimeDomainDataPoints,
+ numTimeDomainDataPoints);
+ }
}
// Don't update the repeated data for the waterfall
if(!repeatDataFlag){
- _waterfallDisplayPlot->PlotNewData(_realFFTDataPoints, numFFTDataPoints,
- timePerFFT, dataTimestamp,
-
spectrumUpdateEvent->getDroppedFFTFrames());
- if( _openGLWaterfall3DFlag == 1 ){
+ if(d_plot_waterfall) {
+ _waterfallDisplayPlot->PlotNewData(_realFFTDataPoints, numFFTDataPoints,
+ timePerFFT, dataTimestamp,
+
spectrumUpdateEvent->getDroppedFFTFrames());
+ }
+ if( _openGLWaterfall3DFlag == 1 && d_plot_waterfall3d){
_waterfall3DDisplayPlot->PlotNewData(_realFFTDataPoints,
numFFTDataPoints,
timePerFFT, dataTimestamp,
spectrumUpdateEvent->getDroppedFFTFrames());
@@ -207,29 +246,38 @@
SpectrumTypeTab->resize( e->size().width(), e->size().height()-60);
// Tell the TabXFreqDisplay to resize
- //Tab1PlotDisplayFrame->resize(e->size().width()-4,
- //Tab1PlotDisplayFrame->height());
- Tab1PlotDisplayFrame->resize(e->size().width()-4,
- e->size().height()-140);
- Tab2PlotDisplayFrame->resize(e->size().width()-4,
- e->size().height()-140);
- Waterfall3DPlotDisplayFrame->resize(e->size().width()-4,
- e->size().height()-140);
- TimeDomainDisplayFrame->resize(e->size().width()-4,
+ FrequencyPlotDisplayFrame->resize(e->size().width()-4,
+ e->size().height()-140);
+ _frequencyDisplayPlot->resize( FrequencyPlotDisplayFrame->width()-4,
e->size().height()-140);
- ConstellationDisplayFrame->resize(e->size().width()-4,
+
+ // Move the Power Lbl and Line Edit
+ PowerLabel->move(e->size().width()-(415-324) - PowerLabel->width(),
+ e->size().height()-135);
+ PowerLineEdit->move(e->size().width()-(415-318) - PowerLineEdit->width(),
+ e->size().height()-115);
+
+ // Move the Avg Lbl and Line Edit
+ AvgLabel->move(e->size().width()-(415-406) - AvgLabel->width(),
+ e->size().height()-135);
+ AvgLineEdit->move(e->size().width()-(415-400) - AvgLineEdit->width(),
+ e->size().height()-115);
+
+ // Move Max and Min check boxes
+ MaxHoldCheckBox->move(MaxHoldCheckBox->x(),
+ e->size().height()-135);
+ MaxHoldResetBtn->move(MaxHoldResetBtn->x(),
+ e->size().height()-135);
+ MinHoldCheckBox->move(MinHoldCheckBox->x(),
+ e->size().height()-115);
+ MinHoldResetBtn->move(MinHoldResetBtn->x(),
+ e->size().height()-115);
+
+ WaterfallPlotDisplayFrame->resize(e->size().width()-4,
e->size().height()-140);
- _frequencyDisplayPlot->resize( Tab1PlotDisplayFrame->width()-4,
+ _waterfallDisplayPlot->resize( WaterfallPlotDisplayFrame->width()-4,
e->size().height()-140);
- _waterfallDisplayPlot->resize( Tab2PlotDisplayFrame->width()-4,
- e->size().height()-140);
- _waterfall3DDisplayPlot->resize( Waterfall3DPlotDisplayFrame->width()-4,
- e->size().height()-140);
- _timeDomainDisplayPlot->resize( TimeDomainDisplayFrame->width()-4,
- e->size().height()-140);
- _constellationDisplayPlot->resize( TimeDomainDisplayFrame->width()-4,
- e->size().height()-140);
-
+
// Move the IntensityWheels and Labels
WaterfallMaximumIntensityLabel->move(width() - 5 -
WaterfallMaximumIntensityLabel->width(),
@@ -237,7 +285,7 @@
WaterfallMaximumIntensityWheel->resize(WaterfallMaximumIntensityLabel->x() -
5 -
WaterfallMaximumIntensityWheel->x(),
WaterfallMaximumIntensityWheel->height());
-
+
WaterfallMinimumIntensityLabel->move(width() - 5 -
WaterfallMinimumIntensityLabel->width(),
height() - 115);
@@ -246,14 +294,20 @@
WaterfallMaximumIntensityWheel->height());
WaterfallMinimumIntensityWheel->move(WaterfallMinimumIntensityWheel->x(),
height() - 115);
-
+ WaterfallAutoScaleBtn->move(WaterfallAutoScaleBtn->x(),
+ e->size().height()-115);
+
+ Waterfall3DPlotDisplayFrame->resize(e->size().width()-4,
+ e->size().height()-140);
+ _waterfall3DDisplayPlot->resize( Waterfall3DPlotDisplayFrame->width()-4,
+ e->size().height()-140);
+
Waterfall3DMaximumIntensityLabel->move(width() - 5 -
Waterfall3DMaximumIntensityLabel->width(),
Waterfall3DMaximumIntensityLabel->y());
Waterfall3DMaximumIntensityWheel->resize(Waterfall3DMaximumIntensityLabel->x()
- 5 -
Waterfall3DMaximumIntensityWheel->x(),
Waterfall3DMaximumIntensityWheel->height());
-
Waterfall3DMinimumIntensityLabel->move(width() - 5 -
Waterfall3DMinimumIntensityLabel->width(),
height() - 115);
@@ -262,42 +316,25 @@
Waterfall3DMaximumIntensityWheel->height());
Waterfall3DMinimumIntensityWheel->move(Waterfall3DMinimumIntensityWheel->x(),
height() - 115);
-
- // Move Waterfall and Waterfall3D Auto Scan button
- WaterfallAutoScaleBtn->move(WaterfallAutoScaleBtn->x(),
- e->size().height()-115);
Waterfall3DAutoScaleBtn->move(WaterfallAutoScaleBtn->x(),
- e->size().height()-115);
+ e->size().height()-115);
-
- // Move the Power Lbl and Line Edit
- PowerLabel->move(e->size().width()-(415-324) - PowerLabel->width(),
- e->size().height()-135);
- PowerLineEdit->move(e->size().width()-(415-318) - PowerLineEdit->width(),
- e->size().height()-115);
-
- // Move the Avg Lbl and Line Edit
- AvgLabel->move(e->size().width()-(415-406) - AvgLabel->width(),
- e->size().height()-135);
- AvgLineEdit->move(e->size().width()-(415-400) - AvgLineEdit->width(),
- e->size().height()-115);
-
- // Move Max and Min check boxes
- MaxHoldCheckBox->move(MaxHoldCheckBox->x(),
- e->size().height()-135);
- MaxHoldResetBtn->move(MaxHoldResetBtn->x(),
- e->size().height()-135);
- MinHoldCheckBox->move(MinHoldCheckBox->x(),
- e->size().height()-115);
- MinHoldResetBtn->move(MinHoldResetBtn->x(),
- e->size().height()-115);
+ TimeDomainDisplayFrame->resize(e->size().width()-4,
+ e->size().height()-140);
+ _timeDomainDisplayPlot->resize( TimeDomainDisplayFrame->width()-4,
+ e->size().height()-140);
+ ConstellationDisplayFrame->resize(e->size().width()-4,
+ e->size().height()-140);
+ _constellationDisplayPlot->resize( TimeDomainDisplayFrame->width()-4,
+ e->size().height()-140);
+
// Move the FFT Size Combobox and label
FFTSizeComboBox->move(width() - 5 - FFTSizeComboBox->width(),
height()-50);
FFTSizeLabel->move(width() - 10 - FFTSizeComboBox->width() -
FFTSizeLabel->width(),
height()-50);
-
+
// Move the lower check and combo boxes
UseRFFrequenciesCheckBox->move(UseRFFrequenciesCheckBox->x(), height()-50);
WindowLbl->move(WindowLbl->x(), height()-25);
@@ -322,26 +359,28 @@
waterfall3DMaximumIntensityChangedCB(Waterfall3DMaximumIntensityWheel->value());
// If the video card doesn't support OpenGL then don't display the 3D
Waterfall
- if(QGLFormat::hasOpenGL()){
- // Check for Hardware Acceleration of the OpenGL
- if(!_waterfall3DDisplayPlot->format().directRendering()){
- // Only ask this once while the program is running...
- if(_openGLWaterfall3DFlag == -1){
- _openGLWaterfall3DFlag = 0;
- if(QMessageBox::warning(this, "OpenGL Direct Rendering NOT
Supported", "<center>The system's video card hardware or current drivers do not
support direct hardware rendering of the OpenGL
modules.</center><br><center>Software rendering is VERY processor
intensive.</center><br><center>Do you want to use software
rendering?</center>", QMessageBox::Yes, QMessageBox::No | QMessageBox::Default
| QMessageBox::Escape) == QMessageBox::Yes){
- _openGLWaterfall3DFlag = 1;
+ if(d_plot_waterfall3d) {
+ if(QGLFormat::hasOpenGL()){
+ // Check for Hardware Acceleration of the OpenGL
+ if(!_waterfall3DDisplayPlot->format().directRendering()){
+ // Only ask this once while the program is running...
+ if(_openGLWaterfall3DFlag == -1){
+ _openGLWaterfall3DFlag = 0;
+ if(QMessageBox::warning(this, "OpenGL Direct Rendering NOT
Supported", "<center>The system's video card hardware or current drivers do not
support direct hardware rendering of the OpenGL
modules.</center><br><center>Software rendering is VERY processor
intensive.</center><br><center>Do you want to use software
rendering?</center>", QMessageBox::Yes, QMessageBox::No | QMessageBox::Default
| QMessageBox::Escape) == QMessageBox::Yes){
+ _openGLWaterfall3DFlag = 1;
+ }
}
}
+ else{
+ _openGLWaterfall3DFlag = 1;
+ }
}
- else{
- _openGLWaterfall3DFlag = 1;
+
+ if(_openGLWaterfall3DFlag != 1){
+ SpectrumTypeTab->removeTab(SpectrumTypeTab->indexOf(Waterfall3DPage));
}
}
- if(_openGLWaterfall3DFlag != 1){
- SpectrumTypeTab->removeTab(SpectrumTypeTab->indexOf(Waterfall3DPage));
- }
-
// Clear any previous display
Reset();
@@ -385,7 +424,9 @@
void SpectrumDisplayForm::MaxHoldCheckBox_toggled( bool newState )
{
MaxHoldResetBtn->setEnabled(newState);
- _frequencyDisplayPlot->SetMaxFFTVisible(newState);
+ if(d_plot_fft) {
+ _frequencyDisplayPlot->SetMaxFFTVisible(newState);
+ }
MaxHoldResetBtn_clicked();
}
@@ -393,22 +434,28 @@
void SpectrumDisplayForm::MinHoldCheckBox_toggled( bool newState )
{
MinHoldResetBtn->setEnabled(newState);
- _frequencyDisplayPlot->SetMinFFTVisible(newState);
+ if(d_plot_fft) {
+ _frequencyDisplayPlot->SetMinFFTVisible(newState);
+ }
MinHoldResetBtn_clicked();
}
void SpectrumDisplayForm::MinHoldResetBtn_clicked()
{
- _frequencyDisplayPlot->ClearMinData();
- _frequencyDisplayPlot->replot();
+ if(d_plot_fft) {
+ _frequencyDisplayPlot->ClearMinData();
+ _frequencyDisplayPlot->replot();
+ }
}
void SpectrumDisplayForm::MaxHoldResetBtn_clicked()
{
- _frequencyDisplayPlot->ClearMaxData();
- _frequencyDisplayPlot->replot();
+ if(d_plot_fft) {
+ _frequencyDisplayPlot->ClearMaxData();
+ _frequencyDisplayPlot->replot();
+ }
}
@@ -435,11 +482,20 @@
}
}
-void SpectrumDisplayForm::SetFrequencyRange(const double newStartFrequency,
const double newStopFrequency, const double newCenterFrequency){
- _frequencyDisplayPlot->SetFrequencyRange(newStartFrequency,
newStopFrequency, newCenterFrequency, UseRFFrequenciesCheckBox->isChecked());
- _waterfallDisplayPlot->SetFrequencyRange(newStartFrequency,
newStopFrequency, newCenterFrequency, UseRFFrequenciesCheckBox->isChecked());
- _waterfall3DDisplayPlot->SetFrequencyRange(newStartFrequency,
newStopFrequency, newCenterFrequency, UseRFFrequenciesCheckBox->isChecked());
-
+void SpectrumDisplayForm::SetFrequencyRange(const double newStartFrequency,
const double newStopFrequency,
+ const double newCenterFrequency){
+ if(d_plot_fft) {
+ _frequencyDisplayPlot->SetFrequencyRange(newStartFrequency,
newStopFrequency, newCenterFrequency,
+
UseRFFrequenciesCheckBox->isChecked());
+ }
+ if(d_plot_waterfall) {
+ _waterfallDisplayPlot->SetFrequencyRange(newStartFrequency,
newStopFrequency, newCenterFrequency,
+
UseRFFrequenciesCheckBox->isChecked());
+ }
+ if(d_plot_waterfall3d) {
+ _waterfall3DDisplayPlot->SetFrequencyRange(newStartFrequency,
newStopFrequency, newCenterFrequency,
+
UseRFFrequenciesCheckBox->isChecked());
+ }
}
int SpectrumDisplayForm::GetAverageCount(){
@@ -514,8 +570,12 @@
void SpectrumDisplayForm::Reset(){
AverageDataReset();
- _waterfallDisplayPlot->Reset();
- _waterfall3DDisplayPlot->Reset();
+ if(d_plot_waterfall) {
+ _waterfallDisplayPlot->Reset();
+ }
+ if(d_plot_waterfall3d) {
+ _waterfall3DDisplayPlot->Reset();
+ }
}
@@ -569,7 +629,11 @@
else{
WaterfallMaximumIntensityWheel->setValue(WaterfallMinimumIntensityWheel->value());
}
-
_waterfallDisplayPlot->SetIntensityRange(WaterfallMinimumIntensityWheel->value(),
WaterfallMaximumIntensityWheel->value());
+
+ if(d_plot_waterfall) {
+
_waterfallDisplayPlot->SetIntensityRange(WaterfallMinimumIntensityWheel->value(),
+
WaterfallMaximumIntensityWheel->value());
+ }
}
@@ -581,7 +645,11 @@
else{
WaterfallMinimumIntensityWheel->setValue(WaterfallMaximumIntensityWheel->value());
}
-
_waterfallDisplayPlot->SetIntensityRange(WaterfallMinimumIntensityWheel->value(),
WaterfallMaximumIntensityWheel->value());
+
+ if(d_plot_waterfall) {
+
_waterfallDisplayPlot->SetIntensityRange(WaterfallMinimumIntensityWheel->value(),
+
WaterfallMaximumIntensityWheel->value());
+ }
}
void SpectrumDisplayForm::waterfall3DMaximumIntensityChangedCB( double
newValue )
@@ -592,7 +660,11 @@
else{
Waterfall3DMaximumIntensityWheel->setValue(Waterfall3DMinimumIntensityWheel->value());
}
-
_waterfall3DDisplayPlot->SetIntensityRange(Waterfall3DMinimumIntensityWheel->value(),
Waterfall3DMaximumIntensityWheel->value());
+
+ if(d_plot_waterfall3d) {
+
_waterfall3DDisplayPlot->SetIntensityRange(Waterfall3DMinimumIntensityWheel->value(),
+
Waterfall3DMaximumIntensityWheel->value());
+ }
}
@@ -604,7 +676,11 @@
else{
Waterfall3DMinimumIntensityWheel->setValue(Waterfall3DMaximumIntensityWheel->value());
}
-
_waterfall3DDisplayPlot->SetIntensityRange(Waterfall3DMinimumIntensityWheel->value(),
Waterfall3DMaximumIntensityWheel->value());
+
+ if(d_plot_waterfall3d) {
+
_waterfall3DDisplayPlot->SetIntensityRange(Waterfall3DMinimumIntensityWheel->value(),
+
Waterfall3DMaximumIntensityWheel->value());
+ }
}
@@ -650,46 +726,51 @@
{
QColor lowIntensityColor;
QColor highIntensityColor;
- if(newType == WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_USER_DEFINED){
- // Select the Low Intensity Color
- lowIntensityColor =
_waterfallDisplayPlot->GetUserDefinedLowIntensityColor();
- if(!lowIntensityColor.isValid()){
- lowIntensityColor = Qt::black;
+ if(d_plot_waterfall) {
+ if(newType == WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_USER_DEFINED){
+ // Select the Low Intensity Color
+ lowIntensityColor =
_waterfallDisplayPlot->GetUserDefinedLowIntensityColor();
+ if(!lowIntensityColor.isValid()){
+ lowIntensityColor = Qt::black;
+ }
+ 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()){
+ highIntensityColor = Qt::white;
+ }
+ 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);
}
- 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()){
- highIntensityColor = Qt::white;
- }
- 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);
}
- _waterfallDisplayPlot->SetIntensityColorMapType(newType, lowIntensityColor,
highIntensityColor);
}
void SpectrumDisplayForm::Waterfall3DIntensityColorTypeChanged( int newType )
{
QColor lowIntensityColor;
QColor highIntensityColor;
- if(newType == Waterfall3DDisplayPlot::INTENSITY_COLOR_MAP_TYPE_USER_DEFINED){
- // Select the Low Intensity Color
- lowIntensityColor =
_waterfallDisplayPlot->GetUserDefinedLowIntensityColor();
- if(!lowIntensityColor.isValid()){
- lowIntensityColor = Qt::black;
+ if(d_plot_waterfall3d) {
+ if(newType ==
Waterfall3DDisplayPlot::INTENSITY_COLOR_MAP_TYPE_USER_DEFINED){
+ // Select the Low Intensity Color
+ lowIntensityColor =
_waterfallDisplayPlot->GetUserDefinedLowIntensityColor();
+ if(!lowIntensityColor.isValid()){
+ lowIntensityColor = Qt::black;
+ }
+ 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()){
+ highIntensityColor = Qt::white;
+ }
+ 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);
}
- 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()){
- highIntensityColor = Qt::white;
- }
- 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);
+ _waterfall3DDisplayPlot->SetIntensityColorMapType(newType,
lowIntensityColor, highIntensityColor);
}
- _waterfall3DDisplayPlot->SetIntensityColorMapType(newType,
lowIntensityColor, highIntensityColor);
}
Modified:
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.h
===================================================================
---
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.h
2009-03-11 20:52:08 UTC (rev 10582)
+++
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.h
2009-03-12 01:05:31 UTC (rev 10583)
@@ -23,13 +23,15 @@
SpectrumDisplayForm(QWidget* parent = 0);
~SpectrumDisplayForm();
- void setSystem( SpectrumGUIClass * newSystem, const uint64_t
numFFTDataPoints, const uint64_t numTimeDomainDataPoints );
+ void setSystem( SpectrumGUIClass * newSystem, const uint64_t
numFFTDataPoints,
+ const uint64_t numTimeDomainDataPoints );
int GetAverageCount();
void SetAverageCount( const int newCount );
void Reset();
void AverageDataReset();
- void ResizeBuffers( const uint64_t numFFTDataPoints, const uint64_t
numTimeDomainDataPoints );
+ void ResizeBuffers( const uint64_t numFFTDataPoints,
+ const uint64_t numTimeDomainDataPoints );
public slots:
void resizeEvent( QResizeEvent * e );
@@ -40,7 +42,9 @@
void MinHoldResetBtn_clicked();
void MaxHoldResetBtn_clicked();
void PowerLineEdit_textChanged( const QString& valueString );
- void SetFrequencyRange( const double newStartFrequency, const double
newStopFrequency, const double newCenterFrequency );
+ void SetFrequencyRange( const double newStartFrequency,
+ const double newStopFrequency,
+ const double newCenterFrequency );
void closeEvent( QCloseEvent * e );
void WindowTypeChanged( int newItem );
void UseRFFrequenciesCB( bool useRFFlag );
@@ -84,6 +88,13 @@
double _peakAmplitude;
static int _openGLWaterfall3DFlag;
double _stopFrequency;
+
+ // whether or not to use a particular display
+ bool d_plot_fft;
+ bool d_plot_waterfall;
+ bool d_plot_waterfall3d;
+ bool d_plot_time;
+ bool d_plot_constellation;
};
#endif /* SPECTRUM_DISPLAY_FORM_H */
Modified:
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.ui
===================================================================
---
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.ui
2009-03-11 20:52:08 UTC (rev 10582)
+++
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.ui
2009-03-12 01:05:31 UTC (rev 10583)
@@ -286,7 +286,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QFrame" name="Tab1PlotDisplayFrame" >
+ <widget class="QFrame" name="FrequencyPlotDisplayFrame" >
<property name="geometry" >
<rect>
<x>5</x>
@@ -402,7 +402,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QFrame" name="Tab2PlotDisplayFrame" >
+ <widget class="QFrame" name="WaterfallPlotDisplayFrame" >
<property name="geometry" >
<rect>
<x>5</x>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r10583 - gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib,
trondeau <=