OpendTect  7.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected 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]

Public Member Functions

 uiFunctionDisplay (uiParent *, const Setup &)
 
 ~uiFunctionDisplay ()
 
void draw () override
 
void gatherInfo (bool y2=false) override
 
Geom::Point2D< float > getFuncXY (int xpix, bool y2) const
 
Geom::Point2D< float > getXYFromPix (const Geom::Point2D< int > &pix, bool y2) const
 
Geom::PointF mapToPosition (const Geom::PointF &, bool y2=false) override
 
Geom::PointF mapToValue (const Geom::PointF &, bool y2=false) override
 
const NotifierAccessmouseMoveNotifier () override
 
void setTitle (const uiString &) override
 
uiObjectuiobj () override
 
uiAxisHandlerxAxis () const
 
uiAxisHandleryAxis (bool y2) const
 
- Public Member Functions inherited from uiFuncDispBase
 uiFuncDispBase (const Setup &)
 
virtual ~uiFuncDispBase ()
 
void dump (od_ostream &, bool y2) const
 
void getAxisRanges (const TypeSet< float > &vals, const Interval< float > &setuprg, Interval< float > &) const
 
int selPt () const
 
virtual void setEmpty ()
 clears all More...
 
virtual void setMark2Value (float, bool is_x)
 
virtual void setMarkValue (float, bool is_x)
 
Setupsetup ()
 
virtual void setVals (const float *xvals, const float *yvals, int sz)
 
virtual void setVals (const Interval< float > &, const float *yvals, int sz)
 Undef values are filtered out. More...
 
virtual void setY2Vals (const float *xvals, const float *yvals, int sz)
 
virtual void setY2Vals (const Interval< float > &, const float *yvals, int sz)
 Undef values are filtered out. More...
 
int size () const
 
uiAxisHandlerBasexAxis ()
 
const uiAxisHandlerBasexAxis () const
 
const TypeSet< float > & xVals () const
 
int y2size () const
 
const TypeSet< float > & y2xVals () const
 
const TypeSet< float > & y2yVals () const
 
uiAxisHandlerBaseyAxis (bool y2)
 
const uiAxisHandlerBaseyAxis (bool y2) const
 
const TypeSet< float > & yVals () const
 
- Public Member Functions inherited from uiGraphicsView
 uiGraphicsView (uiParent *, const char *nm)
 
 ~uiGraphicsView ()
 
void disableImageSave ()
 
void enableImageSave ()
 
uiCrossHairItemgetCrossHairItem ()
 
uiActiongetPrintImageAction ()
 
uiToolButtongetPrintImageButton (uiParent *)
 
uiActiongetSaveImageAction ()
 
uiToolButtongetSaveImageButton (uiParent *)
 
- Public Member Functions inherited from uiGraphicsViewBase
 uiGraphicsViewBase (uiParent *, const char *)
 
 ~uiGraphicsViewBase ()
 
OD::Color backgroundColor () const override
 
void centreOn (uiPoint)
 
void disableScrollZoom ()
 
ODDragMode dragMode () const
 
void enableScrollZoom (bool yn=true)
 
GestureEventHandlergestureEventHandler ()
 
uiPoint getCursorPos () const
 
KeyboardEventHandlergetKeyboardEventHandler ()
 
MouseEventHandlergetMouseEventHandler ()
 
bool getMouseWheelReversal () const
 
MouseEventHandlergetNavigationMouseEventHandler ()
 
void getScaleFactor (float &, float &) const
 
int getSceneBorder () const
 
uiPoint getScenePos (float, float) const
 
uiRect getSceneRect () const
 
const uiRectgetSelectedArea () const
 
const uiPointgetStartPos () const
 
uiRect getViewArea () const
 
bool hasMidMouseButtonForDrag () const
 
bool hasMouseTracking () const
 
int height () const override
 height of widget More...
 
bool isCtrlPressed () const
 
bool isRubberBandingOn () const
 
uiPoint mapFromScene (const Geom::Point2D< float > &) const
 
Geom::Point2D< float > mapToScene (const uiPoint &) const
 
Geom::RectF mapToScene (const uiRect &) const
 
bool print ()
 
void rePaint ()
 
uiGraphicsScenescene ()
 
uiSize scrollBarSize (bool horizontal) const
 
bool scrollZoomEnabled ()
 
void setBackgroundColor (const OD::Color &) override
 
void setCtrlPressed (bool yn)
 
void setDragMode (ODDragMode)
 
void setMidMouseButtonForDrag (bool)
 
void setMouseTracking (bool)
 
void setMouseWheelReversal (bool)
 
void setNoBackGround ()
 
void setScaleFactor (float, float)
 
void setScene (uiGraphicsScene &)
 Scene becomes mine. More...
 
void setSceneAlignment (const Alignment &)
 
void setSceneBorder (int)
 
void setSceneRect (const uiRect &)
 
void setScrollBarPolicy (bool hor, ScrollBarPolicy)
 
void setViewArea (double x, double y, double w, double h)
 
void show ()
 
int viewHeight () const
 height of viewport More...
 
int viewWidth () const
 width of viewport More...
 
int width () const override
 width of widget More...
 
- Public Member Functions inherited from uiObject
 ~uiObject ()
 
uiSize actualSize (bool include_border=true) const
 
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)
 
virtual const ObjectSet< uiBaseObject > * childList () const
 
void close ()
 
void deepRedraw ()
 
void disabFocus ()
 
void display (bool yn, bool shrink=false, bool maximized=false)
 
const uiFontfont () const
 
QWidget * getWidget () override
 
virtual bool handleLongTabletPress ()
 
bool hasFocus () const
 
bool isCursorInside () const
 
bool isDisplayed () const
 
virtual bool isEmpty () const
 
bool isSensitive () const
 
uiMainWinmainwin ()
 
uiParentparent ()
 
const uiParentparent () const
 
int prefHNrPics () const
 
int prefVNrPics () const
 
QWidget * qwidget ()
 
const QWidget * qwidget () const
 
void reDraw (bool deep)
 
void reParent (uiParent *)
 
OD::Color roBackgroundColor () const
 
bool sensitive () const
 
virtual void setBackgroundPixmap (const uiPixmap &)
 
void setCaption (const uiString &)
 
virtual void setCursor (const MouseCursor &)
 
void setFocus ()
 
void setFont (const uiFont &)
 
void setHSzPol (SzPolicy)
 
void setMaximumHeight (int)
 
void setMaximumHeightInChar (int)
 
void setMaximumWidth (int)
 
void setMaximumWidthInChar (int)
 
void setMinimumHeight (int)
 
void setMinimumHeightInChar (int)
 
void setMinimumWidth (int)
 
void setMinimumWidthInChar (int)
 
virtual void setName (const char *) override
 
virtual void setPrefHeight (int)
 
void setPrefHeightInChar (float)
 
void setPrefHeightInChar (int)
 
virtual void setPrefWidth (int)
 
void setPrefWidthInChar (float)
 
void setPrefWidthInChar (int)
 
void setSensitive (bool yn=true)
 
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...
 
virtual void setStyleSheet (const char *)
 
virtual void setTextColor (const OD::Color &)
 
void setToolTip (const uiString &)
 
void setVSzPol (SzPolicy)
 
void shallowRedraw ()
 
int stretch (bool hor) const
 
SzPolicy szPol (bool hor=true) const
 
const uiStringtoolTip () const
 
void translateText () override
 
bool visible () const
 
- Public Member Functions inherited from uiBaseObject
 uiBaseObject (const char *nm, uiBody *=0)
 
virtual ~uiBaseObject ()
 
int beginCmdRecEvent (const BufferString &msg)
 
int beginCmdRecEvent (const char *msg=0)
 
int beginCmdRecEvent (od_uint64 id, const char *msg=0)
 
uiBodybody ()
 
const uiBodybody () const
 
void clear ()
 
void endCmdRecEvent (int refnr, const char *msg=0)
 
void endCmdRecEvent (od_uint64 id, int refnr, const char *msg=0)
 
void finalise ()
 
bool finalised () const
 
void finalize ()
 
bool finalized () const
 
const QWidget * getWidget () const
 
virtual Notifier< uiBaseObject > & postFinalise ()
 
virtual Notifier< uiBaseObject > & postFinalize ()
 
virtual Notifier< uiBaseObject > & preFinalise ()
 
virtual Notifier< uiBaseObject > & preFinalize ()
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
const name_typename () const override
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Public Attributes

CNotifier< uiFunctionDisplay, const Geom::PointF & > mouseMove
 
Notifier< uiFunctionDisplaypointChanged
 
Notifier< uiFunctionDisplaypointSelected
 
- Public Attributes inherited from uiGraphicsViewBase
Notifier< uiGraphicsViewBasepreDraw
 
Notifier< uiGraphicsViewBasereDrawn
 In practice, this happens only after reSize. More...
 
Notifier< uiGraphicsViewBasereDrawNeeded
 
CNotifier< uiGraphicsViewBase, uiSizereSize
 CallBacker is OLD size. More...
 
Notifier< uiGraphicsViewBaserubberBandUsed
 
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...
 

Protected Member Functions

void cleanUp () override
 
void drawBorder ()
 
virtual void drawData ()
 
void drawMarker (const TypeSet< uiPoint > &, bool y2=false)
 
void drawMarkLine (uiAxisHandler *, float, OD::Color, uiLineItem *&)
 
void drawMarkLines () override
 
void drawY2Curve (const TypeSet< uiPoint > &, bool havy2)
 
void drawYCurve (const TypeSet< uiPoint > &)
 
void getPointSet (TypeSet< uiPoint > &, bool y2)
 
void mouseDClick (CallBacker *)
 
void mouseMoveCB (CallBacker *) override
 
void mousePressCB (CallBacker *) override
 
void mouseReleaseCB (CallBacker *) override
 
void reSized (CallBacker *)
 
void saveImageAs (CallBacker *)
 
bool setSelPt ()
 
void setUpAxis (bool y2)
 
- Protected Member Functions inherited from uiFuncDispBase
virtual void addPoint (const Geom::PointF &)
 
- Protected Member Functions inherited from uiGraphicsView
void printImageCB (CallBacker *)
 
void saveImageCB (CallBacker *)
 
- Protected Member Functions inherited from uiGraphicsViewBase
uiGraphicsViewBodymkbody (uiParent *, const char *)
 
void rubberBandCB (CallBacker *)
 
void translateText () override
 
- Protected Member Functions inherited from uiObject
 uiObject (uiParent *, const char *nm)
 
 uiObject (uiParent *, const char *nm, uiObjectBody &)
 
virtual bool closeOK ()
 hook. Accepts/denies closing of window. More...
 
uiObjectBodyobjBody ()
 
const uiObjectBodyobjBody () const
 
void triggerSetGeometry (const i_LayoutItem *, uiRect &)
 setGeometry should be triggered by this's layoutItem More...
 
void updateToolTip (CallBacker *=nullptr)
 
- Protected Member Functions inherited from uiBaseObject
void setBody (uiBody *b)
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Protected Attributes

uiRectItemborderrectitem_
 
uiTextItemtitleitem_
 
uiLineItemxmarkline2item_
 
uiLineItemxmarklineitem_
 
uiGraphicsItemGroupy2markeritems_
 
uiPolygonItemy2polygonitem_
 
uiGraphicsItemy2polyitem_
 
uiPolyLineItemy2polylineitem_
 
uiGraphicsItemGroupymarkeritems_
 
uiLineItemymarkline2item_
 
uiLineItemymarklineitem_
 
uiPolygonItemypolygonitem_
 
uiGraphicsItemypolyitem_
 
uiPolyLineItemypolylineitem_
 
- Protected Attributes inherited from uiFuncDispBase
bool mousedown_ = false
 
int selpt_ = -1
 
Setup setup_
 
uiAxisHandlerBasexax_ = nullptr
 
float xmarkline2val_
 
float xmarklineval_
 
TypeSet< float > xvals_
 
uiAxisHandlerBasey2ax_ = nullptr
 
TypeSet< float > y2xvals_
 
TypeSet< float > y2yvals_
 
uiAxisHandlerBaseyax_ = nullptr
 
float ymarkline2val_
 
float ymarklineval_
 
TypeSet< float > yvals_
 
- Protected Attributes inherited from uiGraphicsView
uiCrossHairItemcrosshairitem_
 
bool enableimagesave_
 
- Protected Attributes inherited from uiGraphicsViewBase
uiGraphicsViewBodybody_
 
bool enabscrollzoom_
 
bool isctrlpressed_
 
uiGraphicsScenescene_
 
int sceneborder_
 
uiRectselectedarea_
 
- Protected Attributes inherited from uiObject
uiString tooltip_
 
uiObjEventFilter * uiobjeventfilter_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

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 Types inherited from ObjectWithName
typedef OD::String name_type
 
- Static Public Member Functions inherited from uiGraphicsViewBase
static const ObjectSet< uiGraphicsViewBase > & allInstances ()
 
- Static Public Member Functions inherited from uiObject
static int baseFldSize ()
 
static int iconSize ()
 
static void setTabOrder (uiObject *first, uiObject *second)
 
static void updateToolTips ()
 
- Static Public Member Functions inherited from uiBaseObject
static void addCmdRecorder (const CallBack &)
 
static void removeCmdRecorder (const CallBack &)
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

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

◆ uiFunctionDisplay()

uiFunctionDisplay::uiFunctionDisplay ( uiParent ,
const Setup  
)

◆ ~uiFunctionDisplay()

uiFunctionDisplay::~uiFunctionDisplay ( )

Member Function Documentation

◆ cleanUp()

void uiFunctionDisplay::cleanUp ( )
overrideprotectedvirtual

Implements uiFuncDispBase.

◆ draw()

void uiFunctionDisplay::draw ( )
overridevirtual

Implements uiFuncDispBase.

◆ drawBorder()

void uiFunctionDisplay::drawBorder ( )
protected

◆ drawData()

virtual void uiFunctionDisplay::drawData ( )
protectedvirtual

Reimplemented in uiHistogramDisplay.

◆ drawMarker()

void uiFunctionDisplay::drawMarker ( const TypeSet< uiPoint > &  ,
bool  y2 = false 
)
protected

◆ drawMarkLine()

void uiFunctionDisplay::drawMarkLine ( uiAxisHandler ,
float  ,
OD::Color  ,
uiLineItem *&   
)
protected

◆ drawMarkLines()

void uiFunctionDisplay::drawMarkLines ( )
overrideprotectedvirtual

Implements uiFuncDispBase.

◆ drawY2Curve()

void uiFunctionDisplay::drawY2Curve ( const TypeSet< uiPoint > &  ,
bool  havy2 
)
protected

◆ drawYCurve()

void uiFunctionDisplay::drawYCurve ( const TypeSet< uiPoint > &  )
protected

◆ gatherInfo()

void uiFunctionDisplay::gatherInfo ( bool  y2 = false)
overridevirtual

Reimplemented from uiFuncDispBase.

◆ getFuncXY()

Geom::Point2D<float> uiFunctionDisplay::getFuncXY ( int  xpix,
bool  y2 
) const

◆ getPointSet()

void uiFunctionDisplay::getPointSet ( TypeSet< uiPoint > &  ,
bool  y2 
)
protected

◆ getXYFromPix()

Geom::Point2D<float> uiFunctionDisplay::getXYFromPix ( const Geom::Point2D< int > &  pix,
bool  y2 
) const

◆ mapToPosition()

Geom::PointF uiFunctionDisplay::mapToPosition ( const Geom::PointF ,
bool  y2 = false 
)
overridevirtual

Implements uiFuncDispBase.

◆ mapToValue()

Geom::PointF uiFunctionDisplay::mapToValue ( const Geom::PointF ,
bool  y2 = false 
)
overridevirtual

Implements uiFuncDispBase.

◆ mouseDClick()

void uiFunctionDisplay::mouseDClick ( CallBacker )
protected

◆ mouseMoveCB()

void uiFunctionDisplay::mouseMoveCB ( CallBacker )
overrideprotectedvirtual

Implements uiFuncDispBase.

◆ mouseMoveNotifier()

const NotifierAccess& uiFunctionDisplay::mouseMoveNotifier ( )
inlineoverridevirtual

Implements uiFuncDispBase.

◆ mousePressCB()

void uiFunctionDisplay::mousePressCB ( CallBacker )
overrideprotectedvirtual

Implements uiFuncDispBase.

◆ mouseReleaseCB()

void uiFunctionDisplay::mouseReleaseCB ( CallBacker )
overrideprotectedvirtual

Implements uiFuncDispBase.

◆ reSized()

void uiFunctionDisplay::reSized ( CallBacker )
protected

◆ saveImageAs()

void uiFunctionDisplay::saveImageAs ( CallBacker )
protected

◆ setSelPt()

bool uiFunctionDisplay::setSelPt ( )
protected

◆ setTitle()

void uiFunctionDisplay::setTitle ( const uiString )
overridevirtual

Implements uiFuncDispBase.

◆ setUpAxis()

void uiFunctionDisplay::setUpAxis ( bool  y2)
protected

◆ uiobj()

uiObject* uiFunctionDisplay::uiobj ( )
inlineoverridevirtual

Implements uiFuncDispBase.

◆ xAxis()

uiAxisHandler* uiFunctionDisplay::xAxis ( ) const

◆ yAxis()

uiAxisHandler* uiFunctionDisplay::yAxis ( bool  y2) const

Member Data Documentation

◆ borderrectitem_

uiRectItem* uiFunctionDisplay::borderrectitem_
protected

◆ mouseMove

CNotifier<uiFunctionDisplay,const Geom::PointF&> uiFunctionDisplay::mouseMove

◆ pointChanged

Notifier<uiFunctionDisplay> uiFunctionDisplay::pointChanged

◆ pointSelected

Notifier<uiFunctionDisplay> uiFunctionDisplay::pointSelected

◆ titleitem_

uiTextItem* uiFunctionDisplay::titleitem_
protected

◆ xmarkline2item_

uiLineItem* uiFunctionDisplay::xmarkline2item_
protected

◆ xmarklineitem_

uiLineItem* uiFunctionDisplay::xmarklineitem_
protected

◆ y2markeritems_

uiGraphicsItemGroup* uiFunctionDisplay::y2markeritems_
protected

◆ y2polygonitem_

uiPolygonItem* uiFunctionDisplay::y2polygonitem_
protected

◆ y2polyitem_

uiGraphicsItem* uiFunctionDisplay::y2polyitem_
protected

◆ y2polylineitem_

uiPolyLineItem* uiFunctionDisplay::y2polylineitem_
protected

◆ ymarkeritems_

uiGraphicsItemGroup* uiFunctionDisplay::ymarkeritems_
protected

◆ ymarkline2item_

uiLineItem* uiFunctionDisplay::ymarkline2item_
protected

◆ ymarklineitem_

uiLineItem* uiFunctionDisplay::ymarklineitem_
protected

◆ ypolygonitem_

uiPolygonItem* uiFunctionDisplay::ypolygonitem_
protected

◆ ypolyitem_

uiGraphicsItem* uiFunctionDisplay::ypolyitem_
protected

◆ ypolylineitem_

uiPolyLineItem* uiFunctionDisplay::ypolylineitem_
protected

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