john_k
15th September 2014, 20:49
Hi
I set my axes like
const QwtInterval xInterval = m_spectrogram->data()->interval( Qt::XAxis );
setAxisScale(xBottom, xInterval.minValue(), xInterval.maxValue(), 20);
const QwtInterval yInterval = m_spectrogram->data()->interval( Qt::YAxis );
setAxisScale(yLeft, yInterval.minValue(), yInterval.maxValue(), 5);
then I setup my zoomer
if(!m_zoomer)
{
m_zoomer = new MyZoomer(canvas());
}
m_zoomer->setKeyPattern( QwtEventPattern::KeyHome, Qt::Key_Home);
The plot has the X, Y axes I want when it starts but after zooming and returning to the default view through the Home key the axes do not return to the setting above.
This is all being done in a class derived from QwtPlot like in the Qwt examples.
I set my axes like
const QwtInterval xInterval = m_spectrogram->data()->interval( Qt::XAxis );
setAxisScale(xBottom, xInterval.minValue(), xInterval.maxValue(), 20);
const QwtInterval yInterval = m_spectrogram->data()->interval( Qt::YAxis );
setAxisScale(yLeft, yInterval.minValue(), yInterval.maxValue(), 5);
then I setup my zoomer
if(!m_zoomer)
{
m_zoomer = new MyZoomer(canvas());
}
m_zoomer->setKeyPattern( QwtEventPattern::KeyHome, Qt::Key_Home);
The plot has the X, Y axes I want when it starts but after zooming and returning to the default view through the Home key the axes do not return to the setting above.
This is all being done in a class derived from QwtPlot like in the Qwt examples.