Results 1 to 4 of 4

Thread: Linking QwtPlot panners

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,326
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 880 Times in 828 Posts

    Default Re: Linking QwtPlot panners

    Quote Originally Posted by psk View Post
    I've been able to follow the rasterview example to allow panning of the plot. I've been trying to link the panners so that If I pan one plot, the other plots are moved as well.
    The panner grabs the current content of the plot to a pixmap and creates a widget overlay, that is moving this pixmap without modifying the plot. The reason for this implementation is that that a user has a visual feedback without having to replot, what is often too slow for operations like panning.

    If your application has plots, where replots are fast enough you might want to modify the real plot while scrolling/panning. F.e the eventFilter example shows how to scroll a plot with a QwtWheel - the code for several plots should be more or less the same.
    If you want to implement "real" panning I would implement a event filter ( QObject::installEventFilter() ) for the plot canvas, that translates the mouse events into setAxisScale() calls. If you want to sync other plots according to scale changes of a plot you can connect to the QwtScaleWidget::scaleDivChanged() signal ( see QwtPlot::axisWidget() ).

    HTH,
    Uwe

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

    psk (4th July 2013)

Similar Threads

  1. Replies: 9
    Last Post: 25th October 2012, 19:55
  2. Replies: 3
    Last Post: 7th February 2012, 10:40
  3. Linking With Qt VS Add in
    By rcjohns in forum Newbie
    Replies: 2
    Last Post: 14th March 2010, 12:42
  4. Linking to a DLL
    By JohnGaby in forum Newbie
    Replies: 1
    Last Post: 14th October 2009, 19:52
  5. Replies: 6
    Last Post: 14th May 2009, 12:02

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
  •  
Qt is a trademark of The Qt Company.