31 #include <boost/format.hpp> 34 #include <qwt/qwt_plot_grid.h> 35 #include <qwt/qwt_scale_engine.h> 63 setCanvasBackground(Qt::black);
66 enableAxis(QwtPlot::xBottom,
true);
67 enableAxis(QwtPlot::yLeft,
true);
68 enableAxis(QwtPlot::yRight,
true);
79 grid_p =
new QwtPlotGrid();
89 connect(
picker_p, SIGNAL(selected(
const QPointF&)), SLOT(
pickPoint(
const QPointF&)));
91 QColor fcol = Qt::green;
96 freq_marker.setRect(QRectF(1.0, -100.0, 2.0, 100.0));
126 if(val_range < 25.1) y_step = 2.5;
127 if(val_range < 10.1) y_step = 1.0;
128 setAxisScale(QwtPlot::yLeft, y_min,
val_ref, y_step);
129 setAxisScale(QwtPlot::yRight, y_min,
val_ref, y_step);
142 QwtLinearScaleEngine se;
143 setAxisScaleDiv(QwtPlot::xBottom, se.divideScale(min, max, 5, 5));
150 (void) check_boundary;
198 freq_marker.setRect(QRectF(f, -200.0, width, 300.0));
221 freqs =
new double[buckets];
222 vals =
new double[buckets];
void updateData(double cfreq, float *y)
QwtPlotShapeItem freq_marker
FreqScaleDraw * freq_draw_p
void setFreqStep(double cf, double st)
void setFreqCenter(double cf, bool check_boundary=false)
void setMarkerOffset(double lo, double hi)
void setFreqMarker(double f)
void setDynamicRange(double drange)
void setRefLevel(int rlvl)
double correctCenterFreq(double cfreq)
void setFreqSpan(double fs, bool check_boundary=false)
void configureSpectrum(double cfreq, double span, long buckets)
void pickPoint(const QPointF &pos)
void resetFreqAxis(double cfreq)