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 ().

返迴軸的類型。