I'm trying to create a custom plot area selection effect and just want to make sure I'm thinking of it the right way. I've attached a couple screenshots/mockups to illustrate what I'm going for.

What I need: Our plots have time on the X axis and multiple curves. The user needs to be able to select a subset of data bounded by start and end times, but there's no need to be able to select based on Y values. So the selection should contain the entire Y content of the plot, between the two X points the user selected. After the user releases the mouse button to end the selection, the selected area should remain visible, ideally it would have solid vertical lines marking the start/end points (QPen with alpha of 255), and then have a semi-transparent filled in area (QBrush with alpha of 50% or so). The desired effect is shown in this mocked up image:
desiredSelection.png
So in this mockup, the user clicked at X=95.7333, dragged until 221.1770 and released.

My attempts so far:
startSelection.png
In this first image, I've got a QwtPlotPicker with a VLineRubberBand and a QwtPickerDragPointMachine. This gives a nice vertical cursor showing where the selection is starting from, but as the user performs a click/drag/release sequence there's a couple issues: the cursor moves from the starting point to the ending point, so when you reach the end, there's no visual cue to where the selection started, and the signal that is emitted is QwtPlotPicker::selected(const QPointF &pos), which only contains the ending (X,Y) values.

Second attempt:
rectSelection.png
In this image, I'm now using a RectRubberBand and a QwtPickerDragRectMachine. This gives the visual of both the starting and ending selection positions (at least up until mouse release), and emits QwtPlotPicker::selected(const QRectF&), which gives me both the starting X and width, so that's good. But visually it doesn't span the entire plot Y range, and doesn't stay visible after the mouse is released.

So it seems like I want the VLineRubberBand visual combined with a QwtPickerDragRectMachine (but those don't seem compatible? http://qwt.sourceforge.net/class_qwt...78d2823c1f7894). I need to add a fill effect, and then I need some way to get the selection to remain visible until the next selection starts?

I think I need to:
- Inherit from QwtPlotPicker
- Figure out how to get a VLineRubberBand effect combined with emitting a QRectF signal so that I get both start/end or start/width, probably by overloading virtual void drawRubberBand (QPainter *) const?
- Add a fill effect during the selection, I think using QBrush? Looks like this helps? http://www.qtcentre.org/threads/4890...ubberband+fill
- And then get the visual to persist. QwtWidgetOverlay?