Ronayn
29th April 2011, 13:09
I am using the spectrogram example code and I am a bit confused on how to detect a and respond to a mouse click (or mouse button press) on the spectrogram.
Which object receives the mouse click? The spectrogram plot item? The plot's canvas, or the plot itself?
Do I have to reimplement the mouse event function? Or are there signals from any of the above objects that I should be connecting to?
On a related note, I need to modify the way the Zoomer class responds to mouse presses and I dont know how to do that. I'd like a left mouse click to just report the X,Y location on the plot, 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.
Which object receives the mouse click? The spectrogram plot item? The plot's canvas, or the plot itself?
Do I have to reimplement the mouse event function? Or are there signals from any of the above objects that I should be connecting to?
On a related note, I need to modify the way the Zoomer class responds to mouse presses and I dont know how to do that. I'd like a left mouse click to just report the X,Y location on the plot, 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.