15#ifndef QCP_AXIS_TICKER_SI_H
16#define QCP_AXIS_TICKER_SI_H
18#include <ui/qt/widgets/qcustomplot.h>
72 virtual QString
getTickLabel(
double tick,
const QLocale &locale, QChar formatChar,
int precision)
override;
95 virtual QVector<double>
createTickVector(
double tickStep,
const QCPRange &range)
override;
QCPAxisTickerLog specialisation that formats tick labels using SI (metric) prefixes and Wireshark siz...
Definition qcp_axis_ticker_si.h:28
format_size_units_e mUnit
Definition qcp_axis_ticker_si.h:97
format_size_units_e getUnit() const
Returns the current unit system used for label formatting.
Definition qcp_axis_ticker_si.h:43
virtual int getSubTickCount(double tickStep) override
Returns the number of sub-ticks to place between two major ticks.
Definition qcp_axis_ticker_si.cpp:43
void setLog(bool log)
Enables or disables logarithmic tick spacing.
Definition qcp_axis_ticker_si.cpp:71
virtual QVector< double > createTickVector(double tickStep, const QCPRange &range) override
Generates the vector of major tick positions for the given range.
Definition qcp_axis_ticker_si.cpp:52
void setCustomUnit(QString unit)
Sets a custom unit suffix used when the unit is FORMAT_SIZE_UNIT_CUSTOM.
Definition qcp_axis_ticker_si.cpp:66
virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) override
Returns the SI-prefixed, unit-annotated label for the tick at tick.
Definition qcp_axis_ticker_si.cpp:27
QString mCustomUnit
Definition qcp_axis_ticker_si.h:98
bool mLog
Definition qcp_axis_ticker_si.h:99
void setUnit(format_size_units_e unit)
Sets the unit system used for label formatting and invalidates cached ticks.
Definition qcp_axis_ticker_si.cpp:61
format_size_units_e
Unit types used by format_size_wmem() for formatting size values.
Definition str_util.h:327
@ FORMAT_SIZE_UNIT_PACKETS
Definition str_util.h:339