manually drawing on the canvas
Hi, I was wondering how to allow the users of my plot use the cursor to draw on the canvas. What I envision is during a demonstration the user can circle a part on the plot, or underline a particular part on the curve. If it is possible, I would even like it if they could write notes on the canvas as if the cursor was a pen.
Could someone please point me in the right direction? Thank you.
Re: manually drawing on the canvas
While the user is working interactively with on the plot I would implement the feedback using a widget overlay. This is exactly the way how QwtPicker draws the rubberbands and the tracker text ( both are overlay widgets ). As soon as the interaction is done the new primitive can be added permanently as a plot item ( an individual one you have to implement ) to the plot.
Of course you could also try to handle the user interaction without widget overlays ( something what the event_filter example does ), but this might be too slow as soon as the scene gets too complex and replots are too slow for mouse movements.
Uwe