[OpendTect_Developers] How to implement scorall bar in OD's 2D viewers

Satyaki Maitra satyaki at opendtect.org
Wed Jul 6 12:19:36 CEST 2011


Hi Yan
>
> but i found that uiFlatViewer didn't involve scroll bar when its 
> zooming, and uiDataPointSetCrossPlot didn't implement zooming 
> functions.I just wonder why these.
We deliberately did not include the scroll bar in the uiFlatViewer . The 
uiFlatViewer is basic class in OD based on which several functionalities 
are built. So the zooming mechanism can be different for different 
functionalities . We did not want all the derived classes from 
uiFlatViewer to have a scrollbar by default. This could have complicated 
matters. Also functionality wise no user complained about it.

The uiDataPointSetCrossPlot does have a zooming and dragging option. You 
can zoom in by scrolling the mouse. But yes the rubberband zooming is 
not present there as it is not that much interesting in this case and 
also interferes with the selection workflow, thus complicating matters.
> If i want to implement the scroll bar function, is anything that i 
> need to notice?

Yes you can do that by setting the uiGraphicsViewBody::ScrollBarPolicy. 
Check out the include/uiBase/uigraphicsviewbase.h class for more details.
> Is it feasible that if i implement Zoom in and Zoom Out functions by 
> Qt's Graphics View's own apis(e.g use QGraphicsView's scale and 
> translate functions).
Yes, in fact the uiDataPointCrossPlot does exactly that. You have to 
call enableScrollZoom() in uiGraphicsViewBase and this will call the 
QGraphicsView's scale and translate functions to do the zooming. You can 
find the implementation in the uiGraphicsViewBody::wheelEvent() function.
> In additional, as the 
> http://lists.opendtect.org/pipermail/developers/2010-August/000198.html 
> mentioned, there is a "Well to seismic correlation panel" in OD, but i 
> didn't find any source code about the "Well to seismic correlation 
> panel". could anyone tell me where they are ?

The "Well to seismic correlation panel" is a closed source plugin, 
that's why you could not find it.

Cheers
Satyaki

-- 
- Satyaki Maitra
- OpendTect Developer
-
- dGB Earth Sciences
- 304, Gateway Plaza, Hiranandani Gardens,
- Powai, Mumbai 400 076, India
- Phone: +91 22 25704984 , Fax: +91 22 25704977
- Mobile: +91 9930856158
- mailto:satyaki.maitra at opendtect.org
- http://www.opendtect.org






More information about the Developers mailing list