diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-11-12 21:55:23 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-11-12 21:55:23 -0500 |
commit | bbbbf8b042c3443415ae766bf7b6a26134c0119d (patch) | |
tree | a604bad094914ec9cb6d76ce189986befa5e6547 /gr-qtgui/lib | |
parent | ea539a77938c81bb046a6d83f3cf3f40eaa33c49 (diff) | |
parent | 8740eb0d9460060ae97f9d252cae81cdcf0e20e5 (diff) |
Merge branch 'qtgui_stylesheets' into next
Conflicts:
gr-qtgui/lib/DisplayPlot.cc
gr-qtgui/lib/DisplayPlot.h
gr-qtgui/lib/displayform.cc
Fixed some function name issues and updated qtgui examples.
Diffstat (limited to 'gr-qtgui/lib')
-rw-r--r-- | gr-qtgui/lib/DisplayPlot.cc | 291 | ||||
-rw-r--r-- | gr-qtgui/lib/DisplayPlot.h | 185 | ||||
-rw-r--r-- | gr-qtgui/lib/FrequencyDisplayPlot.cc | 255 | ||||
-rw-r--r-- | gr-qtgui/lib/FrequencyDisplayPlot.h | 54 | ||||
-rw-r--r-- | gr-qtgui/lib/WaterfallDisplayPlot.cc | 24 | ||||
-rw-r--r-- | gr-qtgui/lib/WaterfallDisplayPlot.h | 13 | ||||
-rw-r--r-- | gr-qtgui/lib/displayform.cc | 3 |
7 files changed, 680 insertions, 145 deletions
diff --git a/gr-qtgui/lib/DisplayPlot.cc b/gr-qtgui/lib/DisplayPlot.cc index f5c384d43f..0b422ee1ca 100644 --- a/gr-qtgui/lib/DisplayPlot.cc +++ b/gr-qtgui/lib/DisplayPlot.cc @@ -27,10 +27,12 @@ #include <QColor> #include <cmath> #include <iostream> +#include <QDebug> DisplayPlot::DisplayPlot(int nplots, QWidget* parent) : QwtPlot(parent), _nplots(nplots), _stop(false) { + qRegisterMetaType<QColorList>("QColorList"); resize(parent->width(), parent->height()); // Disable polygon clipping @@ -46,9 +48,8 @@ DisplayPlot::DisplayPlot(int nplots, QWidget* parent) canvas()->setPaintAttribute(QwtPlotCanvas::PaintPacked, false); #endif - QPalette palette; - palette.setColor(canvas()->backgroundRole(), QColor("white")); - canvas()->setPalette(palette); + QColor default_palette_color = QColor("white"); + setPaletteColor(default_palette_color); _panner = new QwtPlotPanner(canvas()); _panner->setAxisEnabled(QwtPlot::yRight, false); @@ -59,7 +60,7 @@ DisplayPlot::DisplayPlot(int nplots, QWidget* parent) #if QWT_VERSION < 0x060000 connect(_picker, SIGNAL(selected(const QwtDoublePoint &)), - this, SLOT(OnPickerPointSelected(const QwtDoublePoint &))); + this, SLOT(OnPickerPointSelected(const QwtDoublePoint &))); #else _picker->setStateMachine(new QwtPickerDblClickPointMachine()); connect(_picker, SIGNAL(selected(const QPointF &)), @@ -90,6 +91,7 @@ DisplayPlot::~DisplayPlot() // _zoomer and _panner deleted when parent deleted } + void DisplayPlot::setYaxis(double min, double max) { @@ -119,97 +121,260 @@ DisplayPlot::lineLabel(int which) void DisplayPlot::setLineColor(int which, QString color) { - // Set the color of the pen - QPen pen(_plot_curve[which]->pen()); - pen.setColor(color); - _plot_curve[which]->setPen(pen); - - // And set the color of the markers + if (which < _nplots) { + // Set the color of the pen + QPen pen(_plot_curve[which]->pen()); + pen.setColor(color); + _plot_curve[which]->setPen(pen); + // And set the color of the markers #if QWT_VERSION < 0x060000 - //_plot_curve[which]->setBrush(QBrush(QColor(color))); - _plot_curve[which]->setPen(pen); - - QwtSymbol sym = (QwtSymbol)_plot_curve[which]->symbol(); - setLineMarker(which, sym.style()); + //_plot_curve[which]->setBrush(QBrush(QColor(color))); + _plot_curve[which]->setPen(pen); + QwtSymbol sym = (QwtSymbol)_plot_curve[which]->symbol(); + setLineMarker(which, sym.style()); #else - QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); - sym->setColor(color); - sym->setPen(pen); - _plot_curve[which]->setSymbol(sym); + QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); + if(sym) { + sym->setColor(color); + sym->setPen(pen); + _plot_curve[which]->setSymbol(sym); + } #endif + } +} + +QColor +DisplayPlot::getLineColor(int which) const { + // If that plot doesn't exist then return black. + if (which < _nplots) + return _plot_curve[which]->pen().color(); + return QColor("black"); +} + +// Use a preprocessor macro to create a bunch of hooks for Q_PROPERTY and hence the stylesheet. +#define SETUPLINE(i, im1) \ + void DisplayPlot::setLineColor ## i (QColor c) {setColor(im1, c);} \ + const QColor DisplayPlot::getLineColor ## i () const {return getLineColor(im1);} \ + void DisplayPlot::setLineWidth ## i (int width) {setLineWidth(im1, width);} \ + int DisplayPlot::getLineWidth ## i () const {return getLineWidth(im1);} \ + void DisplayPlot::setLineStyle ## i (Qt::PenStyle ps) {setLineStyle(im1, ps);} \ + const Qt::PenStyle DisplayPlot::getLineStyle ## i () const {return getLineStyle(im1);} \ + void DisplayPlot::setLineMarker ## i (QwtSymbol::Style ms) {setLineMarker(im1, ms);} \ + const QwtSymbol::Style DisplayPlot::getLineMarker ## i () const {return getLineMarker(im1);} \ + void DisplayPlot::setMarkerAlpha ## i (int alpha) {setMarkerAlpha(im1, alpha);} \ + int DisplayPlot::getMarkerAlpha ## i () const {return getMarkerAlpha(im1);} +SETUPLINE(1, 0) +SETUPLINE(2, 1) +SETUPLINE(3, 2) +SETUPLINE(4, 3) +SETUPLINE(5, 4) +SETUPLINE(6, 5) +SETUPLINE(7, 6) +SETUPLINE(8, 7) +SETUPLINE(9, 8) + +void +DisplayPlot::setZoomerColor(QColor c) { + _zoomer->setRubberBandPen(c); + _zoomer->setTrackerPen(c); +} + +QColor +DisplayPlot::getZoomerColor() const { + return _zoomer->rubberBandPen().color(); +} + +void +DisplayPlot::setPaletteColor(QColor c) { + QPalette palette; + palette.setColor(canvas()->backgroundRole(), c); + canvas()->setPalette(palette); +} + +QColor +DisplayPlot::getPaletteColor() const { + return canvas()->palette().color(canvas()->backgroundRole()); +} + +void +DisplayPlot::setAxisLabelFontSize(int axisId, int fs) { + QwtText axis_title = QwtText(axisWidget(axisId)->title()); + QFont font = QFont(axis_title.font()); + font.setPointSize(fs); + axis_title.setFont(font); + axisWidget(axisId)->setTitle(axis_title); +} + +int +DisplayPlot::getAxisLabelFontSize(int axisId) const { + return axisWidget(axisId)->title().font().pointSize(); +} + +void +DisplayPlot::setYaxisLabelFontSize(int fs) { + setAxisLabelFontSize(QwtPlot::yLeft, fs); +} + +int +DisplayPlot::getYaxisLabelFontSize() const { + int fs = getAxisLabelFontSize(QwtPlot::yLeft); + return fs; +} + +void +DisplayPlot::setXaxisLabelFontSize(int fs) { + setAxisLabelFontSize(QwtPlot::xBottom, fs); +} + +int +DisplayPlot::getXaxisLabelFontSize() const { + int fs = getAxisLabelFontSize(QwtPlot::xBottom); + return fs; +} + +void +DisplayPlot::setAxesLabelFontSize(int fs) { + setAxisLabelFontSize(QwtPlot::yLeft, fs); + setAxisLabelFontSize(QwtPlot::xBottom, fs); +} + +int +DisplayPlot::getAxesLabelFontSize() const { + // Returns 0 if all axes do not have the same font size. + int fs = getAxisLabelFontSize(QwtPlot::yLeft); + if (getAxisLabelFontSize(QwtPlot::xBottom) != fs) + return 0; + return fs; } void DisplayPlot::setLineWidth(int which, int width) { - // Set the new line width - QPen pen(_plot_curve[which]->pen()); - pen.setWidth(width); - _plot_curve[which]->setPen(pen); - - // Scale the marker size proportionally + if (which < _nplots) { + // Set the new line width + QPen pen(_plot_curve[which]->pen()); + pen.setWidth(width); + _plot_curve[which]->setPen(pen); + + // Scale the marker size proportionally #if QWT_VERSION < 0x060000 - QwtSymbol sym = (QwtSymbol)_plot_curve[which]->symbol(); - sym.setSize(7+10*log10(1.0*width), 7+10*log10(1.0*width)); - _plot_curve[which]->setSymbol(sym); + QwtSymbol sym = (QwtSymbol)_plot_curve[which]->symbol(); + sym.setSize(7+10*log10(1.0*width), 7+10*log10(1.0*width)); + _plot_curve[which]->setSymbol(sym); #else - QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); - sym->setSize(7+10*log10(1.0*width), 7+10*log10(1.0*width)); - _plot_curve[which]->setSymbol(sym); + QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); + if(sym) { + sym->setSize(7+10*log10(1.0*width), 7+10*log10(1.0*width)); + _plot_curve[which]->setSymbol(sym); + } #endif + } +} + +int +DisplayPlot::getLineWidth(int which) const { + if (which < _nplots) { + return _plot_curve[which]->pen().width(); + } else { + return 0; + } } void DisplayPlot::setLineStyle(int which, Qt::PenStyle style) { - QPen pen(_plot_curve[which]->pen()); - pen.setStyle(style); - _plot_curve[which]->setPen(pen); + if (which < _nplots) { + QPen pen(_plot_curve[which]->pen()); + pen.setStyle(style); + _plot_curve[which]->setPen(pen); + } +} + +const Qt::PenStyle +DisplayPlot::getLineStyle(int which) const +{ + if (which < _nplots) { + return _plot_curve[which]->pen().style(); + } else { + return Qt::SolidLine; + } } void DisplayPlot::setLineMarker(int which, QwtSymbol::Style marker) { + if (which < _nplots) { +#if QWT_VERSION < 0x060000 + QwtSymbol sym = (QwtSymbol)_plot_curve[which]->symbol(); + QPen pen(_plot_curve[which]->pen()); + QBrush brush(pen.color()); + sym.setStyle(marker); + sym.setPen(pen); + sym.setBrush(brush); + _plot_curve[which]->setSymbol(sym); +#else + QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); + if(sym) { + sym->setStyle(marker); + _plot_curve[which]->setSymbol(sym); + } +#endif + } +} + +const QwtSymbol::Style +DisplayPlot::getLineMarker(int which) const +{ + if(which < _nplots) { #if QWT_VERSION < 0x060000 - QwtSymbol sym = (QwtSymbol)_plot_curve[which]->symbol(); - QPen pen(_plot_curve[which]->pen()); - QBrush brush(pen.color()); - sym.setStyle(marker); - sym.setPen(pen); - sym.setBrush(brush); - _plot_curve[which]->setSymbol(sym); + QwtSymbol sym = (QwtSymbol)_plot_curve[which]->symbol(); + return sym.style(); #else - QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); - sym->setStyle(marker); - _plot_curve[which]->setSymbol(sym); + QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); + return sym->style(); #endif + } + else { + return QwtSymbol::NoSymbol; + } } void DisplayPlot::setMarkerAlpha(int which, int alpha) { - // Get the pen color - QPen pen(_plot_curve[which]->pen()); - QColor color = pen.color(); - - // Set new alpha and update pen - color.setAlpha(alpha); - pen.setColor(color); - _plot_curve[which]->setPen(pen); - - // And set the new color for the markers + if (which < _nplots) { + // Get the pen color + QPen pen(_plot_curve[which]->pen()); + QColor color = pen.color(); + + // Set new alpha and update pen + color.setAlpha(alpha); + pen.setColor(color); + _plot_curve[which]->setPen(pen); + + // And set the new color for the markers #if QWT_VERSION < 0x060000 - //_plot_curve[which]->setBrush(QBrush(QColor(color))); - _plot_curve[which]->setPen(pen); - - QwtSymbol sym = (QwtSymbol)_plot_curve[which]->symbol(); - setLineMarker(which, sym.style()); + QwtSymbol sym = (QwtSymbol)_plot_curve[which]->symbol(); + setLineMarker(which, sym.style()); #else - QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); - sym->setColor(color); - sym->setPen(pen); - _plot_curve[which]->setSymbol(sym); + QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); + if(sym) { + sym->setColor(color); + sym->setPen(pen); + _plot_curve[which]->setSymbol(sym); + } #endif + } +} + +int +DisplayPlot::getMarkerAlpha(int which) const +{ + if (which < _nplots) { + return _plot_curve[which]->pen().color().alpha(); + } else { + return 0; + } } void diff --git a/gr-qtgui/lib/DisplayPlot.h b/gr-qtgui/lib/DisplayPlot.h index 2d98c536c8..934794680d 100644 --- a/gr-qtgui/lib/DisplayPlot.h +++ b/gr-qtgui/lib/DisplayPlot.h @@ -43,15 +43,134 @@ #include <qwt_compat.h> #endif +typedef QList<QColor> QColorList; +Q_DECLARE_METATYPE ( QColorList ) + class DisplayPlot:public QwtPlot{ Q_OBJECT + Q_PROPERTY ( QColor line_color1 READ getLineColor1 WRITE setLineColor1 ) + Q_PROPERTY ( QColor line_color2 READ getLineColor2 WRITE setLineColor2 ) + Q_PROPERTY ( QColor line_color3 READ getLineColor3 WRITE setLineColor3 ) + Q_PROPERTY ( QColor line_color4 READ getLineColor4 WRITE setLineColor4 ) + Q_PROPERTY ( QColor line_color5 READ getLineColor5 WRITE setLineColor5 ) + Q_PROPERTY ( QColor line_color6 READ getLineColor6 WRITE setLineColor6 ) + Q_PROPERTY ( QColor line_color7 READ getLineColor7 WRITE setLineColor7 ) + Q_PROPERTY ( QColor line_color8 READ getLineColor8 WRITE setLineColor8 ) + Q_PROPERTY ( QColor line_color9 READ getLineColor9 WRITE setLineColor9 ) + + Q_PROPERTY ( int line_width1 READ getLineWidth1 WRITE setLineWidth1 ) + Q_PROPERTY ( int line_width2 READ getLineWidth2 WRITE setLineWidth2 ) + Q_PROPERTY ( int line_width3 READ getLineWidth3 WRITE setLineWidth3 ) + Q_PROPERTY ( int line_width4 READ getLineWidth4 WRITE setLineWidth4 ) + Q_PROPERTY ( int line_width5 READ getLineWidth5 WRITE setLineWidth5 ) + Q_PROPERTY ( int line_width6 READ getLineWidth6 WRITE setLineWidth6 ) + Q_PROPERTY ( int line_width7 READ getLineWidth7 WRITE setLineWidth7 ) + Q_PROPERTY ( int line_width8 READ getLineWidth8 WRITE setLineWidth8 ) + Q_PROPERTY ( int line_width9 READ getLineWidth9 WRITE setLineWidth9 ) + + Q_PROPERTY ( Qt::PenStyle line_style1 READ getLineStyle1 WRITE setLineStyle1 ) + Q_PROPERTY ( Qt::PenStyle line_style2 READ getLineStyle2 WRITE setLineStyle2 ) + Q_PROPERTY ( Qt::PenStyle line_style3 READ getLineStyle3 WRITE setLineStyle3 ) + Q_PROPERTY ( Qt::PenStyle line_style4 READ getLineStyle4 WRITE setLineStyle4 ) + Q_PROPERTY ( Qt::PenStyle line_style5 READ getLineStyle5 WRITE setLineStyle5 ) + Q_PROPERTY ( Qt::PenStyle line_style6 READ getLineStyle6 WRITE setLineStyle6 ) + Q_PROPERTY ( Qt::PenStyle line_style7 READ getLineStyle7 WRITE setLineStyle7 ) + Q_PROPERTY ( Qt::PenStyle line_style8 READ getLineStyle8 WRITE setLineStyle8 ) + Q_PROPERTY ( Qt::PenStyle line_style9 READ getLineStyle9 WRITE setLineStyle9 ) + + typedef QwtSymbol::Style QwtSymbolStyle; + + Q_ENUMS ( QwtSymbolStyle ) + Q_PROPERTY ( QwtSymbolStyle line_marker1 READ getLineMarker1 WRITE setLineMarker1 ) + Q_PROPERTY ( QwtSymbolStyle line_marker2 READ getLineMarker2 WRITE setLineMarker2 ) + Q_PROPERTY ( QwtSymbolStyle line_marker3 READ getLineMarker3 WRITE setLineMarker3 ) + Q_PROPERTY ( QwtSymbolStyle line_marker4 READ getLineMarker4 WRITE setLineMarker4 ) + Q_PROPERTY ( QwtSymbolStyle line_marker5 READ getLineMarker5 WRITE setLineMarker5 ) + Q_PROPERTY ( QwtSymbolStyle line_marker6 READ getLineMarker6 WRITE setLineMarker6 ) + Q_PROPERTY ( QwtSymbolStyle line_marker7 READ getLineMarker7 WRITE setLineMarker7 ) + Q_PROPERTY ( QwtSymbolStyle line_marker8 READ getLineMarker8 WRITE setLineMarker8 ) + Q_PROPERTY ( QwtSymbolStyle line_marker9 READ getLineMarker9 WRITE setLineMarker9 ) + + Q_PROPERTY ( int marker_alpha1 READ getMarkerAlpha1 WRITE setMarkerAlpha1 ) + Q_PROPERTY ( int marker_alpha2 READ getMarkerAlpha2 WRITE setMarkerAlpha2 ) + Q_PROPERTY ( int marker_alpha3 READ getMarkerAlpha3 WRITE setMarkerAlpha3 ) + Q_PROPERTY ( int marker_alpha4 READ getMarkerAlpha4 WRITE setMarkerAlpha4 ) + Q_PROPERTY ( int marker_alpha5 READ getMarkerAlpha5 WRITE setMarkerAlpha5 ) + Q_PROPERTY ( int marker_alpha6 READ getMarkerAlpha6 WRITE setMarkerAlpha6 ) + Q_PROPERTY ( int marker_alpha7 READ getMarkerAlpha7 WRITE setMarkerAlpha7 ) + Q_PROPERTY ( int marker_alpha8 READ getMarkerAlpha8 WRITE setMarkerAlpha8 ) + Q_PROPERTY ( int marker_alpha9 READ getMarkerAlpha9 WRITE setMarkerAlpha9 ) + + Q_PROPERTY ( QColor zoomer_color READ getZoomerColor WRITE setZoomerColor ) + Q_PROPERTY ( QColor palette_color READ getPaletteColor WRITE setPaletteColor ) + Q_PROPERTY ( int yaxis_label_font_size READ getYaxisLabelFontSize WRITE setYaxisLabelFontSize ) + Q_PROPERTY ( int xaxis_label_font_size READ getXaxisLabelFontSize WRITE setXaxisLabelFontSize ) + Q_PROPERTY ( int axes_label_font_size READ getAxesLabelFontSize WRITE setAxesLabelFontSize ) + public: DisplayPlot(int nplots, QWidget*); virtual ~DisplayPlot(); virtual void replot() = 0; + const QColor getLineColor1 () const; + const QColor getLineColor2 () const; + const QColor getLineColor3 () const; + const QColor getLineColor4 () const; + const QColor getLineColor5 () const; + const QColor getLineColor6 () const; + const QColor getLineColor7 () const; + const QColor getLineColor8 () const; + const QColor getLineColor9 () const; + + int getLineWidth1 () const; + int getLineWidth2 () const; + int getLineWidth3 () const; + int getLineWidth4 () const; + int getLineWidth5 () const; + int getLineWidth6 () const; + int getLineWidth7 () const; + int getLineWidth8 () const; + int getLineWidth9 () const; + + const Qt::PenStyle getLineStyle1 () const; + const Qt::PenStyle getLineStyle2 () const; + const Qt::PenStyle getLineStyle3 () const; + const Qt::PenStyle getLineStyle4 () const; + const Qt::PenStyle getLineStyle5 () const; + const Qt::PenStyle getLineStyle6 () const; + const Qt::PenStyle getLineStyle7 () const; + const Qt::PenStyle getLineStyle8 () const; + const Qt::PenStyle getLineStyle9 () const; + + const QwtSymbol::Style getLineMarker1 () const; + const QwtSymbol::Style getLineMarker2 () const; + const QwtSymbol::Style getLineMarker3 () const; + const QwtSymbol::Style getLineMarker4 () const; + const QwtSymbol::Style getLineMarker5 () const; + const QwtSymbol::Style getLineMarker6 () const; + const QwtSymbol::Style getLineMarker7 () const; + const QwtSymbol::Style getLineMarker8 () const; + const QwtSymbol::Style getLineMarker9 () const; + + int getMarkerAlpha1 () const; + int getMarkerAlpha2 () const; + int getMarkerAlpha3 () const; + int getMarkerAlpha4 () const; + int getMarkerAlpha5 () const; + int getMarkerAlpha6 () const; + int getMarkerAlpha7 () const; + int getMarkerAlpha8 () const; + int getMarkerAlpha9 () const; + + QColor getZoomerColor() const; + QColor getPaletteColor() const; + int getAxisLabelFontSize(int axisId) const; + int getYaxisLabelFontSize() const; + int getXaxisLabelFontSize() const; + int getAxesLabelFontSize() const; + // Make sure to create your won PlotNewData method in the derived // class: // void PlotNewData(...); @@ -61,10 +180,74 @@ public slots: void setXaxis(double min, double max); void setLineLabel(int which, QString label); void setLineColor(int which, QString color); + + QColor getLineColor(int which) const; void setLineWidth(int which, int width); + int getLineWidth(int which) const; void setLineStyle(int which, Qt::PenStyle style); + const Qt::PenStyle getLineStyle(int which) const; void setLineMarker(int which, QwtSymbol::Style marker); + const QwtSymbol::Style getLineMarker(int which) const; void setMarkerAlpha(int which, int alpha); + int getMarkerAlpha(int which) const; + // Need a function for each curve for setting via stylesheet. + // Can't use preprocessor directives because we're inside a Q_OBJECT. + void setLineColor1 (QColor); + void setLineColor2 (QColor); + void setLineColor3 (QColor); + void setLineColor4 (QColor); + void setLineColor5 (QColor); + void setLineColor6 (QColor); + void setLineColor7 (QColor); + void setLineColor8 (QColor); + void setLineColor9 (QColor); + + void setLineWidth1 (int); + void setLineWidth2 (int); + void setLineWidth3 (int); + void setLineWidth4 (int); + void setLineWidth5 (int); + void setLineWidth6 (int); + void setLineWidth7 (int); + void setLineWidth8 (int); + void setLineWidth9 (int); + + void setLineStyle1 (Qt::PenStyle); + void setLineStyle2 (Qt::PenStyle); + void setLineStyle3 (Qt::PenStyle); + void setLineStyle4 (Qt::PenStyle); + void setLineStyle5 (Qt::PenStyle); + void setLineStyle6 (Qt::PenStyle); + void setLineStyle7 (Qt::PenStyle); + void setLineStyle8 (Qt::PenStyle); + void setLineStyle9 (Qt::PenStyle); + + void setLineMarker1 (QwtSymbol::Style); + void setLineMarker2 (QwtSymbol::Style); + void setLineMarker3 (QwtSymbol::Style); + void setLineMarker4 (QwtSymbol::Style); + void setLineMarker5 (QwtSymbol::Style); + void setLineMarker6 (QwtSymbol::Style); + void setLineMarker7 (QwtSymbol::Style); + void setLineMarker8 (QwtSymbol::Style); + void setLineMarker9 (QwtSymbol::Style); + + void setMarkerAlpha1 (int); + void setMarkerAlpha2 (int); + void setMarkerAlpha3 (int); + void setMarkerAlpha4 (int); + void setMarkerAlpha5 (int); + void setMarkerAlpha6 (int); + void setMarkerAlpha7 (int); + void setMarkerAlpha8 (int); + void setMarkerAlpha9 (int); + + void setZoomerColor(QColor c); + void setPaletteColor(QColor c); + void setAxisLabelFontSize(int axisId, int fs); + void setYaxisLabelFontSize(int fs); + void setXaxisLabelFontSize(int fs); + void setAxesLabelFontSize(int fs); void setStop(bool on); @@ -97,6 +280,8 @@ protected: int64_t _numPoints; bool _stop; + + QList<QColor> _trace_colors; }; #endif /* DOMAIN_DISPLAY_PLOT_H */ diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.cc b/gr-qtgui/lib/FrequencyDisplayPlot.cc index f090039f96..0fdba579c8 100644 --- a/gr-qtgui/lib/FrequencyDisplayPlot.cc +++ b/gr-qtgui/lib/FrequencyDisplayPlot.cc @@ -96,8 +96,8 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(int nplots, QWidget* parent) setAxisScale(QwtPlot::yLeft, _minYAxis, _maxYAxis); setAxisTitle(QwtPlot::yLeft, "Power (dB)"); - QList<QColor> colors; - colors << QColor(Qt::blue) << QColor(Qt::red) << QColor(Qt::green) + QList<QColor> default_colors; + default_colors << QColor(Qt::blue) << QColor(Qt::red) << QColor(Qt::green) << QColor(Qt::black) << QColor(Qt::cyan) << QColor(Qt::magenta) << QColor(Qt::yellow) << QColor(Qt::gray) << QColor(Qt::darkRed) << QColor(Qt::darkGreen) << QColor(Qt::darkBlue) << QColor(Qt::darkGray); @@ -109,51 +109,46 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(int nplots, QWidget* parent) _plot_curve.push_back(new QwtPlotCurve(QString("Data %1").arg(i))); _plot_curve[i]->attach(this); - _plot_curve[i]->setPen(QPen(colors[i])); - - const QwtSymbol *symbol = new QwtSymbol(QwtSymbol::NoSymbol, QBrush(colors[i]), QPen(colors[i]), QSize(7,7)); - #if QWT_VERSION < 0x060000 _plot_curve[i]->setRawData(_xAxisPoints, _dataPoints[i], _numPoints); - _plot_curve[i]->setSymbol(*symbol); #else _plot_curve[i]->setRawSamples(_xAxisPoints, _dataPoints[i], _numPoints); - _plot_curve[i]->setSymbol(symbol); #endif + setColor(i, default_colors[i]); } - + _min_fft_plot_curve = new QwtPlotCurve("Minimum Power"); _min_fft_plot_curve->attach(this); - _min_fft_plot_curve->setPen(QPen(Qt::magenta)); - + const QColor _default_min_fft_color = Qt::magenta; + SetMinFFTColor(_default_min_fft_color); #if QWT_VERSION < 0x060000 _min_fft_plot_curve->setRawData(_xAxisPoints, _minFFTPoints, _numPoints); #else _min_fft_plot_curve->setRawSamples(_xAxisPoints, _minFFTPoints, _numPoints); #endif - _min_fft_plot_curve->setVisible(false); - + _max_fft_plot_curve = new QwtPlotCurve("Maximum Power"); _max_fft_plot_curve->attach(this); - _max_fft_plot_curve->setPen(QPen(Qt::darkYellow)); - + QColor _default_max_fft_color = Qt::darkYellow; + SetMaxFFTColor(_default_max_fft_color); #if QWT_VERSION < 0x060000 _max_fft_plot_curve->setRawData(_xAxisPoints, _maxFFTPoints, _numPoints); #else _max_fft_plot_curve->setRawSamples(_xAxisPoints, _maxFFTPoints, _numPoints); #endif - _max_fft_plot_curve->setVisible(false); - + _lower_intensity_marker= new QwtPlotMarker(); _lower_intensity_marker->setLineStyle(QwtPlotMarker::HLine); - _lower_intensity_marker->setLinePen(QPen(Qt::cyan)); + QColor _default_marker_lower_intensity_color = Qt::cyan; + SetMarkerLowerIntensityColor(_default_marker_lower_intensity_color); _lower_intensity_marker->attach(this); - + _upper_intensity_marker = new QwtPlotMarker(); _upper_intensity_marker->setLineStyle(QwtPlotMarker::HLine); - _upper_intensity_marker->setLinePen(QPen(Qt::green, 0, Qt::DotLine)); + QColor _default_marker_upper_intensity_color = Qt::green; + SetMarkerUpperIntensityColor(_default_marker_upper_intensity_color); _upper_intensity_marker->attach(this); memset(_xAxisPoints, 0x0, _numPoints*sizeof(double)); @@ -163,33 +158,22 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(int nplots, QWidget* parent) _maxFFTPoints[number] = -280.0; } - // set up peak marker - QwtSymbol symbol; - _markerPeakAmplitude = new QwtPlotMarker(); - _markerPeakAmplitude->setLinePen(QPen(Qt::yellow)); - symbol.setStyle(QwtSymbol::Diamond); - symbol.setSize(8); - symbol.setPen(QPen(Qt::yellow)); - symbol.setBrush(QBrush(Qt::yellow)); - -#if QWT_VERSION < 0x060000 - _markerPeakAmplitude->setSymbol(symbol); -#else - _markerPeakAmplitude->setSymbol(&symbol); -#endif - + QColor _default_marker_peak_amplitude_color = Qt::yellow; + SetMarkerPeakAmplitudeColor(_default_marker_peak_amplitude_color); /// THIS CAUSES A PROBLEM! //_markerPeakAmplitude->attach(this); _markerNoiseFloorAmplitude = new QwtPlotMarker(); _markerNoiseFloorAmplitude->setLineStyle(QwtPlotMarker::HLine); - _markerNoiseFloorAmplitude->setLinePen(QPen(Qt::darkRed, 0, Qt::DotLine)); + QColor _default_marker_noise_floor_amplitude_color = Qt::darkRed; + SetMarkerNoiseFloorAmplitudeColor(_default_marker_noise_floor_amplitude_color); _markerNoiseFloorAmplitude->attach(this); _markerCF= new QwtPlotMarker(); _markerCF->setLineStyle(QwtPlotMarker::VLine); - _markerCF->setLinePen(QPen(Qt::lightGray, 0, Qt::DotLine)); + QColor _default_marker_CF_color = Qt::lightGray; + SetMarkerCFColor(_default_marker_CF_color); _markerCF->attach(this); _markerCF->hide(); @@ -212,9 +196,8 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(int nplots, QWidget* parent) Qt::RightButton); - const QColor c(Qt::darkRed); - _zoomer->setRubberBandPen(c); - _zoomer->setTrackerPen(c); + const QColor default_zoomer_color(Qt::darkRed); + setZoomerColor(default_zoomer_color); // Do this after the zoomer has been built _resetXAxisPoints(); @@ -232,7 +215,6 @@ FrequencyDisplayPlot::~FrequencyDisplayPlot() { for(int i = 0; i < _nplots; i++) delete [] _dataPoints[i]; - delete[] _maxFFTPoints; delete[] _minFFTPoints; delete[] _xAxisPoints; @@ -332,54 +314,56 @@ FrequencyDisplayPlot::PlotNewData(const std::vector<double*> dataPoints, if(!_stop) { if(numDataPoints > 0) { if(numDataPoints != _numPoints) { - _numPoints = numDataPoints; - - delete[] _minFFTPoints; - delete[] _maxFFTPoints; - delete[] _xAxisPoints; - _xAxisPoints = new double[_numPoints]; - _minFFTPoints = new double[_numPoints]; - _maxFFTPoints = new double[_numPoints]; - - for(int i = 0; i < _nplots; i++) { - delete[] _dataPoints[i]; - _dataPoints[i] = new double[_numPoints]; - + _numPoints = numDataPoints; + + delete[] _minFFTPoints; + delete[] _maxFFTPoints; + delete[] _xAxisPoints; + _xAxisPoints = new double[_numPoints]; + _minFFTPoints = new double[_numPoints]; + _maxFFTPoints = new double[_numPoints]; + + for(int i = 0; i < _nplots; i++) { + delete[] _dataPoints[i]; + _dataPoints[i] = new double[_numPoints]; + #if QWT_VERSION < 0x060000 - _plot_curve[i]->setRawData(_xAxisPoints, _dataPoints[i], _numPoints); - _min_fft_plot_curve->setRawData(_xAxisPoints, _minFFTPoints, _numPoints); - _max_fft_plot_curve->setRawData(_xAxisPoints, _maxFFTPoints, _numPoints); + _plot_curve[i]->setRawData(_xAxisPoints, _dataPoints[i], _numPoints); #else - _plot_curve[i]->setRawSamples(_xAxisPoints, _dataPoints[i], _numPoints); - _min_fft_plot_curve->setRawSamples(_xAxisPoints, _minFFTPoints, _numPoints); - _max_fft_plot_curve->setRawSamples(_xAxisPoints, _maxFFTPoints, _numPoints); + _plot_curve[i]->setRawSamples(_xAxisPoints, _dataPoints[i], _numPoints); #endif - } - - _resetXAxisPoints(); - ClearMaxData(); - ClearMinData(); + } +#if QWT_VERSION < 0x060000 + _min_fft_plot_curve->setRawData(_xAxisPoints, _minFFTPoints, _numPoints); + _max_fft_plot_curve->setRawData(_xAxisPoints, _maxFFTPoints, _numPoints); +#else + _min_fft_plot_curve->setRawSamples(_xAxisPoints, _minFFTPoints, _numPoints); + _max_fft_plot_curve->setRawSamples(_xAxisPoints, _maxFFTPoints, _numPoints); +#endif + _resetXAxisPoints(); + ClearMaxData(); + ClearMinData(); } - + for(int i = 0; i < _nplots; i++) { - memcpy(_dataPoints[i], dataPoints[i], numDataPoints*sizeof(double)); + memcpy(_dataPoints[i], dataPoints[i], numDataPoints*sizeof(double)); } - + for(int64_t point = 0; point < numDataPoints; point++){ - if(dataPoints[0][point] < _minFFTPoints[point]) { - _minFFTPoints[point] = dataPoints[0][point]; - } - if(dataPoints[0][point] > _maxFFTPoints[point]) { - _maxFFTPoints[point] = dataPoints[0][point]; - } + if(dataPoints[0][point] < _minFFTPoints[point]) { + _minFFTPoints[point] = dataPoints[0][point]; + } + if(dataPoints[0][point] > _maxFFTPoints[point]) { + _maxFFTPoints[point] = dataPoints[0][point]; + } } - + _noiseFloorAmplitude = noiseFloorAmplitude; _peakFrequency = peakFrequency; _peakAmplitude = peakAmplitude; - + SetUpperIntensityLevel(_peakAmplitude); - + replot(); } } @@ -416,14 +400,24 @@ FrequencyDisplayPlot::ClearMinData() void FrequencyDisplayPlot::SetMaxFFTVisible(const bool visibleFlag) { + _max_fft_visible = visibleFlag; _max_fft_plot_curve->setVisible(visibleFlag); } +const bool FrequencyDisplayPlot::GetMaxFFTVisible() const +{ + return _max_fft_visible; +} void FrequencyDisplayPlot::SetMinFFTVisible(const bool visibleFlag) { + _min_fft_visible = visibleFlag; _min_fft_plot_curve->setVisible(visibleFlag); } +const bool FrequencyDisplayPlot::GetMinFFTVisible() const +{ + return _min_fft_visible; +} void FrequencyDisplayPlot::_resetXAxisPoints() @@ -502,4 +496,111 @@ FrequencyDisplayPlot::OnPickerPointSelected6(const QPointF & p) emit plotPointSelected(point); } +void +FrequencyDisplayPlot::SetMinFFTColor (QColor c) +{ + _min_fft_color = c; + _min_fft_plot_curve->setPen(QPen(c)); +} +const QColor +FrequencyDisplayPlot::GetMinFFTColor() const {return _min_fft_color;} + +void +FrequencyDisplayPlot::SetMaxFFTColor (QColor c) +{ + _max_fft_color = c; + _max_fft_plot_curve->setPen(QPen(c)); +} +const QColor +FrequencyDisplayPlot::GetMaxFFTColor() const {return _max_fft_color;} + +void +FrequencyDisplayPlot::SetMarkerLowerIntensityColor (QColor c) +{ + _marker_lower_intensity_color = c; + _lower_intensity_marker->setLinePen(QPen(c)); +} +const QColor +FrequencyDisplayPlot::GetMarkerLowerIntensityColor () const {return _marker_lower_intensity_color;} +void +FrequencyDisplayPlot::SetMarkerLowerIntensityVisible (bool visible) +{ + _marker_lower_intensity_visible = visible; + if (visible) + _lower_intensity_marker->setLineStyle(QwtPlotMarker::HLine); + else + _lower_intensity_marker->setLineStyle(QwtPlotMarker::NoLine); +} +const bool +FrequencyDisplayPlot::GetMarkerLowerIntensityVisible () const {return _marker_lower_intensity_visible;} + +void +FrequencyDisplayPlot::SetMarkerUpperIntensityColor (QColor c) +{ + _marker_upper_intensity_color = c; + _upper_intensity_marker->setLinePen(QPen(c, 0, Qt::DotLine)); +} +const QColor +FrequencyDisplayPlot::GetMarkerUpperIntensityColor () const {return _marker_upper_intensity_color;} +void +FrequencyDisplayPlot::SetMarkerUpperIntensityVisible (bool visible) +{ + _marker_upper_intensity_visible = visible; + if (visible) + _upper_intensity_marker->setLineStyle(QwtPlotMarker::HLine); + else + _upper_intensity_marker->setLineStyle(QwtPlotMarker::NoLine); +} +const bool +FrequencyDisplayPlot::GetMarkerUpperIntensityVisible () const {return _marker_upper_intensity_visible;} + +void +FrequencyDisplayPlot::SetMarkerPeakAmplitudeColor (QColor c) +{ + _marker_peak_amplitude_color = c; + _markerPeakAmplitude->setLinePen(QPen(c)); + QwtSymbol symbol; + symbol.setStyle(QwtSymbol::Diamond); + symbol.setSize(8); + symbol.setPen(QPen(c)); + symbol.setBrush(QBrush(c)); +#if QWT_VERSION < 0x060000 + _markerPeakAmplitude->setSymbol(symbol); +#else + _markerPeakAmplitude->setSymbol(&symbol); +#endif +} +const QColor +FrequencyDisplayPlot::GetMarkerPeakAmplitudeColor () const {return _marker_peak_amplitude_color;} + +void +FrequencyDisplayPlot::SetMarkerNoiseFloorAmplitudeColor (QColor c) +{ + _marker_noise_floor_amplitude_color = c; + _markerNoiseFloorAmplitude->setLinePen(QPen(c, 0, Qt::DotLine)); +} +const QColor +FrequencyDisplayPlot::GetMarkerNoiseFloorAmplitudeColor () const {return _marker_noise_floor_amplitude_color;} + +void +FrequencyDisplayPlot::SetMarkerNoiseFloorAmplitudeVisible (bool visible) +{ + _marker_noise_floor_amplitude_visible = visible; + if (visible) + _markerNoiseFloorAmplitude->setLineStyle(QwtPlotMarker::HLine); + else + _markerNoiseFloorAmplitude->setLineStyle(QwtPlotMarker::NoLine); +} +const bool +FrequencyDisplayPlot::GetMarkerNoiseFloorAmplitudeVisible () const {return _marker_noise_floor_amplitude_visible;} + +void +FrequencyDisplayPlot::SetMarkerCFColor (QColor c) +{ + _marker_CF_color = c; + _markerCF->setLinePen(QPen(c, 0, Qt::DotLine)); +} +const QColor +FrequencyDisplayPlot::GetMarkerCFColor () const {return _marker_CF_color;} + #endif /* FREQUENCY_DISPLAY_PLOT_C */ diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.h b/gr-qtgui/lib/FrequencyDisplayPlot.h index 54a10f5d81..679ebf1cc4 100644 --- a/gr-qtgui/lib/FrequencyDisplayPlot.h +++ b/gr-qtgui/lib/FrequencyDisplayPlot.h @@ -32,6 +32,19 @@ class FrequencyDisplayPlot: public DisplayPlot { Q_OBJECT + Q_PROPERTY ( QColor min_fft_color READ GetMinFFTColor WRITE SetMinFFTColor ) + Q_PROPERTY ( QColor max_fft_color READ GetMaxFFTColor WRITE SetMaxFFTColor ) + Q_PROPERTY ( bool min_fft_visible READ GetMinFFTVisible WRITE SetMinFFTVisible ) + Q_PROPERTY ( bool max_fft_visible READ GetMaxFFTVisible WRITE SetMaxFFTVisible ) + Q_PROPERTY ( QColor marker_lower_intensity_color READ GetMarkerLowerIntensityColor WRITE SetMarkerLowerIntensityColor ) + Q_PROPERTY ( bool marker_lower_intensity_visible READ GetMarkerLowerIntensityVisible WRITE SetMarkerLowerIntensityVisible ) + Q_PROPERTY ( QColor marker_upper_intensity_color READ GetMarkerUpperIntensityColor WRITE SetMarkerUpperIntensityColor ) + Q_PROPERTY ( bool marker_upper_intensity_visible READ GetMarkerUpperIntensityVisible WRITE SetMarkerUpperIntensityVisible ) + Q_PROPERTY ( QColor marker_peak_amplitude_color READ GetMarkerPeakAmplitudeColor WRITE SetMarkerPeakAmplitudeColor ) + Q_PROPERTY ( QColor marker_noise_floor_amplitude_color READ GetMarkerNoiseFloorAmplitudeColor WRITE SetMarkerNoiseFloorAmplitudeColor ) + Q_PROPERTY ( bool marker_noise_floor_amplitude_visible READ GetMarkerNoiseFloorAmplitudeVisible WRITE SetMarkerNoiseFloorAmplitudeVisible ) + Q_PROPERTY ( QColor marker_CF_color READ GetMarkerCFColor WRITE SetMarkerCFColor ) + public: FrequencyDisplayPlot(int nplots, QWidget*); virtual ~FrequencyDisplayPlot(); @@ -57,9 +70,6 @@ public: void ClearMaxData(); void ClearMinData(); - void SetMaxFFTVisible(const bool); - void SetMinFFTVisible(const bool); - void replot(); void setYaxis(double min, double max); @@ -68,7 +78,33 @@ public: void SetBGColour (QColor c); void ShowCFMarker (const bool); + const bool GetMaxFFTVisible() const; + const bool GetMinFFTVisible() const; + const QColor GetMinFFTColor() const; + const QColor GetMaxFFTColor() const; + const QColor GetMarkerLowerIntensityColor () const; + const bool GetMarkerLowerIntensityVisible () const; + const QColor GetMarkerUpperIntensityColor () const; + const bool GetMarkerUpperIntensityVisible () const; + const QColor GetMarkerPeakAmplitudeColor () const; + const bool GetMarkerNoiseFloorAmplitudeVisible () const; + const QColor GetMarkerNoiseFloorAmplitudeColor () const; + const QColor GetMarkerCFColor () const; + public slots: + void SetMaxFFTVisible(const bool); + void SetMinFFTVisible(const bool); + void SetMinFFTColor (QColor c); + void SetMaxFFTColor (QColor c); + void SetMarkerLowerIntensityColor (QColor c); + void SetMarkerLowerIntensityVisible (bool visible); + void SetMarkerUpperIntensityColor (QColor c); + void SetMarkerUpperIntensityVisible (bool visible); + void SetMarkerPeakAmplitudeColor (QColor c); + void SetMarkerNoiseFloorAmplitudeVisible (bool visible); + void SetMarkerNoiseFloorAmplitudeColor (QColor c); + void SetMarkerCFColor (QColor c); + void SetLowerIntensityLevel(const double); void SetUpperIntensityLevel(const double); @@ -82,6 +118,18 @@ private: QwtPlotCurve* _min_fft_plot_curve; QwtPlotCurve* _max_fft_plot_curve; + QColor _min_fft_color; + bool _min_fft_visible; + QColor _max_fft_color; + bool _max_fft_visible; + QColor _marker_lower_intensity_color; + bool _marker_lower_intensity_visible; + QColor _marker_upper_intensity_color; + bool _marker_upper_intensity_visible; + QColor _marker_peak_amplitude_color; + QColor _marker_noise_floor_amplitude_color; + bool _marker_noise_floor_amplitude_visible; + QColor _marker_CF_color; double _startFrequency; double _stopFrequency; diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.cc b/gr-qtgui/lib/WaterfallDisplayPlot.cc index 40d16d0072..356e10c4dc 100644 --- a/gr-qtgui/lib/WaterfallDisplayPlot.cc +++ b/gr-qtgui/lib/WaterfallDisplayPlot.cc @@ -469,12 +469,36 @@ WaterfallDisplayPlot::SetIntensityColorMapType(const int which, } } +void +WaterfallDisplayPlot::SetIntensityColorMapType1(int newType) +{ + SetIntensityColorMapType(0, newType, _userDefinedLowIntensityColor, _userDefinedHighIntensityColor); +} + +int +WaterfallDisplayPlot::GetIntensityColorMapType1() const +{ + return GetIntensityColorMapType(0); +} + +void +WaterfallDisplayPlot::SetUserDefinedLowIntensityColor(QColor c) +{ + _userDefinedLowIntensityColor = c; +} + const QColor WaterfallDisplayPlot::GetUserDefinedLowIntensityColor() const { return _userDefinedLowIntensityColor; } +void +WaterfallDisplayPlot::SetUserDefinedHighIntensityColor(QColor c) +{ + _userDefinedHighIntensityColor = c; +} + const QColor WaterfallDisplayPlot::GetUserDefinedHighIntensityColor() const { diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.h b/gr-qtgui/lib/WaterfallDisplayPlot.h index adf5278059..fbb0131563 100644 --- a/gr-qtgui/lib/WaterfallDisplayPlot.h +++ b/gr-qtgui/lib/WaterfallDisplayPlot.h @@ -41,6 +41,11 @@ class WaterfallDisplayPlot: public DisplayPlot { Q_OBJECT + Q_PROPERTY ( int intensity_color_map_type1 READ GetIntensityColorMapType1 WRITE SetIntensityColorMapType1 ) + Q_PROPERTY ( QColor low_intensity_color READ GetUserDefinedLowIntensityColor WRITE SetUserDefinedLowIntensityColor ) + Q_PROPERTY ( QColor high_intensity_color READ GetUserDefinedHighIntensityColor WRITE SetUserDefinedHighIntensityColor ) + + public: WaterfallDisplayPlot(int nplots, QWidget*); virtual ~WaterfallDisplayPlot(); @@ -72,10 +77,16 @@ public: void replot(void); int GetIntensityColorMapType(int) const; - void SetIntensityColorMapType(const int, const int, const QColor, const QColor); + int GetIntensityColorMapType1() const; const QColor GetUserDefinedLowIntensityColor() const; const QColor GetUserDefinedHighIntensityColor() const; +public slots: + void SetIntensityColorMapType(const int, const int, const QColor, const QColor); + void SetIntensityColorMapType1(int); + void SetUserDefinedLowIntensityColor(QColor); + void SetUserDefinedHighIntensityColor(QColor); + signals: void UpdatedLowerIntensityLevel(const double); void UpdatedUpperIntensityLevel(const double); diff --git a/gr-qtgui/lib/displayform.cc b/gr-qtgui/lib/displayform.cc index 4daf5c76ef..e2475cb95e 100644 --- a/gr-qtgui/lib/displayform.cc +++ b/gr-qtgui/lib/displayform.cc @@ -207,7 +207,8 @@ DisplayForm::setLineLabel(int which, const QString &label) void DisplayForm::setLineColor(int which, const QString &color) { - _displayPlot->setLineColor(which, color); + QColor c = QColor(color); + _displayPlot->setLineColor(which, c); _displayPlot->replot(); } |