{
public:
RD_Qwt_Plot()
{
}
~RD_Qwt_Plot()
{
}
{
cust_x_map.setPaintInterval(xMap.p1(), xMap.p2());
// Matrix spans 128 for the X direction
// cust_x_map.setScaleInterval(0, 127);
cust_x_map.setScaleInterval(-100, 20);
cust_y_map.setPaintInterval(yMap.p1(), yMap.p2());
// Matrix spans 16384 for the Y direction
cust_y_map.setScaleInterval(0, 16383);
}
/*
// This method is referenced when checking to see what data to be plotted.
// If you set the interval here, it changes both the axis and the
// data plotted.
QwtInterval interval(Qt::Axis axis) const
{
const QwtInterval interv(-34, 67);
return interv;
}
*/
};
class RD_Qwt_Plot : public QwtPlotSpectrogram
{
public:
RD_Qwt_Plot()
{
setItemAttribute(QwtPlotItem::AutoScale, false);
}
~RD_Qwt_Plot()
{
}
virtual void draw(QPainter* painter, const QwtScaleMap &xMap,
const QwtScaleMap &yMap, const QRectF &canvasRect) const
{
QwtScaleMap cust_x_map;
cust_x_map.setPaintInterval(xMap.p1(), xMap.p2());
// Matrix spans 128 for the X direction
// cust_x_map.setScaleInterval(0, 127);
cust_x_map.setScaleInterval(-100, 20);
QwtScaleMap cust_y_map;
cust_y_map.setPaintInterval(yMap.p1(), yMap.p2());
// Matrix spans 16384 for the Y direction
cust_y_map.setScaleInterval(0, 16383);
QwtPlotSpectrogram::draw(painter, cust_x_map, cust_y_map, canvasRect);
}
/*
// This method is referenced when checking to see what data to be plotted.
// If you set the interval here, it changes both the axis and the
// data plotted.
QwtInterval interval(Qt::Axis axis) const
{
const QwtInterval interv(-34, 67);
return interv;
}
*/
};
To copy to clipboard, switch view to plain text mode
Bookmarks