QLogValueAxis Class

The QLogValueAxis class adds a logarithmic scale to a chart's axis. 更多...

头: #include <QLogValueAxis>
实例化: LogValueAxis
继承: QAbstractAxis

特性

公共函数

QLogValueAxis (QObject * parent = nullptr)
virtual ~QLogValueAxis ()
qreal base () const
QString labelFormat () const
qreal max () const
qreal min () const
int minorTickCount () const
void setBase (qreal base )
void setLabelFormat (const QString & format )
void setMax (qreal max )
void setMin (qreal min )
void setMinorTickCount (int minorTickCount )
void setRange (qreal min , qreal max )
int tickCount () const

重实现公共函数

virtual QAbstractAxis::AxisType type () const

信号

void baseChanged (qreal base )
void labelFormatChanged (const QString & format )
void maxChanged (qreal max )
void minChanged (qreal min )
void minorTickCountChanged (int minorTickCount )
void rangeChanged (qreal min , qreal max )
void tickCountChanged (int tickCount )

静态公共成员

const QMetaObject staticMetaObject

额外继承成员

详细描述

The QLogValueAxis class adds a logarithmic scale to a chart's axis.

A logarithmic scale is a nonlinear scale that is based on orders of magnitude, so that each tick mark on the axis is the previous tick mark multiplied by a value.

注意: QLogValueAxis is attached to a series with one or more points with negative or zero values on the associated dimension, the series will not be plotted at all. This is particularly relevant when XYModelMappers are used, since empty cells in models typically contain zero values.

特性文档编制

base : qreal

This property holds the base of the logarithm.

The value has to be greater than 0 and cannot equal 1.

访问函数:

qreal base () const
void setBase (qreal base )

通知程序信号:

void baseChanged (qreal base )

labelFormat : QString

此特性保持轴的标签格式。

格式字符串支持的以下转换说明符、长度修饰符和标志的提供通过 printf() 在标准 C++ 库:d、i、o、x、X、f、F、e、E、g、G、c。

QChart::localizeNumbers is true ,支持的说明符限于:d、e、E、f、g、G 和 i。另外,仅支持精度修饰符。其余格式来自默认 QLocale 对于应用程序。

访问函数:

QString labelFormat () const
void setLabelFormat (const QString & format )

通知程序信号:

void labelFormatChanged (const QString & format )

另请参阅 QString::asprintf ().

max : qreal

此特性保持轴的最大值。

When setting this property, the minimum value is adjusted if necessary, to ensure that the range remains valid. The value has to be greater than 0.

访问函数:

qreal max () const
void setMax (qreal max )

通知程序信号:

void maxChanged (qreal max )

min : qreal

此特性保持轴的最小值。

When setting this property, the maximum value is adjusted if necessary, to ensure that the range remains valid. The value has to be greater than 0.

访问函数:

qreal min () const
void setMin (qreal min )

通知程序信号:

void minChanged (qreal min )

minorTickCount : int

This property holds the number of minor tick marks on the axis. This indicates how many grid lines are drawn between major ticks on the chart. Labels are not drawn for minor ticks. The default value is 0. Set the value to -1 and the number of grid lines between major ticks will be calculated automatically.

访问函数:

int minorTickCount () const
void setMinorTickCount (int minorTickCount )

通知程序信号:

void minorTickCountChanged (int minorTickCount )

tickCount : const int

This property holds the number of tick marks on the axis. This indicates how many grid lines are drawn on the chart. This value is read-only.

访问函数:

int tickCount () const

通知程序信号:

void tickCountChanged (int tickCount )

成员函数文档编制

QLogValueAxis:: QLogValueAxis ( QObject * parent = nullptr)

Constructs an axis object that is a child of parent .

[虚拟] QLogValueAxis:: ~QLogValueAxis ()

销毁对象。

[signal] void QLogValueAxis:: baseChanged ( qreal base )

此信号发射当 base of the logarithm of the axis changes.

注意: 通知程序信号对于特性 base .

[signal] void QLogValueAxis:: labelFormatChanged (const QString & format )

此信号发射当 format 对于轴标签改变。

注意: 通知程序信号对于特性 labelFormat .

[signal] void QLogValueAxis:: maxChanged ( qreal max )

This signal is emitted when the maximum value of the axis, specified by max ,改变。

注意: 通知程序信号对于特性 max .

[signal] void QLogValueAxis:: minChanged ( qreal min )

This signal is emitted when the minimum value of the axis, specified by min ,改变。

注意: 通知程序信号对于特性 min .

[signal] void QLogValueAxis:: minorTickCountChanged ( int minorTickCount )

This signal is emitted when the number of minor tick marks on the axis, specified by minorTickCount ,改变。

注意: 通知程序信号对于特性 minorTickCount .

[signal] void QLogValueAxis:: rangeChanged ( qreal min , qreal max )

This signal is emitted when the minimum or maximum value of the axis, specified by min and max ,改变。

void QLogValueAxis:: setRange ( qreal min , qreal max )

设置范围从 min to max 在轴。若 min 大于 max ,此函数返回不做任何改变。

[signal] void QLogValueAxis:: tickCountChanged ( int tickCount )

This signal is emitted when the number of tick marks on the axis, specified by tickCount ,改变。

注意: 通知程序信号对于特性 tickCount .

[虚拟] QAbstractAxis::AxisType QLogValueAxis:: type () const

重实现自 QAbstractAxis::type ().

返回轴的类型。