OpendTect-6_4  6.4
Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
uiFunctionDisplay Class Reference

displays a function of (X,Y) pairs on a canvas - optionally a Y2. More...

Inheritance diagram for uiFunctionDisplay:
[legend]

Protected Member Functions

void mousePress (CallBacker *)
 
void mouseRelease (CallBacker *)
 
void mouseMove (CallBacker *)
 
void mouseDClick (CallBacker *)
 
void addPoint (const uiPoint &)
 
void cleanUp ()
 
void setUpAxis (bool y2)
 
void getPointSet (TypeSet< uiPoint > &, bool y2)
 
void drawYCurve (const TypeSet< uiPoint > &)
 
void drawY2Curve (const TypeSet< uiPoint > &, bool havy2)
 
void drawMarker (const TypeSet< uiPoint > &, bool y2=false)
 
void drawMarkLine (uiAxisHandler *, float, Color, uiLineItem *&)
 
void drawBorder ()
 
void drawMarkLines ()
 
bool setSelPt ()
 
void reSized (CallBacker *)
 
void saveImageAs (CallBacker *)
 
void getAxisRanges (const TypeSet< float > &vals, const Interval< float > &setuprg, Interval< float > &) const
 
virtual void drawData ()
 
- Protected Member Functions inherited from uiGraphicsView
void saveImageCB (CallBacker *)
 
void printImageCB (CallBacker *)
 
- Protected Member Functions inherited from uiGraphicsViewBase
void translateText ()
 
uiGraphicsViewBodymkbody (uiParent *, const char *)
 
void rubberBandCB (CallBacker *)
 
- Protected Member Functions inherited from uiObject
virtual bool closeOK ()
 hook. Accepts/denies closing of window. More...
 
void triggerSetGeometry (const i_LayoutItem *, uiRect &)
 setGeometry should be triggered by this's layoutItem More...
 
void updateToolTip (CallBacker *=0)
 

Protected Attributes

Setup setup_
 
uiAxisHandlerxax_
 
uiAxisHandleryax_
 
uiAxisHandlery2ax_
 
uiGraphicsItem * ypolyitem_
 
uiGraphicsItem * y2polyitem_
 
uiPolygonItemypolygonitem_
 
uiPolygonItemy2polygonitem_
 
uiPolyLineItemypolylineitem_
 
uiPolyLineItemy2polylineitem_
 
uiRectItemborderrectitem_
 
uiGraphicsItemGroupymarkeritems_
 
uiGraphicsItemGroupy2markeritems_
 
uiLineItemxmarklineitem_
 
uiLineItemymarklineitem_
 
uiLineItemxmarkline2item_
 
uiLineItemymarkline2item_
 
uiTextItemtitleitem_
 
TypeSet< float > xvals_
 
TypeSet< float > yvals_
 
TypeSet< float > y2xvals_
 
TypeSet< float > y2yvals_
 
float xmarklineval_
 
float ymarklineval_
 
float xmarkline2val_
 
float ymarkline2val_
 
int selpt_
 
bool mousedown_
 
- Protected Attributes inherited from uiGraphicsView
bool enableimagesave_
 
uiCrossHairItemcrosshairitem_
 
- Protected Attributes inherited from uiGraphicsViewBase
uiGraphicsViewBodybody_
 
uiRectselectedarea_
 
uiGraphicsScenescene_
 
int sceneborder_
 
bool isctrlpressed_
 
bool enabscrollzoom_
 
- Protected Attributes inherited from uiObject
uiString tooltip_
 
uiObjEventFilter * uiobjeventfilter_
 

Private Member Functions

mODTextTranslationClass(uiFunctionDisplay) public uiFunctionDisplay (uiParent *, const Setup &)
 
 ~uiFunctionDisplay ()
 
void setTitle (const uiString &)
 
void setVals (const float *xvals, const float *yvals, int sz)
 
void setVals (const Interval< float > &, const float *yvals, int sz)
 Undef values are filtered out. More...
 
void setY2Vals (const float *xvals, const float *yvals, int sz)
 
void setY2Vals (const Interval< float > &, const float *yvals, int sz)
 Undef values are filtered out. More...
 
void setMarkValue (float, bool is_x)
 
void setMark2Value (float, bool is_x)
 
void setEmpty ()
 clears all More...
 
const TypeSet< float > & xVals () const
 
const TypeSet< float > & yVals () const
 
uiAxisHandlerxAxis ()
 
uiAxisHandleryAxis (bool y2)
 
const uiAxisHandlerxAxis () const
 
const uiAxisHandleryAxis (bool y2) const
 
Setup & setup ()
 
Geom::Point2D< float > getFuncXY (int xpix, bool y2) const
 
Geom::Point2D< float > getXYFromPix (const Geom::Point2D< int > &pix, bool y2) const
 
int size () const
 
int selPt () const
 
void gatherInfo (bool y2=false)
 
void draw ()
 
void dump (od_ostream &, bool y2) const
 

Private Attributes

Notifier< uiFunctionDisplaypointSelected
 
Notifier< uiFunctionDisplaypointChanged
 

Additional Inherited Members

- Public Types inherited from uiGraphicsViewBase
enum  ODDragMode { NoDrag, ScrollHandDrag, RubberBandDrag }
 
enum  ScrollBarPolicy { ScrollBarAsNeeded, ScrollBarAlwaysOff, ScrollBarAlwaysOn }
 
- Public Types inherited from uiObject
enum  SzPolicy {
  Undef, Small, Medium, Wide,
  SmallVar, MedVar, WideVar, SmallMax,
  MedMax, WideMax
}
 How should the object's size behave? Undef : use default. Small : 1 base sz. Medium : 2* base sz + 1. Wide : 4* base sz + 3. The xxVar options specify that the element may have a bigger internal preferred size. In that case, the maximum is taken. The xxMax options specify that the element should take all available space ( stretch = 2 ) More...
 
- Public Member Functions inherited from uiGraphicsView
 uiGraphicsView (uiParent *, const char *nm)
 
 ~uiGraphicsView ()
 
uiToolButtongetSaveImageButton (uiParent *)
 
uiToolButtongetPrintImageButton (uiParent *)
 
void enableImageSave ()
 
void disableImageSave ()
 
uiCrossHairItemgetCrossHairItem ()
 
- Public Member Functions inherited from uiGraphicsViewBase
 uiGraphicsViewBase (uiParent *, const char *)
 
 ~uiGraphicsViewBase ()
 
void setScene (uiGraphicsScene &)
 Scene becomes mine. More...
 
uiGraphicsScenescene ()
 
void show ()
 
void setScrollBarPolicy (bool hor, ScrollBarPolicy)
 
void setDragMode (ODDragMode)
 
ODDragMode dragMode () const
 
bool isRubberBandingOn () const
 
void setMouseTracking (bool)
 
bool hasMouseTracking () const
 
void setMouseWheelReversal (bool)
 
bool getMouseWheelReversal () const
 
void setMidMouseButtonForDrag (bool)
 
bool hasMidMouseButtonForDrag () const
 
int width () const
 width of widget More...
 
int height () const
 height of widget More...
 
int viewWidth () const
 width of viewport More...
 
int viewHeight () const
 height of viewport More...
 
int getSceneBorder () const
 
void setSceneBorder (int)
 
void centreOn (uiPoint)
 
uiRect getSceneRect () const
 
void setSceneRect (const uiRect &)
 
void setSceneAlignment (const Alignment &)
 
void setScaleFactor (float, float)
 
uiPoint getCursorPos () const
 
void getScaleFactor (float &, float &) const
 
uiPoint getScenePos (float, float) const
 
const uiPointgetStartPos () const
 
const uiRectgetSelectedArea () const
 
void setViewArea (double x, double y, double w, double h)
 
uiRect getViewArea () const
 
void setBackgroundColor (const Color &)
 
Color backgroundColor () const
 
void setNoBackGround ()
 
void rePaint ()
 
void enableScrollZoom (bool yn=true)
 
void disableScrollZoom ()
 
bool scrollZoomEnabled ()
 
uiSize scrollBarSize (bool horizontal) const
 
const uiPoint mapFromScene (const Geom::Point2D< float > &) const
 
const Geom::Point2D< float > mapToScene (const uiPoint &) const
 
bool isCtrlPressed () const
 
void setCtrlPressed (bool yn)
 
bool print ()
 
MouseEventHandlergetNavigationMouseEventHandler ()
 
MouseEventHandlergetMouseEventHandler ()
 
KeyboardEventHandlergetKeyboardEventHandler ()
 
GestureEventHandlergestureEventHandler ()
 
- Public Member Functions inherited from uiObject
 uiObject (uiParent *, const char *nm)
 
 uiObject (uiParent *, const char *nm, uiObjectBody &)
 
 ~uiObject ()
 
void setHSzPol (SzPolicy)
 
void setVSzPol (SzPolicy)
 
SzPolicy szPol (bool hor=true) const
 
virtual void setName (const char *)
 
void setToolTip (const uiString &)
 
const uiStringtoolTip () const
 
void translateText ()
 
void display (bool yn, bool shrink=false, bool maximized=false)
 
void setFocus ()
 
bool hasFocus () const
 
void disabFocus ()
 
virtual void setCursor (const MouseCursor &)
 
bool isCursorInside () const
 
virtual void setStyleSheet (const char *)
 
Color roBackgroundColor () const
 
virtual void setBackgroundPixmap (const uiPixmap &)
 
virtual void setTextColor (const Color &)
 
void setSensitive (bool yn=true)
 
bool sensitive () const
 
bool visible () const
 
bool isDisplayed () const
 
int prefHNrPics () const
 
virtual void setPrefWidth (int)
 
void setPrefWidthInChar (int)
 
void setPrefWidthInChar (float)
 
void setMinimumWidth (int)
 
void setMaximumWidth (int)
 
int prefVNrPics () const
 
virtual void setPrefHeight (int)
 
void setPrefHeightInChar (int)
 
void setPrefHeightInChar (float)
 
void setMinimumHeight (int)
 
void setMaximumHeight (int)
 
void setStretch (int hor, int ver)
 Sets stretch factors for object If stretch factor is > 1, then object will already grow at pop-up. More...
 
void attach (constraintType, int margin=-1)
 attaches object to another In case the stretched... options are used, margin=-1 (default) stretches the object not to cross the border. margin=-2 stretches the object to fill the parent's border. This looks nice with separators. More...
 
void attach (constraintType, uiObject *, int margin=-1, bool reciprocal=true)
 
void attach (constraintType, uiParent *, int margin=-1, bool reciprocal=true)
 
void setFont (const uiFont &)
 
const uiFontfont () const
 
void setCaption (const uiString &)
 
void shallowRedraw (CallBacker *=0)
 
void deepRedraw (CallBacker *=0)
 
void reDraw (bool deep)
 
uiSize actualsize (bool include_border=true) const
 
uiParentparent ()
 
const uiParentparent () const
 
void reParent (uiParent *)
 
uiMainWinmainwin ()
 
 mQtclass (QWidget *) getWidget()
 
 mQtclass (QWidget *) qwidget()
 
const mQtclass (QWidget *) qwidget() const
 
virtual bool handleLongTabletPress ()
 
virtual const ObjectSet< uiBaseObject > * childList () const
 
void close ()
 
- Static Public Member Functions inherited from uiGraphicsViewBase
static const ObjectSet< uiGraphicsViewBase > & allInstances ()
 
- Static Public Member Functions inherited from uiObject
static void updateToolTips ()
 
static void setTabOrder (uiObject *first, uiObject *second)
 
static int baseFldSize ()
 
static int iconSize ()
 
- Public Attributes inherited from uiGraphicsViewBase
CNotifier< uiGraphicsViewBase, uiSizereSize
 CallBacker is OLD size. More...
 
Notifier< uiGraphicsViewBaserubberBandUsed
 
Notifier< uiGraphicsViewBasereDrawNeeded
 
Notifier< uiGraphicsViewBasereDrawn
 In practice, this happens only after reSize. More...
 
Notifier< uiGraphicsViewBasepreDraw
 
Notifier< uiGraphicsViewBasescrollBarUsed
 
- Public Attributes inherited from uiObject
Notifier< uiObjectclosed
 Triggered when object closes. More...
 
CNotifier< uiObject, uiRect & > setGeometry
 triggered when getting a new geometry A reference to the new geometry is passed which can be manipulated, before the geometry is actually set to the QWidget. More...
 

Detailed Description

displays a function of (X,Y) pairs on a canvas - optionally a Y2.

No undefined values supportd (yet). X values can't be undef anyway. You cannot change Setup::editable_ after construction. Y2 is just an optional annotation. It can not be edited, it does not determine the X axis scale. Also, no markers are drawn.

Constructor & Destructor Documentation

mODTextTranslationClass (uiFunctionDisplay) public uiFunctionDisplay::uiFunctionDisplay ( uiParent ,
const Setup &   
)
private
uiFunctionDisplay::~uiFunctionDisplay ( )
private

Member Function Documentation

void uiFunctionDisplay::addPoint ( const uiPoint )
protected
void uiFunctionDisplay::cleanUp ( )
protected
void uiFunctionDisplay::draw ( )
private
void uiFunctionDisplay::drawBorder ( )
protected
virtual void uiFunctionDisplay::drawData ( )
protectedvirtual

Reimplemented in uiHistogramDisplay.

void uiFunctionDisplay::drawMarker ( const TypeSet< uiPoint > &  ,
bool  y2 = false 
)
protected
void uiFunctionDisplay::drawMarkLine ( uiAxisHandler ,
float  ,
Color  ,
uiLineItem *&   
)
protected
void uiFunctionDisplay::drawMarkLines ( )
protected
void uiFunctionDisplay::drawY2Curve ( const TypeSet< uiPoint > &  ,
bool  havy2 
)
protected
void uiFunctionDisplay::drawYCurve ( const TypeSet< uiPoint > &  )
protected
void uiFunctionDisplay::dump ( od_ostream ,
bool  y2 
) const
private
void uiFunctionDisplay::gatherInfo ( bool  y2 = false)
private
void uiFunctionDisplay::getAxisRanges ( const TypeSet< float > &  vals,
const Interval< float > &  setuprg,
Interval< float > &   
) const
protected
Geom::Point2D<float> uiFunctionDisplay::getFuncXY ( int  xpix,
bool  y2 
) const
private
void uiFunctionDisplay::getPointSet ( TypeSet< uiPoint > &  ,
bool  y2 
)
protected
Geom::Point2D<float> uiFunctionDisplay::getXYFromPix ( const Geom::Point2D< int > &  pix,
bool  y2 
) const
private
void uiFunctionDisplay::mouseDClick ( CallBacker )
protected
void uiFunctionDisplay::mouseMove ( CallBacker )
protected
void uiFunctionDisplay::mousePress ( CallBacker )
protected
void uiFunctionDisplay::mouseRelease ( CallBacker )
protected
void uiFunctionDisplay::reSized ( CallBacker )
protected
void uiFunctionDisplay::saveImageAs ( CallBacker )
protected
int uiFunctionDisplay::selPt ( ) const
inlineprivate
void uiFunctionDisplay::setEmpty ( )
private

clears all

void uiFunctionDisplay::setMark2Value ( float  ,
bool  is_x 
)
private
void uiFunctionDisplay::setMarkValue ( float  ,
bool  is_x 
)
private
bool uiFunctionDisplay::setSelPt ( )
protected
void uiFunctionDisplay::setTitle ( const uiString )
private
Setup& uiFunctionDisplay::setup ( )
inlineprivate
void uiFunctionDisplay::setUpAxis ( bool  y2)
protected
void uiFunctionDisplay::setVals ( const float *  xvals,
const float *  yvals,
int  sz 
)
private
void uiFunctionDisplay::setVals ( const Interval< float > &  ,
const float *  yvals,
int  sz 
)
private

Undef values are filtered out.

void uiFunctionDisplay::setY2Vals ( const float *  xvals,
const float *  yvals,
int  sz 
)
private
void uiFunctionDisplay::setY2Vals ( const Interval< float > &  ,
const float *  yvals,
int  sz 
)
private

Undef values are filtered out.

int uiFunctionDisplay::size ( ) const
inlineprivate
uiAxisHandler* uiFunctionDisplay::xAxis ( )
inlineprivate
const uiAxisHandler* uiFunctionDisplay::xAxis ( ) const
inlineprivate
const TypeSet<float>& uiFunctionDisplay::xVals ( ) const
inlineprivate
uiAxisHandler* uiFunctionDisplay::yAxis ( bool  y2)
inlineprivate
const uiAxisHandler* uiFunctionDisplay::yAxis ( bool  y2) const
inlineprivate
const TypeSet<float>& uiFunctionDisplay::yVals ( ) const
inlineprivate

Member Data Documentation

uiRectItem* uiFunctionDisplay::borderrectitem_
protected
bool uiFunctionDisplay::mousedown_
protected
Notifier<uiFunctionDisplay> uiFunctionDisplay::pointChanged
private
Notifier<uiFunctionDisplay> uiFunctionDisplay::pointSelected
private
int uiFunctionDisplay::selpt_
protected
Setup uiFunctionDisplay::setup_
protected
uiTextItem* uiFunctionDisplay::titleitem_
protected
uiAxisHandler* uiFunctionDisplay::xax_
protected
uiLineItem* uiFunctionDisplay::xmarkline2item_
protected
float uiFunctionDisplay::xmarkline2val_
protected
uiLineItem* uiFunctionDisplay::xmarklineitem_
protected
float uiFunctionDisplay::xmarklineval_
protected
TypeSet<float> uiFunctionDisplay::xvals_
protected
uiAxisHandler* uiFunctionDisplay::y2ax_
protected
uiGraphicsItemGroup* uiFunctionDisplay::y2markeritems_
protected
uiPolygonItem* uiFunctionDisplay::y2polygonitem_
protected
uiGraphicsItem* uiFunctionDisplay::y2polyitem_
protected
uiPolyLineItem* uiFunctionDisplay::y2polylineitem_
protected
TypeSet<float> uiFunctionDisplay::y2xvals_
protected
TypeSet<float> uiFunctionDisplay::y2yvals_
protected
uiAxisHandler* uiFunctionDisplay::yax_
protected
uiGraphicsItemGroup* uiFunctionDisplay::ymarkeritems_
protected
uiLineItem* uiFunctionDisplay::ymarkline2item_
protected
float uiFunctionDisplay::ymarkline2val_
protected
uiLineItem* uiFunctionDisplay::ymarklineitem_
protected
float uiFunctionDisplay::ymarklineval_
protected
uiPolygonItem* uiFunctionDisplay::ypolygonitem_
protected
uiGraphicsItem* uiFunctionDisplay::ypolyitem_
protected
uiPolyLineItem* uiFunctionDisplay::ypolylineitem_
protected
TypeSet<float> uiFunctionDisplay::yvals_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019