QCPAxisTickerPi Class Reference

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

Inheritance diagram for QCPAxisTickerPi:
Collaboration diagram for QCPAxisTickerPi:

Public Types

enum  FractionStyle { fsFloatingPoint, fsAsciiFractions, fsUnicodeFractions }
 
- Public Types inherited from QCPAxisTicker
enum  TickStepStrategy { tssReadability, tssMeetTickCount }
 

Public Member Functions

 QCPAxisTickerPi ()
 
QString piSymbol () const
 
double piValue () const
 
bool periodicity () const
 
FractionStyle fractionStyle () const
 
void setPiSymbol (QString symbol)
 
void setPiValue (double pi)
 
void setPeriodicity (int multiplesOfPi)
 
void setFractionStyle (FractionStyle style)
 
- Public Member Functions inherited from QCPAxisTicker
 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) Q_DECL_OVERRIDE
 
virtual int getSubTickCount (double tickStep) Q_DECL_OVERRIDE
 
virtual QString getTickLabel (double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE
 
void simplifyFraction (int &numerator, int &denominator) const
 
QString fractionToString (int numerator, int denominator) const
 
QString unicodeFraction (int numerator, int denominator) const
 
QString unicodeSuperscript (int number) const
 
QString unicodeSubscript (int number) const
 
- Protected Member Functions inherited from QCPAxisTicker
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

QString mPiSymbol
 
double mPiValue
 
int mPeriodicity
 
FractionStyle mFractionStyle
 
double mPiTickStep
 
- Protected Attributes inherited from QCPAxisTicker
TickStepStrategy mTickStepStrategy
 
int mTickCount
 
double mTickOrigin
 

Member Enumeration Documentation

◆ FractionStyle

Defines how fractions should be displayed in tick labels.

See also
setFractionStyle
Enumerator
fsFloatingPoint 

Fractions are displayed as regular decimal floating point numbers, e.g. "0.25" or "0.125".

fsAsciiFractions 

Fractions are written as rationals using ASCII characters only, e.g. "1/4" or "1/8".

fsUnicodeFractions 

Fractions are written using sub- and superscript UTF-8 digits and the fraction symbol.

Constructor & Destructor Documentation

◆ QCPAxisTickerPi()

QCPAxisTickerPi::QCPAxisTickerPi ( )

Member Function Documentation

◆ fractionStyle()

FractionStyle QCPAxisTickerPi::fractionStyle ( ) const
inline

◆ fractionToString()

QString QCPAxisTickerPi::fractionToString ( int  numerator,
int  denominator 
) const
protected

◆ getSubTickCount()

virtual int QCPAxisTickerPi::getSubTickCount ( double  tickStep)
protectedvirtual

Reimplemented from QCPAxisTicker.

◆ getTickLabel()

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

Reimplemented from QCPAxisTicker.

◆ getTickStep()

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

Reimplemented from QCPAxisTicker.

◆ periodicity()

bool QCPAxisTickerPi::periodicity ( ) const
inline

◆ piSymbol()

QString QCPAxisTickerPi::piSymbol ( ) const
inline

◆ piValue()

double QCPAxisTickerPi::piValue ( ) const
inline

◆ setFractionStyle()

void QCPAxisTickerPi::setFractionStyle ( FractionStyle  style)

◆ setPeriodicity()

void QCPAxisTickerPi::setPeriodicity ( int  multiplesOfPi)

◆ setPiSymbol()

void QCPAxisTickerPi::setPiSymbol ( QString  symbol)

◆ setPiValue()

void QCPAxisTickerPi::setPiValue ( double  pi)

◆ simplifyFraction()

void QCPAxisTickerPi::simplifyFraction ( int &  numerator,
int &  denominator 
) const
protected

◆ unicodeFraction()

QString QCPAxisTickerPi::unicodeFraction ( int  numerator,
int  denominator 
) const
protected

◆ unicodeSubscript()

QString QCPAxisTickerPi::unicodeSubscript ( int  number) const
protected

◆ unicodeSuperscript()

QString QCPAxisTickerPi::unicodeSuperscript ( int  number) const
protected

Member Data Documentation

◆ mFractionStyle

FractionStyle QCPAxisTickerPi::mFractionStyle
protected

◆ mPeriodicity

int QCPAxisTickerPi::mPeriodicity
protected

◆ mPiSymbol

QString QCPAxisTickerPi::mPiSymbol
protected

◆ mPiTickStep

double QCPAxisTickerPi::mPiTickStep
protected

◆ mPiValue

double QCPAxisTickerPi::mPiValue
protected

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