QwtPlotPickers and modifier keys in 5.2.
Brought to you by:
rathmann
From: <Edw...@gt...> - 2011-08-12 19:10:53
|
Hi all, First, let me apologize for replying an existing thread and then not responding to the helpful responses about my QwtPlotMarker question a few months ago. I got busy but should have at least ACK'ed, and then it just seemed useless to respond to something so old. I appreciate the responses and did read them :). Second, we are trying to implement features triggered by various events on the plot items (hover, left/right clicking and click/drag rubber bands), and want to be able to determine the status of any modifier keys (Ctrl and Shift) so when they are held, selections events are treated as appends rather than replacements. Is there a good way to achieve this using QwtPicker or QwtPlotPicker in 5.2.x? We've looked at subclassing QwtPicker or QwtPlotPicker, but don't see the right design path. Our first thought was to add a appendSelected() signal as a companion to the existing selected() signal, and override the appropriate widget*Event methods, which seem intended for this (they get InputEvents and thus QInputEvent::modifiers()). But we would presumably still need to call transition(), which calls end() without the ok flag, which always triggers the old selected signal. We could override transition, but there is no non-private access to the statemachine, so we can't mimic the base transition() behavior either. So what, if anything, am I missing? Related to this, would this be easier in 6.0? We haven't yet migrated but this might be the trigger if 6.0 will do this easily (and the interface has certainly changed a lot at first glance). Thanks, Ed |