QCPAxisTickerTime Class Reference

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

Inheritance diagram for QCPAxisTickerTime:
Collaboration diagram for QCPAxisTickerTime:

Public Types

enum  TimeUnit {
  tuMilliseconds, tuSeconds, tuMinutes, tuHours,
  tuDays
}
 
- Public Types inherited from QCPAxisTicker
enum  TickStepStrategy { tssReadability, tssMeetTickCount }
 

Public Member Functions

 QCPAxisTickerTime ()
 
QString timeFormat () const
 
int fieldWidth (TimeUnit unit) const
 
void setTimeFormat (const QString &format)
 
void setFieldWidth (TimeUnit unit, int width)
 
- 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 replaceUnit (QString &text, TimeUnit unit, int value) 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 mTimeFormat
 
QHash< TimeUnit, int > mFieldWidth
 
TimeUnit mSmallestUnit
 
TimeUnit mBiggestUnit
 
QHash< TimeUnit, QString > mFormatPattern
 
- Protected Attributes inherited from QCPAxisTicker
TickStepStrategy mTickStepStrategy
 
int mTickCount
 
double mTickOrigin
 

Member Enumeration Documentation

◆ TimeUnit

Defines the logical units in which fractions of time spans can be expressed.

See also
setFieldWidth, setTimeFormat
Enumerator
tuMilliseconds 

Milliseconds, one thousandth of a second (%z in setTimeFormat)

tuSeconds 

Seconds (%s in setTimeFormat)

tuMinutes 

Minutes (%m in setTimeFormat)

tuHours 

Hours (%h in setTimeFormat)

tuDays 

Days (%d in setTimeFormat)

Constructor & Destructor Documentation

◆ QCPAxisTickerTime()

QCPAxisTickerTime::QCPAxisTickerTime ( )

Member Function Documentation

◆ fieldWidth()

int QCPAxisTickerTime::fieldWidth ( TimeUnit  unit) const
inline

◆ getSubTickCount()

virtual int QCPAxisTickerTime::getSubTickCount ( double  tickStep)
protectedvirtual

Reimplemented from QCPAxisTicker.

◆ getTickLabel()

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

Reimplemented from QCPAxisTicker.

◆ getTickStep()

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

Reimplemented from QCPAxisTicker.

◆ replaceUnit()

void QCPAxisTickerTime::replaceUnit ( QString &  text,
TimeUnit  unit,
int  value 
) const
protected

◆ setFieldWidth()

void QCPAxisTickerTime::setFieldWidth ( TimeUnit  unit,
int  width 
)

◆ setTimeFormat()

void QCPAxisTickerTime::setTimeFormat ( const QString &  format)

◆ timeFormat()

QString QCPAxisTickerTime::timeFormat ( ) const
inline

Member Data Documentation

◆ mBiggestUnit

TimeUnit QCPAxisTickerTime::mBiggestUnit
protected

◆ mFieldWidth

QHash<TimeUnit, int> QCPAxisTickerTime::mFieldWidth
protected

◆ mFormatPattern

QHash<TimeUnit, QString> QCPAxisTickerTime::mFormatPattern
protected

◆ mSmallestUnit

TimeUnit QCPAxisTickerTime::mSmallestUnit
protected

◆ mTimeFormat

QString QCPAxisTickerTime::mTimeFormat
protected

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