[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
- [Commit-gnuradio] [gnuradio] branch master updated (ad9b547 -> 71a57cc), git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 07/23: qtgui: Mostly adds sunset and cool color schemes for waterfall/raster plots., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 10/23: qtgui: allows toggling rf frequencies on/off in GRC options box., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 12/23: qtgui: freq, waterfall, and sink blocks produce a frequency message when double-clicked. Also can take in a frequency message to adjust the x-axis., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 05/23: digital: adding a rotate_phase message for the constellation_receiver to adjust the phase of the constellation., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 01/23: volk: cmake: Rename GrBoost to VolkBoost to differentiate it from GR's GrBoost. Although they set the same BOOST variables internally, this change make it clear which cmake file to include., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 09/23: qtgui: minor mods, including putting min/max lines in FFT sink behind all other lines.,
git <=
- [Commit-gnuradio] [gnuradio] 04/23: blocks: adding a message port to the copy block to enable/disable copy., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 13/23: filter: adds a message input port to frequency xlating FIR filter to update the frequency., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 03/23: digital: expose set_constellation message port in GRC for constellation_receiver., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 08/23: qtgui: adds an alternative qss file., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 14/23: docs: adding docs for blocks::copy and digital::constellation_receiver to describe their message ports., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 15/23: qtgui: dynamically adjust min/max amplitude for qtgui freq and waterfall plots., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 16/23: Merge branch 'maint', git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 11/23: qtgui: for sink_x, waterfall_sink_x, and freq_sink_x, when the display is double-clicked, the center frequency is adjusted to the clicked frequency and a message is posted containing the new center frequency., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 17/23: replaced dynamic_ by static_cast; typechecking done before, git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 02/23: cmake: Include GrBoost at the top level such that the correct default BOOST variables are set throughout the build. Because of the way CMake handles non-cached variables, each GR component (e.g., Volk) can change the BOOST variables for its particular needs without overriding these default values for other components., git, 2014/06/26