commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 09/23: qtgui: minor mods, including putting


From: git
Subject: [Commit-gnuradio] [gnuradio] 09/23: qtgui: minor mods, including putting min/max lines in FFT sink behind all other lines.
Date: Thu, 26 Jun 2014 19:54:44 +0000 (UTC)

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

trondeau pushed a commit to branch master
in repository gnuradio.

commit 9bf029234101c53b3982a1322e142af2c1a45023
Author: Tom Rondeau <address@hidden>
Date:   Tue Jun 24 18:59:22 2014 -0400

    qtgui: minor mods, including putting min/max lines in FFT sink behind all 
other lines.
---
 gr-qtgui/include/gnuradio/qtgui/qtgui_types.h |  2 +-
 gr-qtgui/lib/FrequencyDisplayPlot.cc          | 32 +++++++++++++++------------
 2 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/gr-qtgui/include/gnuradio/qtgui/qtgui_types.h 
b/gr-qtgui/include/gnuradio/qtgui/qtgui_types.h
index 5640f68..e55746c 100644
--- a/gr-qtgui/include/gnuradio/qtgui/qtgui_types.h
+++ b/gr-qtgui/include/gnuradio/qtgui/qtgui_types.h
@@ -204,7 +204,7 @@ class ColorMap_Sunset: public QwtLinearColorMap
 public:
   ColorMap_Sunset():
     QwtLinearColorMap(QColor(0, 0, 0, 0),
-                      QColor(193, 255, 255, 255))
+                      QColor(255, 255, 193, 255))
   {
     addColorStop(0.167, QColor( 86,   0, 153,  45));
     addColorStop(0.333, QColor(147,  51, 119,  91));
diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.cc 
b/gr-qtgui/lib/FrequencyDisplayPlot.cc
index 60cfcd2..d1d2ef8 100644
--- a/gr-qtgui/lib/FrequencyDisplayPlot.cc
+++ b/gr-qtgui/lib/FrequencyDisplayPlot.cc
@@ -54,7 +54,7 @@ public:
   {
     setTrackerMode(QwtPicker::AlwaysOn);
   }
-  
+
   virtual void updateTrackerText()
   {
     updateDisplay();
@@ -110,6 +110,7 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(int nplots, 
QWidget* parent)
         << QColor(Qt::yellow) << QColor(Qt::gray) << QColor(Qt::darkRed)
         << QColor(Qt::darkGreen) << QColor(Qt::darkBlue) << 
QColor(Qt::darkGray);
 
+  // Create a curve for each input
   // Automatically deleted when parent is deleted
   for(int i = 0; i < d_nplots; i++) {
     d_ydata.push_back(new double[d_numPoints]);
@@ -130,7 +131,8 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(int nplots, 
QWidget* parent)
 #endif
     setLineColor(i, default_colors[i]);
   }
-  
+
+  // Create min/max plotter curves
   d_min_fft_plot_curve = new QwtPlotCurve("Minimum Power");
   d_min_fft_plot_curve->attach(this);
   const QColor default_min_fft_color = Qt::magenta;
@@ -141,7 +143,8 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(int nplots, 
QWidget* parent)
   d_min_fft_plot_curve->setRawSamples(d_xdata, d_min_fft_data, d_numPoints);
 #endif
   d_min_fft_plot_curve->setVisible(false);
-  
+  d_min_fft_plot_curve->setZ(0);
+
   d_max_fft_plot_curve = new QwtPlotCurve("Maximum Power");
   d_max_fft_plot_curve->attach(this);
   QColor default_max_fft_color = Qt::darkYellow;
@@ -152,13 +155,14 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(int nplots, 
QWidget* parent)
   d_max_fft_plot_curve->setRawSamples(d_xdata, d_max_fft_data, d_numPoints);
 #endif
   d_max_fft_plot_curve->setVisible(false);
-  
+  d_max_fft_plot_curve->setZ(0);
+
   d_lower_intensity_marker= new QwtPlotMarker();
   d_lower_intensity_marker->setLineStyle(QwtPlotMarker::HLine);
   QColor default_marker_lower_intensity_color = Qt::cyan;
   setMarkerLowerIntensityColor(default_marker_lower_intensity_color);
   d_lower_intensity_marker->attach(this);
-  
+
   d_upper_intensity_marker = new QwtPlotMarker();
   d_upper_intensity_marker->setLineStyle(QwtPlotMarker::HLine);
   QColor default_marker_upper_intensity_color = Qt::green;
@@ -341,11 +345,11 @@ FrequencyDisplayPlot::plotNewData(const 
std::vector<double*> dataPoints,
         d_xdata = new double[d_numPoints];
         d_min_fft_data = new double[d_numPoints];
         d_max_fft_data = new double[d_numPoints];
-        
+
         for(int i = 0; i < d_nplots; i++) {
           delete[] d_ydata[i];
           d_ydata[i] = new double[d_numPoints];
-          
+
 #if QWT_VERSION < 0x060000
           d_plot_curve[i]->setRawData(d_xdata, d_ydata[i], d_numPoints);
 #else
@@ -363,7 +367,7 @@ FrequencyDisplayPlot::plotNewData(const 
std::vector<double*> dataPoints,
         clearMaxData();
         clearMinData();
       }
-      
+
       double bottom=1e20, top=-1e20;
       for(int n = 0; n < d_nplots; n++) {
 
@@ -387,14 +391,14 @@ FrequencyDisplayPlot::plotNewData(const 
std::vector<double*> dataPoints,
          }
        }
       }
-      
+
       if(d_autoscale_state)
        _autoScale(bottom, top);
-      
+
       d_noise_floor_amplitude = noiseFloorAmplitude;
       d_peak_frequency = peakFrequency;
       d_peak_amplitude = peakAmplitude;
-      
+
       setUpperIntensityLevel(d_peak_amplitude);
 
       replot();
@@ -413,7 +417,7 @@ FrequencyDisplayPlot::plotNewData(const double* dataPoints,
   plotNewData(vecDataPoints, numDataPoints, noiseFloorAmplitude,
              peakFrequency, peakAmplitude, timeInterval);
 }
-   
+
 void
 FrequencyDisplayPlot::clearMaxData()
 {
@@ -548,7 +552,7 @@ void
 FrequencyDisplayPlot::setMinFFTColor (QColor c)
 {
   d_min_fft_color = c;
-  d_min_fft_plot_curve->setPen(QPen(c));  
+  d_min_fft_plot_curve->setPen(QPen(c));
 }
 const QColor
 FrequencyDisplayPlot::getMinFFTColor() const
@@ -560,7 +564,7 @@ void
 FrequencyDisplayPlot::setMaxFFTColor (QColor c)
 {
   d_max_fft_color = c;
-  d_max_fft_plot_curve->setPen(QPen(c));  
+  d_max_fft_plot_curve->setPen(QPen(c));
 }
 
 const QColor



reply via email to

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