Results 1 to 3 of 3

Thread: Graphic effects of QwtPlotPanner

  1. #1
    Join Date
    May 2009
    Posts
    75
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Graphic effects of QwtPlotPanner

    I have QwtPlot and QwtPlotPanner. I want to pan only horizontally so I call plotPanner->setAxisEnabled(QwtPlot::yLeft,false);

    When I click with left button and move mouse, I can see the curve moving also vertically, while the scale of x axes don''t move. When I release left button all is updated, the curve is repainted correctly (panned only horizontally) and the x axes is updated too.
    How can I make the curve moved only orizontally while I track it with mouse? And how can I make the x axes update continously while I move mouse, instead of when I release left button?

    When I zoom the curve and the I try to pan, is animated only the portion of curve that is visible.
    How can I make the curve repainted entirely?

    thanks

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

    Default Re: Graphic effects of QwtPlotPanner

    The panner only grabs the content of the canvas to a pixmap that is moved around while panning. The reason behind this implementation is, that rescaling might be too slow ( depending on content of your plot ) for mouse movements. Guess you might also have some effects because of the jumping scales.

    If you want immediate updates of the plot simply implement an event filter for the plot canvas, where you map the mouse move events to scale changes ( like the panner does ).

    Uwe

  3. #3
    Join Date
    Jul 2019
    Posts
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Graphic effects of QwtPlotPanner

    Quote Originally Posted by mastupristi View Post
    I have QwtPlot and QwtPlotPanner. I want to pan only horizontally so I call plotPanner->setAxisEnabled(QwtPlot::yLeft,false);

    When I click with left button and move mouse, I can see the curve moving also vertically, while the scale of x axes don''t move. When I release left button all is updated, the curve is repainted correctly (panned only horizontally) and the x axes is updated too.
    How can I make the curve moved only orizontally while I track it with mouse? And how can I make the x axes update continously while I move mouse, instead of when I release left button?

    thanks
    In regards to panning only in one direction, the member function QwtPanner::setOrientations will do the trick. I dont immediately understand why there is both QwtPlotPanner::setAxisEnabled and QwtPanner::setOrientations.

    Thought I'd reply to this cause google got me here and the answer is straight forward.

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.