Hey!
I have trouble figuring out which behaviour of which class has to be overriden.
I need to draw a rectangle when user presses left mouse button and drags mouse (like QwtPlotZoomer does), but after the button is released, the rectangle should not disappear. The drawn rectangle should remain until user starts drawing another rectangle or presses right mouse button to clear the plot area.
I have tried inheriting from QwtPickerDragRectMachine, but I am not really sure which behavior should be overriden. What do the states mean? Does e.g. setState(0) in QList<QwtPickerMachine::Command> QwtPickerClickRectMachine::transition(const QwtEventPattern &eventPattern, const QEvent *event) reset the rectangle?
I could create a second QwtPlotPicker, which would not be interactive and would only be triggered by a signal coming from the first QwtPlotPicker as soon as the rectangle is finished. I find such a solution not extraordinarily beautiful and if it possible to implement the functionality I am striving for in one class, I'd rather go for that option.
Thanks in advance for any help!
Bookmarks