commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 06/21: qtgui: whitespace and line formattin


From: git
Subject: [Commit-gnuradio] [gnuradio] 06/21: qtgui: whitespace and line formatting
Date: Fri, 30 Oct 2015 21:11:26 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 416eea170f6549ffa85d9159200cb167ad483aef
Author: Tom Rondeau <address@hidden>
Date:   Wed Oct 21 15:52:36 2015 -0400

    qtgui: whitespace and line formatting
---
 gr-qtgui/lib/WaterfallDisplayPlot.cc  | 100 +++++++++++++++++-----------------
 gr-qtgui/lib/freqdisplayform.cc       |  12 ++--
 gr-qtgui/lib/waterfall_sink_c_impl.cc |   3 +-
 3 files changed, 57 insertions(+), 58 deletions(-)

diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.cc 
b/gr-qtgui/lib/WaterfallDisplayPlot.cc
index e1da844..19da4d1 100644
--- a/gr-qtgui/lib/WaterfallDisplayPlot.cc
+++ b/gr-qtgui/lib/WaterfallDisplayPlot.cc
@@ -283,67 +283,65 @@ WaterfallDisplayPlot::plotNewData(const 
std::vector<double*> dataPoints,
                                   const gr::high_res_timer_type timestamp,
                                   const int droppedFrames)
 {
-    int64_t _npoints_in = d_half_freq ? numDataPoints/2 : numDataPoints;
-    int64_t _in_index = d_half_freq ? _npoints_in : 0;
-
-    if(!d_stop) {
-        if(numDataPoints > 0 && timestamp == 0){
-            d_numPoints = numDataPoints/d_nrows;
-            resetAxis();
-
-            //you got an entire waterfall plot, just plot it
-            for(int i = 0; i < d_nplots; i++) {
-                d_data[i]->setSpectrumDataBuffer(dataPoints[i]);
-                d_data[i]->setNumLinesToUpdate(0);
-                d_spectrogram[i]->invalidateCache();
-                d_spectrogram[i]->itemChanged();
-            }
-
-            QwtTimeScaleDraw* timeScale = 
(QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
-            timeScale->setSecondsPerLine(timePerFFT);
-            timeScale->setZeroTime(timestamp);
-            timeScale->initiateUpdate();
-
-            ((WaterfallZoomer*)d_zoomer)->setSecondsPerLine(timePerFFT);
-            ((WaterfallZoomer*)d_zoomer)->setZeroTime(timestamp);
-            replot();
-        }
+  int64_t _npoints_in = d_half_freq ? numDataPoints/2 : numDataPoints;
+  int64_t _in_index = d_half_freq ? _npoints_in : 0;
+
+  if(!d_stop) {
+    if(numDataPoints > 0 && timestamp == 0){
+      d_numPoints = numDataPoints/d_nrows;
+      resetAxis();
+
+      //you got an entire waterfall plot, just plot it
+      for(int i = 0; i < d_nplots; i++) {
+        d_data[i]->setSpectrumDataBuffer(dataPoints[i]);
+        d_data[i]->setNumLinesToUpdate(0);
+        d_spectrogram[i]->invalidateCache();
+        d_spectrogram[i]->itemChanged();
+      }
 
+      QwtTimeScaleDraw* timeScale = 
(QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
+      timeScale->setSecondsPerLine(timePerFFT);
+      timeScale->setZeroTime(timestamp);
+      timeScale->initiateUpdate();
 
+      ((WaterfallZoomer*)d_zoomer)->setSecondsPerLine(timePerFFT);
+      ((WaterfallZoomer*)d_zoomer)->setZeroTime(timestamp);
+      replot();
+    }
 
-        else if(numDataPoints > 0) {
-            if(_npoints_in != d_numPoints) {
-                d_numPoints = _npoints_in;
-                resetAxis();
+    else if(numDataPoints > 0) {
+      if(_npoints_in != d_numPoints) {
+        d_numPoints = _npoints_in;
+        resetAxis();
 
-                for(int i = 0; i < d_nplots; i++) {
-                    d_spectrogram[i]->invalidateCache();
-                    d_spectrogram[i]->itemChanged();
-                }
+        for(int i = 0; i < d_nplots; i++) {
+          d_spectrogram[i]->invalidateCache();
+          d_spectrogram[i]->itemChanged();
+        }
 
-                if(isVisible()) {
-                    replot();
-                }
-            }
+        if(isVisible()) {
+          replot();
+        }
+      }
 
-            QwtTimeScaleDraw* timeScale = 
(QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
-            timeScale->setSecondsPerLine(timePerFFT);
-            timeScale->setZeroTime(timestamp);
+      QwtTimeScaleDraw* timeScale = 
(QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
+      timeScale->setSecondsPerLine(timePerFFT);
+      timeScale->setZeroTime(timestamp);
 
-            ((WaterfallZoomer*)d_zoomer)->setSecondsPerLine(timePerFFT);
-            ((WaterfallZoomer*)d_zoomer)->setZeroTime(timestamp);
+      ((WaterfallZoomer*)d_zoomer)->setSecondsPerLine(timePerFFT);
+      ((WaterfallZoomer*)d_zoomer)->setZeroTime(timestamp);
 
-            for(int i = 0; i < d_nplots; i++) {
-                d_data[i]->addFFTData(&(dataPoints[i][_in_index]),
-                                      _npoints_in, droppedFrames);
-                d_data[i]->incrementNumLinesToUpdate();
-                d_spectrogram[i]->invalidateCache();
-                d_spectrogram[i]->itemChanged();
-            }
+      for(int i = 0; i < d_nplots; i++) {
+        d_data[i]->addFFTData(&(dataPoints[i][_in_index]),
+                              _npoints_in, droppedFrames);
+        d_data[i]->incrementNumLinesToUpdate();
+        d_spectrogram[i]->invalidateCache();
+        d_spectrogram[i]->itemChanged();
+      }
 
-            replot();
-        }
+      replot();
     }
+  }
 }
 
 void
diff --git a/gr-qtgui/lib/freqdisplayform.cc b/gr-qtgui/lib/freqdisplayform.cc
index 301d5a6..a51da3f 100644
--- a/gr-qtgui/lib/freqdisplayform.cc
+++ b/gr-qtgui/lib/freqdisplayform.cc
@@ -107,24 +107,24 @@ FreqDisplayForm::FreqDisplayForm(int nplots, QWidget* 
parent)
 
   setTriggerMode(gr::qtgui::TRIG_MODE_FREE);
   connect(d_tr_mode_menu, SIGNAL(whichTrigger(gr::qtgui::trigger_mode)),
-         this, SLOT(setTriggerMode(gr::qtgui::trigger_mode)));
+          this, SLOT(setTriggerMode(gr::qtgui::trigger_mode)));
   // updates trigger state by calling set level or set tag key.
   connect(d_tr_mode_menu, SIGNAL(whichTrigger(gr::qtgui::trigger_mode)),
-         this, SLOT(updateTrigger(gr::qtgui::trigger_mode)));
+          this, SLOT(updateTrigger(gr::qtgui::trigger_mode)));
 
   setTriggerLevel(0);
   connect(d_tr_level_act, SIGNAL(whichTrigger(QString)),
-         this, SLOT(setTriggerLevel(QString)));
+          this, SLOT(setTriggerLevel(QString)));
   connect(this, SIGNAL(signalTriggerLevel(float)),
-         this, SLOT(setTriggerLevel(float)));
+          this, SLOT(setTriggerLevel(float)));
 
   setTriggerChannel(0);
   connect(d_tr_channel_menu, SIGNAL(whichTrigger(int)),
-         this, SLOT(setTriggerChannel(int)));
+          this, SLOT(setTriggerChannel(int)));
 
   setTriggerTagKey(std::string(""));
   connect(d_tr_tag_key_act, SIGNAL(whichTrigger(QString)),
-         this, SLOT(setTriggerTagKey(QString)));
+          this, SLOT(setTriggerTagKey(QString)));
 
   connect(this, SIGNAL(signalClearMaxData()),
           getPlot(), SLOT(clearMaxData()));
diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.cc 
b/gr-qtgui/lib/waterfall_sink_c_impl.cc
index da732c2..f5c6d34 100644
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
@@ -585,7 +585,8 @@ namespace gr {
           in = (const gr_complex*)pmt::c32vector_elements(samples, len);
         }
         else {
-          throw std::runtime_error("waterfall sink: unknown data type of 
samples; must be complex.");
+          throw std::runtime_error("waterfall_sink_c: unknown data type "
+                                   "of samples; must be complex.");
         }
 
         int stride = (len - d_fftsize)/d_nrows;



reply via email to

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