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





Reply With Quote
Bookmarks