As we know, if we set setAxisAutoScale(QwtPlot::xBottom, true);, then X-axis plot will be autoscale as per the input curves. so now practically my zoomBase should be the current/updated scale interval of x and y axis, not the QRectF(0,0 1000x1000). So my intention is to do like this below, which is not the correct syntax.
{
private:
virtual void rescale() override;
}
{
m_plot = plot;
}
void ZoomPlot::rescale()
{
if(zoomRectIndex() == 0)
{
setZoomBase
(m_plot
->axisInterval
(QwtPlot::xBottom)) //Its not correct, so looking for correct syntax }
}
class ZoomPlot: public QwtPlotZoomer
{
private:
virtual void rescale() override;
QwtPlot *m_plot;
}
ZoomPlot::ZoomPlot(QwtPlot *plot):
QwtPlotZoomer(plot->canvas())
{
m_plot = plot;
}
void ZoomPlot::rescale()
{
if(zoomRectIndex() == 0)
{
setZoomBase(m_plot->axisInterval(QwtPlot::xBottom)) //Its not correct, so looking for correct syntax
}
QwtPlotZoomer::rescale();
}
To copy to clipboard, switch view to plain text mode
Bookmarks