Results 1 to 3 of 3

Thread: QwtPlotMagnifier Invert Wheel Zoom

  1. #1
    Join Date
    Apr 2008
    Posts
    53
    Thanks
    10

    Default QwtPlotMagnifier Invert Wheel Zoom

    Hi,

    I included QwtPlotMagnifier to my plot, but scrolling up on the mouse zooms out and scrolling down on the mouse zooms in. How do I switch these so that scrolling up zooms in?

    Thank you,
    -James

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlotMagnifier Invert Wheel Zoom

    Didn't try it myself, but I guess the following might invert:

    Qt Code:
    1. virtual YourMagnifier::rescale(double factor)
    2. {
    3. if ( factor != 0.0 )
    4. QwtPlotMagnifier::rescale(1 / factor);
    5. }
    To copy to clipboard, switch view to plain text mode 

    HTH,
    Uwe

  3. #3
    Join Date
    Apr 2008
    Posts
    53
    Thanks
    10

    Default Re: QwtPlotMagnifier Invert Wheel Zoom

    Quote Originally Posted by Uwe View Post
    Didn't try it myself, but I guess the following might invert:

    Qt Code:
    1. virtual YourMagnifier::rescale(double factor)
    2. {
    3. if ( factor != 0.0 )
    4. QwtPlotMagnifier::rescale(1 / factor);
    5. }
    To copy to clipboard, switch view to plain text mode 

    HTH,
    Uwe
    Hi Uwe,

    Thanks for your solution, I can get by with this implementation in my program.

    Just one problem though, now the zoom in/out with the keys are also inverted. I would also have to override setZoomInKey and setZoomOutKey right?

    Anyways this will work fine for my application, thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.