Implement selection of multiple points on QwtPlotCurve
Brought to you by:
rathmann
From: Sergey <po...@il...> - 2012-01-27 11:07:55
|
Hello readers! For my qwt-based application I need to implement selection of points. I would like to implement most common used way of selection. 1) single LMB (Left mouse button) click drops selection of all previously selected points and selects nearest point (like in event_filter example 2) Ctrl+LMB click adds nearest point of the currently selected curve to the selection or removes selection of point was selected previously. If no points were selected previously then it should act as LMB without Ctrl 3) Shift+LMB click selects interval of points on the current selected curve. If no current curve selected then act in 1) Can anyone suggest best way to do it? Now I think that I should implement my QwtPickerMachine subclass and make signal-slot communications inside QwtPlot subclass that will handle selections. Probably there's easier ways, I don't know. -- Sergey Popov B. Verkin Institute for Low Temperature Physics and Engineering Kharkov, Ukraine |