[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r11573 - gnuradio/trunk/gr-qtgui/src/lib
From: |
trondeau |
Subject: |
[Commit-gnuradio] r11573 - gnuradio/trunk/gr-qtgui/src/lib |
Date: |
Tue, 11 Aug 2009 16:11:34 -0600 (MDT) |
Author: trondeau
Date: 2009-08-11 16:11:33 -0600 (Tue, 11 Aug 2009)
New Revision: 11573
Modified:
gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.cc
gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.h
gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc
gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.h
gnuradio/trunk/gr-qtgui/src/lib/qtgui.i
gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc
gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h
gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.cc
gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.h
gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc
gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.h
Log:
Adding function to be able to set the size of the points in the constellation
plot.
Modified: gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.cc 2009-08-11
22:02:56 UTC (rev 11572)
+++ gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.cc 2009-08-11
22:11:33 UTC (rev 11573)
@@ -42,6 +42,7 @@
_displayIntervalTime = (1.0/10.0); // 1/10 of a second between updates
_numPoints = 1024;
+ _penSize = 5;
_realDataPoints = new double[_numPoints];
_imagDataPoints = new double[_numPoints];
@@ -69,7 +70,7 @@
// Automatically deleted when parent is deleted
_plot_curve = new QwtPlotCurve("Constellation Points");
_plot_curve->attach(this);
- _plot_curve->setPen(QPen(Qt::blue, 5, Qt::SolidLine, Qt::RoundCap,
Qt::RoundJoin));
+ _plot_curve->setPen(QPen(Qt::blue, _penSize, Qt::SolidLine, Qt::RoundCap,
Qt::RoundJoin));
_plot_curve->setStyle(QwtPlotCurve::Dots);
_plot_curve->setRawData(_realDataPoints, _imagDataPoints, _numPoints);
@@ -117,6 +118,16 @@
// _zoomer and _panner deleted when parent deleted
}
+void
+ConstellationDisplayPlot::set_pen_size(int size)
+{
+ if(size > 0 && size < 30){
+ _penSize = size;
+ _plot_curve->setPen(QPen(Qt::blue, _penSize, Qt::SolidLine, Qt::RoundCap,
Qt::RoundJoin));
+ }
+}
+
+
void
ConstellationDisplayPlot::set_xaxis(double min, double max)
{
Modified: gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.h 2009-08-11
22:02:56 UTC (rev 11572)
+++ gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.h 2009-08-11
22:11:33 UTC (rev 11573)
@@ -32,6 +32,7 @@
void set_yaxis(double min, double max);
void set_axis(double xmin, double xmax,
double ymin, double ymax);
+ void set_pen_size(int size);
public slots:
void resizeSlot( QSize *s );
@@ -53,6 +54,7 @@
timespec _lastReplot;
int64_t _numPoints;
+ int64_t _penSize;
double _displayIntervalTime;
};
Modified: gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc 2009-08-11 22:02:56 UTC
(rev 11572)
+++ gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc 2009-08-11 22:11:33 UTC
(rev 11573)
@@ -449,6 +449,12 @@
}
void
+SpectrumGUIClass::SetConstellationPenSize(int size){
+ _spectrumDisplayForm->SetConstellationPenSize(size);
+}
+
+
+void
SpectrumGUIClass::SetFrequencyAxis(double min, double max)
{
_spectrumDisplayForm->SetFrequencyAxis(min, max);
Modified: gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.h 2009-08-11 22:02:56 UTC
(rev 11572)
+++ gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.h 2009-08-11 22:11:33 UTC
(rev 11573)
@@ -76,6 +76,7 @@
void SetTimeDomainAxis(double min, double max);
void SetConstellationAxis(double xmin, double xmax,
double ymin, double ymax);
+ void SetConstellationPenSize(int size);
void SetFrequencyAxis(double min, double max);
protected:
Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui.i
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui.i 2009-08-11 22:02:56 UTC (rev
11572)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui.i 2009-08-11 22:11:33 UTC (rev
11573)
@@ -68,6 +68,7 @@
void set_constellation_axis(double xmin, double xmax,
double ymin, double ymax);
void set_frequency_axis(double min, double max);
+ void set_constellation_pen_size(int size);
};
@@ -116,5 +117,6 @@
void set_constellation_axis(double xmin, double xmax,
double ymin, double ymax);
void set_frequency_axis(double min, double max);
+ void set_constellation_pen_size(int size);
};
Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc 2009-08-11 22:02:56 UTC
(rev 11572)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc 2009-08-11 22:11:33 UTC
(rev 11573)
@@ -194,6 +194,13 @@
d_main_gui->SetConstellationAxis(xmin, xmax, ymin, ymax);
}
+void
+qtgui_sink_c::set_constellation_pen_size(int size)
+{
+ d_main_gui->SetConstellationPenSize(size);
+}
+
+
void
qtgui_sink_c::set_frequency_axis(double min, double max)
{
Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h 2009-08-11 22:02:56 UTC
(rev 11572)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h 2009-08-11 22:11:33 UTC
(rev 11573)
@@ -108,6 +108,7 @@
void set_time_domain_axis(double min, double max);
void set_constellation_axis(double xmin, double xmax,
double ymin, double ymax);
+ void set_constellation_pen_size(int size);
void set_frequency_axis(double min, double max);
QApplication *d_qApplication;
Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.cc 2009-08-11 22:02:56 UTC
(rev 11572)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.cc 2009-08-11 22:11:33 UTC
(rev 11573)
@@ -188,6 +188,13 @@
d_main_gui->SetConstellationAxis(xmin, xmax, ymin, ymax);
}
+void
+qtgui_sink_f::set_constellation_pen_size(int size)
+{
+ d_main_gui->SetConstellationPenSize(size);
+}
+
+
void
qtgui_sink_f::set_frequency_axis(double min, double max)
{
Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.h 2009-08-11 22:02:56 UTC
(rev 11572)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.h 2009-08-11 22:11:33 UTC
(rev 11573)
@@ -106,6 +106,7 @@
void set_time_domain_axis(double min, double max);
void set_constellation_axis(double xmin, double xmax,
double ymin, double ymax);
+ void set_constellation_pen_size(int size);
void set_frequency_axis(double min, double max);
QApplication *d_qApplication;
Modified: gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc 2009-08-11
22:02:56 UTC (rev 11572)
+++ gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc 2009-08-11
22:11:33 UTC (rev 11573)
@@ -839,6 +839,12 @@
}
void
+SpectrumDisplayForm::SetConstellationPenSize(int size)
+{
+ _constellationDisplayPlot->set_pen_size( size );
+}
+
+void
SpectrumDisplayForm::SetFrequencyAxis(double min, double max)
{
_frequencyDisplayPlot->set_yaxis(min, max);
Modified: gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.h 2009-08-11
22:02:56 UTC (rev 11572)
+++ gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.h 2009-08-11
22:11:33 UTC (rev 11573)
@@ -69,6 +69,7 @@
void SetTimeDomainAxis(double min, double max);
void SetConstellationAxis(double xmin, double xmax,
double ymin, double ymax);
+ void SetConstellationPenSize(int size);
void SetFrequencyAxis(double min, double max);
private slots:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r11573 - gnuradio/trunk/gr-qtgui/src/lib,
trondeau <=