PDA

View Full Version : advice wanted: widget size 50 x 4,000



vonCZ
20th April 2009, 19:26
I want to create an interactive panel like in the attached image; the two squiggly lines--one red, the other blue--represent data taken from wells.

The range of data values is from 0 feet to 4000 feet in depth; there's a measurement taken at every foot, so there are 4,000 data values that I want to include in the image. So I've subclassed QWidget, added a paintEvent, and call it "wellPan". The widget is only 50 pixels wide, for example, and 4000 pixels high. *But* at any given time only 200 pixels in height of this widget would be visible (see "wellPan01" and "wellPan02"). In the attached image, the user has zoomed in to the well data such that he's looking at depths 350 to 650. If he wanted, he could zoom in still further, or zoom all the way out so that he could see depths 0 - 4000. He can also scroll up-and-down the image.

Does this seem like a good way to do this? Is it wise (or not) to have a huge widget, though only part of it is shown at any time? Is it possible to zoom in/out to the widget (wellPan) as I've described? Thank you!