Gra zręcznościowa „Straszna Epidemia"  V1.2
Projekt Wizualizacja Danych Sensorycznych Kewin Gałuszka rok akademicki 2019/2020
Dokumentacja klasy QCPAxisTickerPi

Specialized axis ticker to display ticks in units of an arbitrary constant, for example pi. Więcej...

#include <qcustomplot.h>

Diagram dziedziczenia dla QCPAxisTickerPi
Diagram współpracy dla QCPAxisTickerPi:

Typy publiczne

enum  FractionStyle { fsFloatingPoint, fsAsciiFractions, fsUnicodeFractions }
 
- Typy publiczne dziedziczone z QCPAxisTicker
enum  TickStepStrategy { tssReadability, tssMeetTickCount }
 

Metody publiczne

 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)
 
- Metody publiczne dziedziczone z 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)
 

Metody chronione

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
 
- Metody chronione dziedziczone z 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
 

Atrybuty chronione

QString mPiSymbol
 
double mPiValue
 
int mPeriodicity
 
FractionStyle mFractionStyle
 
double mPiTickStep
 
- Atrybuty chronione dziedziczone z QCPAxisTicker
TickStepStrategy mTickStepStrategy
 
int mTickCount
 
double mTickOrigin
 

Opis szczegółowy

Specialized axis ticker to display ticks in units of an arbitrary constant, for example pi.

This QCPAxisTicker subclass generates ticks that are expressed with respect to a given symbolic constant with a numerical value specified with setPiValue and an appearance in the tick labels specified with setPiSymbol.

Ticks may be generated at fractions of the symbolic constant. How these fractions appear in the tick label can be configured with setFractionStyle.

The ticker can be created and assigned to an axis like this:

Definicja w linii 1776 pliku qcustomplot.h.

Dokumentacja składowych wyliczanych

◆ FractionStyle

Defines how fractions should be displayed in tick labels.

Zobacz również
setFractionStyle
Wartości wyliczeń
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.

Definicja w linii 1785 pliku qcustomplot.h.

Dokumentacja konstruktora i destruktora

◆ QCPAxisTickerPi()

QCPAxisTickerPi::QCPAxisTickerPi ( )

Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker.

Definicja w linii 6740 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

Dokumentacja funkcji składowych

◆ fractionStyle()

FractionStyle QCPAxisTickerPi::fractionStyle ( ) const
inline

Definicja w linii 1797 pliku qcustomplot.h.

◆ fractionToString()

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

Definicja w linii 6893 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ getSubTickCount()

int QCPAxisTickerPi::getSubTickCount ( double  tickStep)
protectedvirtual

Reimplementowana z QCPAxisTicker.

Definicja w linii 6818 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ getTickLabel()

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

Reimplementowana z QCPAxisTicker.

Definicja w linii 6831 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ getTickStep()

double QCPAxisTickerPi::getTickStep ( const QCPRange range)
protectedvirtual

Reimplementowana z QCPAxisTicker.

Definicja w linii 6803 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ periodicity()

bool QCPAxisTickerPi::periodicity ( ) const
inline

Definicja w linii 1796 pliku qcustomplot.h.

◆ piSymbol()

QString QCPAxisTickerPi::piSymbol ( ) const
inline

Definicja w linii 1794 pliku qcustomplot.h.

◆ piValue()

double QCPAxisTickerPi::piValue ( ) const
inline

Definicja w linii 1795 pliku qcustomplot.h.

◆ setFractionStyle()

void QCPAxisTickerPi::setFractionStyle ( QCPAxisTickerPi::FractionStyle  style)

Sets how the numerical/fractional part preceding the symbolic constant is displayed in tick labels. See FractionStyle for the various options.

Definicja w linii 6790 pliku qcustomplot.cpp.

◆ setPeriodicity()

void QCPAxisTickerPi::setPeriodicity ( int  multiplesOfPi)

Sets whether the axis labels shall appear periodicly and if so, at which multiplicity of the symbolic constant.

To disable periodicity, set multiplesOfPi to zero.

For example, an axis that identifies 0 with 2pi would set multiplesOfPi to two.

Definicja w linii 6781 pliku qcustomplot.cpp.

◆ setPiSymbol()

void QCPAxisTickerPi::setPiSymbol ( QString  symbol)

Sets how the symbol part (which is always a suffix to the number) shall appear in the axis tick label.

If a space shall appear between the number and the symbol, make sure the space is contained in symbol.

Definicja w linii 6757 pliku qcustomplot.cpp.

◆ setPiValue()

void QCPAxisTickerPi::setPiValue ( double  pi)

Sets the numerical value that the symbolic constant has.

This will be used to place the appropriate fractions of the symbol at the respective axis coordinates.

Definicja w linii 6768 pliku qcustomplot.cpp.

◆ simplifyFraction()

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

Definicja w linii 6866 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ unicodeFraction()

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

Definicja w linii 6949 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ unicodeSubscript()

QString QCPAxisTickerPi::unicodeSubscript ( int  number) const
protected

Definicja w linii 6985 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ unicodeSuperscript()

QString QCPAxisTickerPi::unicodeSuperscript ( int  number) const
protected

Definicja w linii 6959 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

Dokumentacja atrybutów składowych

◆ mFractionStyle

FractionStyle QCPAxisTickerPi::mFractionStyle
protected

Definicja w linii 1810 pliku qcustomplot.h.

◆ mPeriodicity

int QCPAxisTickerPi::mPeriodicity
protected

Definicja w linii 1809 pliku qcustomplot.h.

◆ mPiSymbol

QString QCPAxisTickerPi::mPiSymbol
protected

Definicja w linii 1807 pliku qcustomplot.h.

◆ mPiTickStep

double QCPAxisTickerPi::mPiTickStep
protected

Definicja w linii 1813 pliku qcustomplot.h.

◆ mPiValue

double QCPAxisTickerPi::mPiValue
protected

Definicja w linii 1808 pliku qcustomplot.h.


Dokumentacja dla tej klasy została wygenerowana z plików: