novackb
31st January 2011, 15:13
I'm attempting to implement a double-click zoom out feature to mimic Matlab behavior. I've successfully implemented a custom QwtPickerClickPointMachine which catches the double-click of mouse button 1 and I can perform the necessary actions.
My problem is I still need the zoom capability provided in the QwtPlotZoomer class which I think uses the QwtPickerDragRectMachine as the QwtPickerMachine. When I use the setStateMachine() method on the zoomer instance it replaces the current QwtPickerMachine with my custom PickerMachine, which is exactly as I would expect based on documentation. So I gain my double-click functionality but lose the zoom functionality.
So my question is how do I use the functionality provided in my custom Picker Machine and the QwtPickerDragRectMachine at the same time within my QwtPlotZoomer? Or is there a much easier approach that I'm just overlooking.
Any advice is appreciated.
Thanks!
FYI: working with qwt6.0.0_rc5
My problem is I still need the zoom capability provided in the QwtPlotZoomer class which I think uses the QwtPickerDragRectMachine as the QwtPickerMachine. When I use the setStateMachine() method on the zoomer instance it replaces the current QwtPickerMachine with my custom PickerMachine, which is exactly as I would expect based on documentation. So I gain my double-click functionality but lose the zoom functionality.
So my question is how do I use the functionality provided in my custom Picker Machine and the QwtPickerDragRectMachine at the same time within my QwtPlotZoomer? Or is there a much easier approach that I'm just overlooking.
Any advice is appreciated.
Thanks!
FYI: working with qwt6.0.0_rc5