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

Handles an axis on a plot. More...

Classes

struct  Setup
 

Public Member Functions

 uiAxisHandler (uiGraphicsScene *, const Setup &)
 
 ~uiAxisHandler ()
 
void annotAtEnd (const uiString &)
 
float annotStart () const
 
uiString getCaption () const
 
uiLineItemgetGridLine (int pix)
 
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 pix)
 
float getVal (int pix) const
 
bool isHor () 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
 
void setAuxAnnot (const TypeSet< PlotAnnotation > &pos)
 
void setBegin (const uiAxisHandler *ah)
 
void setBorder (const uiBorder &)
 
void setBounds (Interval< float >)
 makes annot 'nice' More...
 
void setCaption (const uiString &)
 
void setEnd (const uiAxisHandler *ah)
 
void setIsLog (bool yn)
 
void setNewDevSize (int, int)
 resized by yourself More...
 
void setRange (const StepInterval< float > &, float *axstart=0)
 
Setupsetup ()
 
const Setupsetup () const
 
void setVisible (bool)
 
void updateDevSize ()
 resized from sceme More...
 
void updateScene ()
 

Protected Member Functions

bool reCalcAnnotation ()
 
int tickEndPix (bool farend) const
 
int ticSz () const
 
void updateAxisLine ()
 
void updateName ()
 

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_
 
bool islog_
 
uiTextItemnameitm_
 
int nrsteps_
 
int pxsizeinotherdir_
 
int reqnrchars_
 
bool rgisrev_
 
float rgwidth_
 
uiGraphicsScenescene_
 
Setup setup_
 
int ticsz_
 
int width_
 
bool ynmtxtvertical_
 

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
inline

◆ getGridLine()

uiLineItem* uiAxisHandler::getGridLine ( int  pix)

◆ 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  pix)

◆ getVal()

float uiAxisHandler::getVal ( int  pix) const

◆ isHor()

bool uiAxisHandler::isHor ( ) const
inline

◆ 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
inline

◆ reCalcAnnotation()

bool uiAxisHandler::reCalcAnnotation ( )
protected

◆ setAuxAnnot()

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

◆ setBegin()

void uiAxisHandler::setBegin ( const uiAxisHandler ah)
inline

◆ setBorder()

void uiAxisHandler::setBorder ( const uiBorder )

◆ setBounds()

void uiAxisHandler::setBounds ( Interval< float >  )

makes annot 'nice'

◆ setCaption()

void uiAxisHandler::setCaption ( const uiString )

◆ setEnd()

void uiAxisHandler::setEnd ( const uiAxisHandler ah)
inline

◆ setIsLog()

void uiAxisHandler::setIsLog ( bool  yn)

◆ setNewDevSize()

void uiAxisHandler::setNewDevSize ( int  ,
int   
)

resized by yourself

◆ setRange()

void uiAxisHandler::setRange ( const StepInterval< float > &  ,
float *  axstart = 0 
)

◆ setup() [1/2]

Setup& uiAxisHandler::setup ( )
inline

◆ setup() [2/2]

const Setup& uiAxisHandler::setup ( ) const
inline

◆ setVisible()

void uiAxisHandler::setVisible ( bool  )

◆ tickEndPix()

int uiAxisHandler::tickEndPix ( bool  farend) 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

◆ islog_

bool uiAxisHandler::islog_
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

◆ setup_

Setup uiAxisHandler::setup_
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-2022