Results 1 to 4 of 4

Thread: Is there a way to zoom out on QwtPlot using reverse mouse drag ?

  1. #1
    Join Date
    Jul 2013
    Posts
    6
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default 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.

  2. #2
    Join Date
    Jul 2013
    Posts
    6
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Is there a way to zoom out on QwtPlot using reverse mouse drag ?

    I would really appreciate any idea on this problem ! Thanks !

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

    Default 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

  4. The following user says thank you to Uwe for this useful post:

    maxpyne (9th October 2014)

  5. #4
    Join Date
    Jul 2013
    Posts
    6
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default 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.

Similar Threads

  1. Resizing QwtSymbol during zoom in QwtPlot
    By oliver_mpt in forum Qwt
    Replies: 2
    Last Post: 21st November 2012, 13:34
  2. QwtPlot - detect zoom
    By gaminn in forum Qwt
    Replies: 2
    Last Post: 8th June 2012, 12:24
  3. Replies: 2
    Last Post: 4th May 2012, 11:10
  4. Multitouch Zoom with QWTPLOT in Windows
    By cristian.a in forum Qwt
    Replies: 1
    Last Post: 17th January 2012, 10:42
  5. QWTPlot Zoom: cannot zoom negative value
    By jwieland in forum Qwt
    Replies: 0
    Last Post: 8th January 2010, 17:16

Tags for this Thread

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.