Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
There are two graph windows in the program which need to have the same x
axis and the same zoom stacks.
There should be a possibility of zooming in or out any graph.
When zooming a graph, the other graph should adjust it's x axis and zoom
stack to be the same as the graph which was zoomed.
So if I have zoomed in one of the graphs 3 times, there should be a
possibility of zooming out the other graph 3 times too.
If after this I zoom in the second graph, there should be a possibility of
zooming out both graphs 4 times.
I'm trying to do this with QwtPlotZoomer::setZoomStack method.
It works fine when zooming in but it does not work when zooming out. When
zooming out, the second graph does not change.
The slotZoom method is connected to the 'zoomed' signal of graph's
QwtPlotZoomer. The 'in_slot' variable is used to avoid recursive calls of
connect(ui.g_signal1->zoomer(), SIGNAL(zoomed()), this, SLOT(slotZoom()));
connect(ui.g_signal2->zoomer(), SIGNAL(zoomed()), this, SLOT(slotZoom()));
What is wrong in this code?
What can be the correct solution?
On 10/14/2013 03:06 PM, Денис Силин wrote:
> What is wrong in this code?
You also have to control the current position in the zoom stack - f.e
zooming out changes the position inside the stack, but not the stack itself.