OpendTect  7.0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
uiAxisHandler Class Reference

Handles an axis on a plot. More...

Inheritance diagram for uiAxisHandler:
[legend]

Public Member Functions

 uiAxisHandler (uiGraphicsScene *, const Setup &)
 
 ~uiAxisHandler ()
 
void annotAtEnd (const uiString &)
 
float annotStart () const
 
uiString getCaption () const override
 
uiLineItemgetGridLine (int)
 
int getNrAnnotCharsForDisp () const
 
int getPix (double abvsval) const
 
int getPix (float absval) const
 
int getPix (int) const
 
float getRelPos (float absval) const
 
int getRelPosPix (float relpos) const
 
uiLineItemgetTickLine (int)
 
float getVal (int pix) const
 
void newDevSize ()
 
int pixAfter () const
 
int pixBefore () const
 
Interval< int > pixRange () const
 Call this when appropriate. More...
 
int pixToEdge (bool withborder=true) const
 
StepInterval< float > range () const override
 
void setAuxAnnot (const TypeSet< PlotAnnotation > &pos)
 
void setBegin (const uiAxisHandler *)
 
void setBorder (const uiBorder &) override
 
void setBounds (Interval< float >) override
 
void setCaption (const uiString &) override
 
void setEnd (const uiAxisHandler *)
 
void setIsLog (bool) override
 
void setNewDevSize (int, int)
 resized by yourself More...
 
void setRange (const StepInterval< float > &, float *axst=nullptr) override
 
void setVisible (bool)
 
void updateDevSize ()
 resized from sceme More...
 
void updateScene ()
 
- Public Member Functions inherited from uiAxisHandlerBase
virtual ~uiAxisHandlerBase ()
 
bool isHor () const
 
Setupsetup ()
 
const Setupsetup () const
 

Protected Member Functions

bool reCalcAnnotation ()
 
int tickEndPix (bool) const
 
int ticSz () const
 
void updateAxisLine ()
 
void updateName ()
 
- Protected Member Functions inherited from uiAxisHandlerBase
 uiAxisHandlerBase (const Setup &su)
 

Protected Attributes

StepInterval< float > annotrg_
 
uiAHPlotAnnotSetannots_
 
float annotstart_
 
TypeSet< PlotAnnotationauxannots_
 
uiLineItemaxislineitm_
 
int axsz_
 
const uiAxisHandlerbeghndlr_
 
uiBorder border_
 
StepInterval< float > datarg_
 
int devsz_
 
uiTextItemendannotitm_
 
const uiAxisHandlerendhndlr_
 
float endpos_
 
float epsilon_
 
int height_
 
uiTextItemnameitm_
 
int nrsteps_
 
int pxsizeinotherdir_
 
int reqnrchars_
 
bool rgisrev_
 
float rgwidth_
 
uiGraphicsScenescene_
 
int ticsz_
 
int width_
 
bool ynmtxtvertical_
 
- Protected Attributes inherited from uiAxisHandlerBase
Setup setup_
 

Friends

class uiAHPlotAnnotSet
 

Detailed Description

Handles an axis on a plot.

Manages the positions in a 2D plot. The axis can be logarithmic. getRelPos returns the relative position on the axis. If the point is between the start and stop of the range, this will be between 0 and 1.

The axis will determine a good position wrt the border. To determine where the axis starts and stops, you can provide other axis handlers. If you don't provide these, the border_ will be used. The border_ on the side of the axis will always be used. If you do use begin and end handlers, you'll have to call setRange() for all before using plotAxis().

The drawAxis will plot the axis. If LineStyle::Type is not LineStyle::None, grid lines will be drawn, too. If it is None, then still the color and size will be used for drawing the axis (the axis' style is always Solid).

Use AxisLayout (linear.h) to find 'nice' ranges, like: AxisLayout al( Interval<float>(start,stop) ); ahndlr.setRange( StepInterval<float>(al.sd.start,al.stop,al.sd.step) );

<>

Constructor & Destructor Documentation

◆ uiAxisHandler()

uiAxisHandler::uiAxisHandler ( uiGraphicsScene ,
const Setup  
)

◆ ~uiAxisHandler()

uiAxisHandler::~uiAxisHandler ( )

Member Function Documentation

◆ annotAtEnd()

void uiAxisHandler::annotAtEnd ( const uiString )

◆ annotStart()

float uiAxisHandler::annotStart ( ) const
inline

◆ getCaption()

uiString uiAxisHandler::getCaption ( ) const
inlineoverridevirtual

Implements uiAxisHandlerBase.

◆ getGridLine()

uiLineItem* uiAxisHandler::getGridLine ( int  )

◆ getNrAnnotCharsForDisp()

int uiAxisHandler::getNrAnnotCharsForDisp ( ) const

◆ getPix() [1/3]

int uiAxisHandler::getPix ( double  abvsval) const

◆ getPix() [2/3]

int uiAxisHandler::getPix ( float  absval) const

◆ getPix() [3/3]

int uiAxisHandler::getPix ( int  ) const

◆ getRelPos()

float uiAxisHandler::getRelPos ( float  absval) const

◆ getRelPosPix()

int uiAxisHandler::getRelPosPix ( float  relpos) const

◆ getTickLine()

uiLineItem* uiAxisHandler::getTickLine ( int  )

◆ getVal()

float uiAxisHandler::getVal ( int  pix) const

◆ newDevSize()

void uiAxisHandler::newDevSize ( )

◆ pixAfter()

int uiAxisHandler::pixAfter ( ) const

◆ pixBefore()

int uiAxisHandler::pixBefore ( ) const

◆ pixRange()

Interval<int> uiAxisHandler::pixRange ( ) const

Call this when appropriate.

◆ pixToEdge()

int uiAxisHandler::pixToEdge ( bool  withborder = true) const

◆ range()

StepInterval<float> uiAxisHandler::range ( ) const
inlineoverridevirtual

Implements uiAxisHandlerBase.

◆ reCalcAnnotation()

bool uiAxisHandler::reCalcAnnotation ( )
protected

◆ setAuxAnnot()

void uiAxisHandler::setAuxAnnot ( const TypeSet< PlotAnnotation > &  pos)
inline

◆ setBegin()

void uiAxisHandler::setBegin ( const uiAxisHandler )

◆ setBorder()

void uiAxisHandler::setBorder ( const uiBorder )
overridevirtual

Implements uiAxisHandlerBase.

◆ setBounds()

void uiAxisHandler::setBounds ( Interval< float >  )
overridevirtual

Implements uiAxisHandlerBase.

◆ setCaption()

void uiAxisHandler::setCaption ( const uiString )
overridevirtual

Implements uiAxisHandlerBase.

◆ setEnd()

void uiAxisHandler::setEnd ( const uiAxisHandler )

◆ setIsLog()

void uiAxisHandler::setIsLog ( bool  )
overridevirtual

Implements uiAxisHandlerBase.

◆ setNewDevSize()

void uiAxisHandler::setNewDevSize ( int  ,
int   
)

resized by yourself

◆ setRange()

void uiAxisHandler::setRange ( const StepInterval< float > &  ,
float *  axst = nullptr 
)
overridevirtual

Implements uiAxisHandlerBase.

◆ setVisible()

void uiAxisHandler::setVisible ( bool  )

◆ tickEndPix()

int uiAxisHandler::tickEndPix ( bool  ) const
protected

◆ ticSz()

int uiAxisHandler::ticSz ( ) const
inlineprotected

◆ updateAxisLine()

void uiAxisHandler::updateAxisLine ( )
protected

◆ updateDevSize()

void uiAxisHandler::updateDevSize ( )

resized from sceme

◆ updateName()

void uiAxisHandler::updateName ( )
protected

◆ updateScene()

void uiAxisHandler::updateScene ( )

Friends And Related Function Documentation

◆ uiAHPlotAnnotSet

friend class uiAHPlotAnnotSet
friend

Member Data Documentation

◆ annotrg_

StepInterval<float> uiAxisHandler::annotrg_
protected

◆ annots_

uiAHPlotAnnotSet& uiAxisHandler::annots_
protected

◆ annotstart_

float uiAxisHandler::annotstart_
protected

◆ auxannots_

TypeSet<PlotAnnotation> uiAxisHandler::auxannots_
protected

◆ axislineitm_

uiLineItem* uiAxisHandler::axislineitm_
protected

◆ axsz_

int uiAxisHandler::axsz_
protected

◆ beghndlr_

const uiAxisHandler* uiAxisHandler::beghndlr_
protected

◆ border_

uiBorder uiAxisHandler::border_
protected

◆ datarg_

StepInterval<float> uiAxisHandler::datarg_
protected

◆ devsz_

int uiAxisHandler::devsz_
protected

◆ endannotitm_

uiTextItem* uiAxisHandler::endannotitm_
protected

◆ endhndlr_

const uiAxisHandler* uiAxisHandler::endhndlr_
protected

◆ endpos_

float uiAxisHandler::endpos_
protected

◆ epsilon_

float uiAxisHandler::epsilon_
protected

◆ height_

int uiAxisHandler::height_
protected

◆ nameitm_

uiTextItem* uiAxisHandler::nameitm_
protected

◆ nrsteps_

int uiAxisHandler::nrsteps_
protected

◆ pxsizeinotherdir_

int uiAxisHandler::pxsizeinotherdir_
protected

◆ reqnrchars_

int uiAxisHandler::reqnrchars_
protected

◆ rgisrev_

bool uiAxisHandler::rgisrev_
protected

◆ rgwidth_

float uiAxisHandler::rgwidth_
protected

◆ scene_

uiGraphicsScene* uiAxisHandler::scene_
protected

◆ ticsz_

int uiAxisHandler::ticsz_
protected

◆ width_

int uiAxisHandler::width_
protected

◆ ynmtxtvertical_

bool uiAxisHandler::ynmtxtvertical_
protected

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