commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10805 - gnuradio/branches/developers/trondeau/qtdevel


From: trondeau
Subject: [Commit-gnuradio] r10805 - gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib
Date: Sat, 11 Apr 2009 19:11:58 -0600 (MDT)

Author: trondeau
Date: 2009-04-11 19:11:57 -0600 (Sat, 11 Apr 2009)
New Revision: 10805

Modified:
   
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/SpectrumGUIClass.cc
   
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.cc
Log:
Cleaning up code for more standard format

Modified: 
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/SpectrumGUIClass.cc
===================================================================
--- 
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/SpectrumGUIClass.cc
 2009-04-12 01:06:11 UTC (rev 10804)
+++ 
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/SpectrumGUIClass.cc
 2009-04-12 01:11:57 UTC (rev 10805)
@@ -213,7 +213,7 @@
   }
   int64_t timeDomainBufferSize = 0;
 
-  if( updateDisplayFlag){
+  if(updateDisplayFlag){
     if((fftBuffer != NULL) && (bufferSize > 0)){
       memcpy(_fftPoints, fftBuffer, bufferSize * sizeof(std::complex<float>));
     }

Modified: 
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.cc
===================================================================
--- 
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.cc
      2009-04-12 01:06:11 UTC (rev 10804)
+++ 
gnuradio/branches/developers/trondeau/qtdevel2/gr-qtgui/src/lib/spectrumdisplayform.cc
      2009-04-12 01:11:57 UTC (rev 10805)
@@ -61,7 +61,8 @@
   Reset();
 }
 
-SpectrumDisplayForm::~SpectrumDisplayForm(){
+SpectrumDisplayForm::~SpectrumDisplayForm()
+{
   // Qt deletes children when parent is deleted
 
   // Don't worry about deleting Display Plots - they are deleted when parents 
are deleted
@@ -77,9 +78,10 @@
   delete _historyVector;
 }
 
-void SpectrumDisplayForm::setSystem( SpectrumGUIClass * newSystem, 
-                                    const uint64_t numFFTDataPoints, 
-                                    const uint64_t numTimeDomainDataPoints )
+void
+SpectrumDisplayForm::setSystem( SpectrumGUIClass * newSystem, 
+                               const uint64_t numFFTDataPoints, 
+                               const uint64_t numTimeDomainDataPoints )
 {
   ResizeBuffers(numFFTDataPoints, numTimeDomainDataPoints);
   
@@ -92,7 +94,8 @@
   }
 }
 
-void SpectrumDisplayForm::newFrequencyData( const SpectrumUpdateEvent* 
spectrumUpdateEvent)
+void
+SpectrumDisplayForm::newFrequencyData( const SpectrumUpdateEvent* 
spectrumUpdateEvent)
 {
   const std::complex<float>* complexDataPoints = 
spectrumUpdateEvent->getFFTPoints();
   const uint64_t numFFTDataPoints = spectrumUpdateEvent->getNumFFTDataPoints();
@@ -208,7 +211,8 @@
   }
 }
 
-void SpectrumDisplayForm::resizeEvent( QResizeEvent *e )
+void
+SpectrumDisplayForm::resizeEvent( QResizeEvent *e )
 {
   // Let the actual window resize its width, but not its height
   QSize newSize(e->size().width(), e->oldSize().height());
@@ -315,7 +319,8 @@
 }
 
 
-void SpectrumDisplayForm::customEvent( QEvent * e)
+void
+SpectrumDisplayForm::customEvent( QEvent * e)
 {
   if(e->type() == QEvent::User+3){
     if(_systemSpecifiedFlag){
@@ -354,8 +359,6 @@
 
     // Clear any previous display
     Reset();
-
-    show();
   }
   else if(e->type() == 10005){
     SpectrumUpdateEvent* spectrumUpdateEvent = (SpectrumUpdateEvent*)e;
@@ -379,7 +382,8 @@
   }
 }
 
-void SpectrumDisplayForm::AvgLineEdit_textChanged( const QString &valueString )
+void
+SpectrumDisplayForm::AvgLineEdit_textChanged( const QString &valueString )
 {
   if(!valueString.isEmpty()){
     int value = valueString.toInt();
@@ -392,7 +396,8 @@
 }
 
 
-void SpectrumDisplayForm::MaxHoldCheckBox_toggled( bool newState )
+void
+SpectrumDisplayForm::MaxHoldCheckBox_toggled( bool newState )
 {
   MaxHoldResetBtn->setEnabled(newState);
   _frequencyDisplayPlot->SetMaxFFTVisible(newState);
@@ -400,7 +405,8 @@
 }
 
 
-void SpectrumDisplayForm::MinHoldCheckBox_toggled( bool newState )
+void
+SpectrumDisplayForm::MinHoldCheckBox_toggled( bool newState )
 {
   MinHoldResetBtn->setEnabled(newState);
   _frequencyDisplayPlot->SetMinFFTVisible(newState);
@@ -408,21 +414,24 @@
 }
 
 
-void SpectrumDisplayForm::MinHoldResetBtn_clicked()
+void
+SpectrumDisplayForm::MinHoldResetBtn_clicked()
 {
   _frequencyDisplayPlot->ClearMinData();
   _frequencyDisplayPlot->replot();
 }
 
 
-void SpectrumDisplayForm::MaxHoldResetBtn_clicked()
+void
+SpectrumDisplayForm::MaxHoldResetBtn_clicked()
 {
   _frequencyDisplayPlot->ClearMaxData();
   _frequencyDisplayPlot->replot();
 }
 
 
-void SpectrumDisplayForm::PowerLineEdit_textChanged( const QString 
&valueString )
+void
+SpectrumDisplayForm::PowerLineEdit_textChanged( const QString &valueString )
 {
   if(_systemSpecifiedFlag){
     if(!valueString.isEmpty()){
@@ -445,13 +454,22 @@
   }
 }
 
-void SpectrumDisplayForm::SetFrequencyRange(const double newStartFrequency, 
const double newStopFrequency,
-                                           const double newCenterFrequency){
-  _frequencyDisplayPlot->SetFrequencyRange(newStartFrequency, 
newStopFrequency, newCenterFrequency,
+void
+SpectrumDisplayForm::SetFrequencyRange(const double newStartFrequency, 
+                                      const double newStopFrequency,
+                                      const double newCenterFrequency)
+{
+  _frequencyDisplayPlot->SetFrequencyRange(newStartFrequency,
+                                          newStopFrequency,
+                                          newCenterFrequency,
                                           
UseRFFrequenciesCheckBox->isChecked());
-  _waterfallDisplayPlot->SetFrequencyRange(newStartFrequency, 
newStopFrequency, newCenterFrequency,
+  _waterfallDisplayPlot->SetFrequencyRange(newStartFrequency,
+                                          newStopFrequency,
+                                          newCenterFrequency,
                                           
UseRFFrequenciesCheckBox->isChecked());
-  _waterfall3DDisplayPlot->SetFrequencyRange(newStartFrequency, 
newStopFrequency, newCenterFrequency,
+  _waterfall3DDisplayPlot->SetFrequencyRange(newStartFrequency,
+                                            newStopFrequency,
+                                            newCenterFrequency,
                                             
UseRFFrequenciesCheckBox->isChecked());
 }
 
@@ -459,7 +477,8 @@
   return _historyVector->size();
 }
 
-void SpectrumDisplayForm::SetAverageCount(const int newCount){
+void SpectrumDisplayForm::SetAverageCount(const int newCount)
+{
   if(newCount > -1){
     if(newCount != static_cast<int>(_historyVector->size())){
       std::vector<double*>::iterator pos;
@@ -477,10 +496,13 @@
   }
 }
 
-void SpectrumDisplayForm::_AverageHistory(const double* newBuffer){
+void
+SpectrumDisplayForm::_AverageHistory(const double* newBuffer)
+{
   if(_numRealDataPoints > 0){
     if(_historyVector->size() > 0){
-      memcpy(_historyVector->operator[](_historyEntry), newBuffer, 
_numRealDataPoints*sizeof(double));
+      memcpy(_historyVector->operator[](_historyEntry), newBuffer,
+            _numRealDataPoints*sizeof(double));
 
       // Increment the next location to store data
       _historyEntryCount++;
@@ -505,7 +527,10 @@
   }
 }
 
-void SpectrumDisplayForm::ResizeBuffers( const uint64_t numFFTDataPoints, 
const uint64_t /*numTimeDomainDataPoints*/ ){
+void
+SpectrumDisplayForm::ResizeBuffers( const uint64_t numFFTDataPoints,
+                                   const uint64_t /*numTimeDomainDataPoints*/ )
+{
   // Convert from Complex to Real for certain Displays
   if(_numRealDataPoints != numFFTDataPoints){
     _numRealDataPoints = numFFTDataPoints;
@@ -524,7 +549,9 @@
   }
 }
 
-void SpectrumDisplayForm::Reset(){
+void
+SpectrumDisplayForm::Reset()
+{
   AverageDataReset();
 
   _waterfallDisplayPlot->Reset();
@@ -532,7 +559,9 @@
 }
 
 
-void SpectrumDisplayForm::AverageDataReset(){
+void
+SpectrumDisplayForm::AverageDataReset()
+{
   _historyEntry = 0;
   _historyEntryCount = 0;
 
@@ -543,7 +572,8 @@
 }
 
 
-void SpectrumDisplayForm::closeEvent( QCloseEvent *e )
+void
+SpectrumDisplayForm::closeEvent( QCloseEvent *e )
 {
   if(_systemSpecifiedFlag){
     _system->SetWindowOpenFlag(false);
@@ -555,7 +585,8 @@
 }
 
 
-void SpectrumDisplayForm::WindowTypeChanged( int newItem )
+void
+SpectrumDisplayForm::WindowTypeChanged( int newItem )
 {
   if(_systemSpecifiedFlag){
    _system->SetWindowType(newItem);
@@ -563,7 +594,8 @@
 }
 
 
-void SpectrumDisplayForm::UseRFFrequenciesCB( bool useRFFlag )
+void
+SpectrumDisplayForm::UseRFFrequenciesCB( bool useRFFlag )
 {
   if(useRFFlag){
     SetFrequencyRange(_startFrequency, _stopFrequency, _centerFrequency);
@@ -574,7 +606,8 @@
 }
 
 
-void SpectrumDisplayForm::waterfallMaximumIntensityChangedCB( double newValue )
+void
+SpectrumDisplayForm::waterfallMaximumIntensityChangedCB( double newValue )
 {
   if(newValue > WaterfallMinimumIntensityWheel->value()){
     WaterfallMaximumIntensityLabel->setText(QString("%1 dB").arg(newValue, 0, 
'f', 0));
@@ -588,7 +621,8 @@
 }
 
 
-void SpectrumDisplayForm::waterfallMinimumIntensityChangedCB( double newValue )
+void
+SpectrumDisplayForm::waterfallMinimumIntensityChangedCB( double newValue )
 {
   if(newValue < WaterfallMaximumIntensityWheel->value()){
     WaterfallMinimumIntensityLabel->setText(QString("%1 dB").arg(newValue, 0, 
'f', 0));
@@ -601,7 +635,8 @@
                                           
WaterfallMaximumIntensityWheel->value());
 }
 
-void SpectrumDisplayForm::waterfall3DMaximumIntensityChangedCB( double 
newValue )
+void
+SpectrumDisplayForm::waterfall3DMaximumIntensityChangedCB( double newValue )
 {
   if(newValue > Waterfall3DMinimumIntensityWheel->value()){
     Waterfall3DMaximumIntensityLabel->setText(QString("%1 dB").arg(newValue, 
0, 'f', 0));
@@ -615,7 +650,8 @@
 }
 
 
-void SpectrumDisplayForm::waterfall3DMinimumIntensityChangedCB( double 
newValue )
+void
+SpectrumDisplayForm::waterfall3DMinimumIntensityChangedCB( double newValue )
 {
   if(newValue < Waterfall3DMaximumIntensityWheel->value()){
     Waterfall3DMinimumIntensityLabel->setText(QString("%1 dB").arg(newValue, 
0, 'f', 0));
@@ -629,7 +665,8 @@
 }
 
 
-void SpectrumDisplayForm::FFTComboBoxSelectedCB( const QString &fftSizeString )
+void
+SpectrumDisplayForm::FFTComboBoxSelectedCB( const QString &fftSizeString )
 {
   if(_systemSpecifiedFlag){
     _system->SetFFTSize(fftSizeString.toLong());
@@ -637,7 +674,8 @@
 }
 
 
-void SpectrumDisplayForm::WaterfallAutoScaleBtnCB()
+void
+SpectrumDisplayForm::WaterfallAutoScaleBtnCB()
 {
   double minimumIntensity = _noiseFloorAmplitude - 5;
   if(minimumIntensity < WaterfallMinimumIntensityWheel->minValue()){
@@ -652,7 +690,8 @@
   waterfallMaximumIntensityChangedCB(maximumIntensity);
 }
 
-void SpectrumDisplayForm::Waterfall3DAutoScaleBtnCB()
+void
+SpectrumDisplayForm::Waterfall3DAutoScaleBtnCB()
 {
   double minimumIntensity = _noiseFloorAmplitude - 5;
   if(minimumIntensity < Waterfall3DMinimumIntensityWheel->minValue()){
@@ -667,7 +706,8 @@
   waterfallMaximumIntensityChangedCB(maximumIntensity);
 }
 
-void SpectrumDisplayForm::WaterfallIntensityColorTypeChanged( int newType )
+void
+SpectrumDisplayForm::WaterfallIntensityColorTypeChanged( int newType )
 {
   QColor lowIntensityColor;
   QColor highIntensityColor;
@@ -692,7 +732,8 @@
   _waterfallDisplayPlot->SetIntensityColorMapType(newType, lowIntensityColor, 
highIntensityColor);
 }
 
-void SpectrumDisplayForm::Waterfall3DIntensityColorTypeChanged( int newType )
+void
+SpectrumDisplayForm::Waterfall3DIntensityColorTypeChanged( int newType )
 {
   QColor lowIntensityColor;
   QColor highIntensityColor;
@@ -713,5 +754,6 @@
     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);
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]