OpendTect-6_4  6.4
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 setCaption (const uiString &)
 
uiString getCaption () const
 
void setBorder (const uiBorder &)
 
void setIsLog (bool yn)
 
void setBegin (const uiAxisHandler *ah)
 
void setEnd (const uiAxisHandler *ah)
 
void setRange (const StepInterval< float > &, float *axstart=0)
 
void setBounds (Interval< float >)
 makes annot 'nice' More...
 
float getVal (int pix) const
 
float getRelPos (float absval) const
 
int getPix (float absval) const
 
int getPix (double abvsval) const
 
int getPix (int) const
 
int getRelPosPix (float relpos) const
 
void setAuxAnnot (const TypeSet< PlotAnnotation > &pos)
 
const Setupsetup () const
 
Setupsetup ()
 
StepInterval< float > range () const
 
float annotStart () const
 
bool isHor () const
 
int pixToEdge (bool withborder=true) const
 
int pixBefore () const
 
int pixAfter () const
 
Interval< int > pixRange () const
 Call this when appropriate. More...
 
void newDevSize ()
 
void updateDevSize ()
 resized from sceme More...
 
void setNewDevSize (int, int)
 resized by yourself More...
 
void updateScene ()
 
uiLineItemgetTickLine (int pix)
 
uiLineItemgetGridLine (int pix)
 
int getNrAnnotCharsForDisp () const
 
void setVisible (bool)
 
void annotAtEnd (const uiString &)
 

Protected Member Functions

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

Protected Attributes

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

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 ( uiGraphicsScene ,
const Setup  
)
uiAxisHandler::~uiAxisHandler ( )

Member Function Documentation

void uiAxisHandler::annotAtEnd ( const uiString )
float uiAxisHandler::annotStart ( ) const
inline
uiString uiAxisHandler::getCaption ( ) const
inline
uiLineItem* uiAxisHandler::getGridLine ( int  pix)
int uiAxisHandler::getNrAnnotCharsForDisp ( ) const
int uiAxisHandler::getPix ( float  absval) const
int uiAxisHandler::getPix ( double  abvsval) const
int uiAxisHandler::getPix ( int  ) const
float uiAxisHandler::getRelPos ( float  absval) const
int uiAxisHandler::getRelPosPix ( float  relpos) const
uiLineItem* uiAxisHandler::getTickLine ( int  pix)
float uiAxisHandler::getVal ( int  pix) const
bool uiAxisHandler::isHor ( ) const
inline
void uiAxisHandler::newDevSize ( )
int uiAxisHandler::pixAfter ( ) const
int uiAxisHandler::pixBefore ( ) const
Interval<int> uiAxisHandler::pixRange ( ) const

Call this when appropriate.

int uiAxisHandler::pixToEdge ( bool  withborder = true) const
StepInterval<float> uiAxisHandler::range ( ) const
inline
bool uiAxisHandler::reCalcAnnotation ( )
protected
void uiAxisHandler::setAuxAnnot ( const TypeSet< PlotAnnotation > &  pos)
inline
void uiAxisHandler::setBegin ( const uiAxisHandler ah)
inline
void uiAxisHandler::setBorder ( const uiBorder )
void uiAxisHandler::setBounds ( Interval< float >  )

makes annot 'nice'

void uiAxisHandler::setCaption ( const uiString )
void uiAxisHandler::setEnd ( const uiAxisHandler ah)
inline
void uiAxisHandler::setIsLog ( bool  yn)
void uiAxisHandler::setNewDevSize ( int  ,
int   
)

resized by yourself

void uiAxisHandler::setRange ( const StepInterval< float > &  ,
float *  axstart = 0 
)
const Setup& uiAxisHandler::setup ( ) const
inline
Setup& uiAxisHandler::setup ( )
inline
void uiAxisHandler::setVisible ( bool  )
int uiAxisHandler::tickEndPix ( bool  farend) const
protected
int uiAxisHandler::ticSz ( ) const
inlineprotected
void uiAxisHandler::updateAxisLine ( )
protected
void uiAxisHandler::updateDevSize ( )

resized from sceme

void uiAxisHandler::updateName ( )
protected
void uiAxisHandler::updateScene ( )

Friends And Related Function Documentation

friend class uiAHPlotAnnotSet
friend

Member Data Documentation

StepInterval<float> uiAxisHandler::annotrg_
protected
uiAHPlotAnnotSet& uiAxisHandler::annots_
protected
float uiAxisHandler::annotstart_
protected
TypeSet<PlotAnnotation> uiAxisHandler::auxannots_
protected
uiLineItem* uiAxisHandler::axislineitm_
protected
int uiAxisHandler::axsz_
protected
const uiAxisHandler* uiAxisHandler::beghndlr_
protected
uiBorder uiAxisHandler::border_
protected
StepInterval<float> uiAxisHandler::datarg_
protected
int uiAxisHandler::devsz_
protected
uiTextItem* uiAxisHandler::endannotitm_
protected
const uiAxisHandler* uiAxisHandler::endhndlr_
protected
float uiAxisHandler::endpos_
protected
float uiAxisHandler::epsilon_
protected
int uiAxisHandler::height_
protected
bool uiAxisHandler::islog_
protected
uiTextItem* uiAxisHandler::nameitm_
protected
int uiAxisHandler::nrsteps_
protected
int uiAxisHandler::pxsizeinotherdir_
protected
int uiAxisHandler::reqnrchars_
protected
bool uiAxisHandler::rgisrev_
protected
float uiAxisHandler::rgwidth_
protected
uiGraphicsScene* uiAxisHandler::scene_
protected
Setup uiAxisHandler::setup_
protected
int uiAxisHandler::ticsz_
protected
int uiAxisHandler::width_
protected
bool uiAxisHandler::ynmtxtvertical_
protected

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