QCPAxisTicker Class Reference

#include </home/florent/devel/release/src/gepetto-viewer/plugins/pyqcustomplot/qcustomplot-2.0.1/qcustomplot.h>

Inheritance diagram for QCPAxisTicker:

Public Types

enum  TickStepStrategy { tssReadability, tssMeetTickCount }
 

Public Member Functions

 QCPAxisTicker ()
 
virtual ~QCPAxisTicker ()
 
TickStepStrategy tickStepStrategy () const
 
int tickCount () const
 
double tickOrigin () const
 
void setTickStepStrategy (TickStepStrategy strategy)
 
void setTickCount (int count)
 
void setTickOrigin (double origin)
 
virtual void generate (const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector< double > &ticks, QVector< double > *subTicks, QVector< QString > *tickLabels)
 

Protected Member Functions

virtual double getTickStep (const QCPRange &range)
 
virtual int getSubTickCount (double tickStep)
 
virtual QString getTickLabel (double tick, const QLocale &locale, QChar formatChar, int precision)
 
virtual QVector< double > createTickVector (double tickStep, const QCPRange &range)
 
virtual QVector< double > createSubTickVector (int subTickCount, const QVector< double > &ticks)
 
virtual QVector< QString > createLabelVector (const QVector< double > &ticks, const QLocale &locale, QChar formatChar, int precision)
 
void trimTicks (const QCPRange &range, QVector< double > &ticks, bool keepOneOutlier) const
 
double pickClosest (double target, const QVector< double > &candidates) const
 
double getMantissa (double input, double *magnitude=0) const
 
double cleanMantissa (double input) const
 

Protected Attributes

TickStepStrategy mTickStepStrategy
 
int mTickCount
 
double mTickOrigin
 

Member Enumeration Documentation

◆ TickStepStrategy

Defines the strategies that the axis ticker may follow when choosing the size of the tick step.

See also
setTickStepStrategy
Enumerator
tssReadability 

A nicely readable tick step is prioritized over matching the requested number of ticks (see setTickCount)

tssMeetTickCount 

Less readable tick steps are allowed which in turn facilitates getting closer to the requested tick count.

Constructor & Destructor Documentation

◆ QCPAxisTicker()

QCPAxisTicker::QCPAxisTicker ( )

◆ ~QCPAxisTicker()

virtual QCPAxisTicker::~QCPAxisTicker ( )
virtual

Member Function Documentation

◆ cleanMantissa()

double QCPAxisTicker::cleanMantissa ( double  input) const
protected

◆ createLabelVector()

virtual QVector<QString> QCPAxisTicker::createLabelVector ( const QVector< double > &  ticks,
const QLocale &  locale,
QChar  formatChar,
int  precision 
)
protectedvirtual

◆ createSubTickVector()

virtual QVector<double> QCPAxisTicker::createSubTickVector ( int  subTickCount,
const QVector< double > &  ticks 
)
protectedvirtual

◆ createTickVector()

virtual QVector<double> QCPAxisTicker::createTickVector ( double  tickStep,
const QCPRange range 
)
protectedvirtual

◆ generate()

virtual void QCPAxisTicker::generate ( const QCPRange range,
const QLocale &  locale,
QChar  formatChar,
int  precision,
QVector< double > &  ticks,
QVector< double > *  subTicks,
QVector< QString > *  tickLabels 
)
virtual

◆ getMantissa()

double QCPAxisTicker::getMantissa ( double  input,
double *  magnitude = 0 
) const
protected

◆ getSubTickCount()

virtual int QCPAxisTicker::getSubTickCount ( double  tickStep)
protectedvirtual

◆ getTickLabel()

virtual QString QCPAxisTicker::getTickLabel ( double  tick,
const QLocale &  locale,
QChar  formatChar,
int  precision 
)
protectedvirtual

◆ getTickStep()

virtual double QCPAxisTicker::getTickStep ( const QCPRange range)
protectedvirtual

◆ pickClosest()

double QCPAxisTicker::pickClosest ( double  target,
const QVector< double > &  candidates 
) const
protected

◆ setTickCount()

void QCPAxisTicker::setTickCount ( int  count)

◆ setTickOrigin()

void QCPAxisTicker::setTickOrigin ( double  origin)

◆ setTickStepStrategy()

void QCPAxisTicker::setTickStepStrategy ( TickStepStrategy  strategy)

◆ tickCount()

int QCPAxisTicker::tickCount ( ) const
inline

◆ tickOrigin()

double QCPAxisTicker::tickOrigin ( ) const
inline

◆ tickStepStrategy()

TickStepStrategy QCPAxisTicker::tickStepStrategy ( ) const
inline

◆ trimTicks()

void QCPAxisTicker::trimTicks ( const QCPRange range,
QVector< double > &  ticks,
bool  keepOneOutlier 
) const
protected

Member Data Documentation

◆ mTickCount

int QCPAxisTicker::mTickCount
protected

◆ mTickOrigin

double QCPAxisTicker::mTickOrigin
protected

◆ mTickStepStrategy

TickStepStrategy QCPAxisTicker::mTickStepStrategy
protected

The documentation for this class was generated from the following file: