Snapping mouse cursor to curves to show tracker text, click to make it stay
Hi,
Thanks a lot for the great Qwt!
Is it possible to do something like Qt Charts' "callout" example in Qwt (or something similar)?
This is my task:
1. The mouse cursor's tracker (showing X and Y coordinates) should "snap" to a curve if it's close enough. I'm not sure yet whether it should be the actual curve points or the interpolated curve. I guess just the curve points would be fine.
2. The tracker texts (showing X and Y coordinates) should stay there (maybe as a marker item) when the user clicks (actually, control-clicks) that point. Multiple such markers should be possible. Control-clicking them again should remove them (though this could be done though a context menu to remove all such markers).
Any pointers, examples, or even suggestions to forget about this are welcome! :)
Thanks a lot!
Alexander
Re: Snapping mouse cursor to curves to show tracker text, click to make it stay
Quote:
The mouse cursor's tracker (showing X and Y coordinates) should "snap" to a curve if it's close enough.
This is usually done with a QwtPlotPicker - maybe have a look at the curveTracker example for inspiration.
Quote:
The tracker texts (showing X and Y coordinates) should stay there (maybe as a marker item) when the user clicks (actually, control-clicks) that point.
If you assign a QwtPickerClickPointMachine to your picker you get signals in plot coordinates for each click. Then all you have to do is to insert/remove a QwtPlotMarker.
HTH,
Uwe
Re: Snapping mouse cursor to curves to show tracker text, click to make it stay
Thank you very much, Uwe.
I'll follow your suggestions.
Thanks!
Alexander