Is there a way to zoom out on QwtPlot using reverse mouse drag ?
I have attached a QwtPlotZoomer to a QwtPlot and using default mousepatterns in order to zoom in. (mouse drag from upper left to lower right corners to draw a rect).
Is there a way to use reverse mouse drag (drawing rect from lower right to upper left corners) in order to zoom out ?
Thank a lot in advance.
Re: Is there a way to zoom out on QwtPlot using reverse mouse drag ?
I would really appreciate any idea on this problem ! Thanks !
Re: Is there a way to zoom out on QwtPlot using reverse mouse drag ?
QwtPlotZoomer implements a zoom stack, so that you can zoom back to the previous rectangles using key combinations. But of course you can't select rectangles with a rubberband, that are not on the screen.
What about using QwtPlotMagnifier - it can be used together with QwtPlotPanner and QwtPlotZoomer.
Uwe
Re: Is there a way to zoom out on QwtPlot using reverse mouse drag ?
Few weeks back I found a work around. I could not produce desired behavior using QwtPlotMagnifier / QwtPlotPanner. So, finally I derived MyZoomer from QwtPlotZoomer and overloaded widgetMousePressEvent(QMouseEvent* e) and widgetMouseReleaseEvent(QMouseEvent* e) and used QwtPlotZoomer::zoom(QRectF) to define the zoom-out behavior. When user drags a rectangle, I determine the direction of the rectangle and then based on that either zoom-in or zoom-out.