Uwe,
Thanks again! I fixed the problem. A few notes for anyone else who may face
issues here:
1) setZoomStack() function does not take affect until setMaxStackDepth() is used
on a zoomer with some random value. This may be a bug that is fixed in a later
version.
2) Flicker issue fixed by removing zoom(-1) and instead grabbing the zoomer
stack, popping the top rectangle and pushing an updated ractangle, then doing
setZoomStack()
Some sample code below,
// setup zoomer
symbol_canvas = canvas();
plot_zoomer = new QwtPlotZoomer(symbol_canvas);
// set maxstackdepth to make setzoomstack function work
plot_zoomer->setMaxStackDepth(50);
QwtScaleDiv * xscalediv = axisScaleDiv(QwtPlot::xBottom);
double rleft = xscalediv->lBound(); // lowerBound() in later qwt version
double rtop = lowPlotY; // a variable set earlier
double rwidth = xscalediv->hBound() - xscalediv->lBound(); // upperBound() in
later qwt version
double rheight = highPlotY - lowPlotY;
// create a new rectangle
QwtDoubleRect boundRect(rleft, rtop, rwidth, rheight);
// grab the zoomer stack
QStack<QwtDoubleRect> tmpStack = plot_zoomer->zoomStack();
// get rid of the current rectangle
tmpStack.pop();
// push the updated rectangle
tmpStack.push(boundRect);
// set the new stack
plot_zoomer->setZoomStack(tmpStack);
Bookmarks