How to modify position of a QwtPlotPicker RubberBand from outside?
Hello friends.
I have two qwtplots charts with a QwtPlotPicker with a VLineRubberBand. When I move the mouse, the rubberband follows the mouse. The charts have the same size and x values. The problem is that I want to modify both rubberbands from one of the charts. When I move the mouse from one chart, I should see the other chart rubberband move with the same position without interaction. I have tried without succes.
Is this possible?
Re: How to modify position of a QwtPlotPicker RubberBand from outside?
A QwtPlotPicker uses a state machine ( QwtPickerMachine ) that changes is state depending on receiving QwtPickerMachine::Command(s). Those commands are related to user inputs according to how you have set the event pattern parts, but of course you can also send commands manually. All state changes are indicated by signals and when you derive from QwtPlotPicker you also have access to the protected methods for setting the states.
Then it should be easy to connect the 2 pickers, all you need to care of is to avoid ping pong effects.
uwe