Originally Posted by
Ronayn
Which object receives the mouse click? The spectrogram plot item? The plot's canvas, or the plot itself?
The canvas.
Note, that QwtPlotPicker offers an easy to use API to handle clicks on the canvas. F.e you have signals with the clicked position already translated into plot coordinates.
I'd like a left mouse click to just report the X,Y location on the plot, ...
Introduce an additional QwtPlotPicker and don't do this with your zoomer.
.. a right mouse press to start the zooming selection and a right mouse release to stop the selection and zoom, and finally a shift-right click to reset the zoom state back to the original.
zoomer->setMousePattern(
zoomer->setMousePattern(
zoomer->setMousePattern(
QwtEventPattern::MouseSelect1, Qt::RightButton );
zoomer->setMousePattern(
QwtEventPattern::MouseSelect2, Qt::RightButton, Qt::ShiftModifier );
To copy to clipboard, switch view to plain text mode
Don't forget to define the mouse bindings for stepping forward and backward in th zoom stack.
Uwe
Bookmarks