diff options
author | trondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5> | 2009-08-11 22:11:33 +0000 |
---|---|---|
committer | trondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5> | 2009-08-11 22:11:33 +0000 |
commit | 420f1274bfd7cb40cd6d7851f6541f80ac6616be (patch) | |
tree | 63b99e37b32ea053425ecb74e02cfa75252baa34 /gr-qtgui/src/lib/ConstellationDisplayPlot.cc | |
parent | f123fd990783b7e6ed24a12763cb2a766860d133 (diff) |
Adding function to be able to set the size of the points in the constellation plot.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11573 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-qtgui/src/lib/ConstellationDisplayPlot.cc')
-rw-r--r-- | gr-qtgui/src/lib/ConstellationDisplayPlot.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gr-qtgui/src/lib/ConstellationDisplayPlot.cc b/gr-qtgui/src/lib/ConstellationDisplayPlot.cc index 792096dedc..80bf4503f5 100644 --- a/gr-qtgui/src/lib/ConstellationDisplayPlot.cc +++ b/gr-qtgui/src/lib/ConstellationDisplayPlot.cc @@ -42,6 +42,7 @@ ConstellationDisplayPlot::ConstellationDisplayPlot(QWidget* parent) _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 @@ ConstellationDisplayPlot::ConstellationDisplayPlot(QWidget* parent) // 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 @@ ConstellationDisplayPlot::~ConstellationDisplayPlot() // _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) { |