Results 1 to 2 of 2

Thread: Using QwtPlotMagnifier on plot axes

  1. #1
    Join Date
    Feb 2012
    Location
    Stuttgart / Germany
    Posts
    35
    Thanks
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Using QwtPlotMagnifier on plot axes

    Hello,
    I'm trying to use QwtPlotMagnifier to perform a zoom in/out, it works fine using mouse wheel on the plot area, but I would like to activate and use mouse wheel only when the user is with the mouse on the y axes.
    For example, if the user wants to zoom the y-axis he brings the mouse on the y-axis and then uses the mouse wheel and not on the plot area. How can I install this event on the axes to get the mouse wheel? I have no idea, not even how to start to implement that, any help will be perfect. When the software starts the magnifier can be already started for y axes, but it will zoom only when the wheel is used on the y-axes and not on the whole plotting area.

    It's difficult to explain, I hope someone understood and can help me.
    Thanks in advance.
    Regards,
    Cesar Rocha

  2. #2
    Join Date
    Nov 2012
    Posts
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Using QwtPlotMagnifier on plot axes

    I don't believe you can use QwtPlotMagnifier for this. Create a new class, install event filter on QwtPlot::axisWidget(), filter wheel events, calculate axis scale, then lastly QwtPlot::setAxisScale(). You may be able to make use of QwtMagnifier, if you don't want to do the calculations.

Similar Threads

  1. Replies: 2
    Last Post: 21st May 2013, 10:43
  2. Replies: 5
    Last Post: 3rd October 2012, 15:14
  3. QwtPlotMagnifier
    By carhun in forum Qwt
    Replies: 1
    Last Post: 22nd June 2012, 07:51
  4. Plot Axes
    By mcarter in forum Qwt
    Replies: 0
    Last Post: 4th December 2009, 23:47
  5. Replies: 2
    Last Post: 4th August 2008, 08:14

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.