QColorAxis 類

QColorAxis 類將色標顯示為圖錶軸之一。 更多...

頭: #include <QColorAxis>
Since: Qt 6.2
繼承: QAbstractAxis

特性

公共函數

virtual ~QColorAxis ()
bool autoRange () const
QLinearGradient gradient () const
qreal max () const
qreal min () const
void setAutoRange (bool autoRange )
void setGradient (const QLinearGradient & gradient )
void setMax (qreal max )
void setMin (qreal min )
void setSize (const qreal size )
void setTickCount (int count )
qreal size () const
int tickCount () const

信號

void autoRangeChanged (bool autoRange )
void maxChanged (qreal max )
void minChanged (qreal min )
void rangeChanged (qreal min , qreal max )
void sizeChanged (const qreal size )
void tickCountChanged (int tickCount )

詳細描述

A color axis can be set up to show a color scale based on the passed gradient. The scale has tick marks with labels based on data passed in QXYSeries::colorby method.

特性文檔編製

autoRange : bool

This property holds the property indicating if the range should be set from the list of values passed in QXYSeries::colorBy method or rather taken from the axis itself.

默認值為 true .

訪問函數:

bool autoRange () const
void setAutoRange (bool autoRange )

通知程序信號:

void autoRangeChanged (bool autoRange )

max : qreal

此特性保持軸的最大值。

When setting this property, the minimum value is adjusted if necessary, to ensure that the range remains valid.

訪問函數:

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.

訪問函數:

qreal min () const
void setMin (qreal min )

通知程序信號:

void minChanged (qreal min )

size : qreal

此特性保持色標的大小。

Depending on the alignment the value indicates either width or height.

訪問函數:

qreal size () const
void setSize (const qreal size )

通知程序信號:

void sizeChanged (const qreal size )

tickCount : int

This property holds the number of tick marks on the axis. This indicates how many grid lines are drawn on the chart if QColorAxis::gridVisible is equal to true . The default value is 5, and the number cannot be less than 2.

注意: Grid lines are intentionally invisible by default in QColorAxis as this type of axis does not represent geometric values.

訪問函數:

int tickCount () const
void setTickCount (int count )

通知程序信號:

void tickCountChanged (int tickCount )

成員函數文檔編製

[virtual noexcept] QColorAxis:: ~QColorAxis ()

銷毀對象。

[signal] void QColorAxis:: autoRangeChanged ( bool autoRange )

This signal is emitted when the auto range mode, specified by autoRange ,改變。

注意: 通知程序信號對於特性 autoRange .

QLinearGradient QColorAxis:: gradient () const

Returns the gradient currently used on the color scale.

注意: If the axis is attached to a series, the gradient is also used by the QXYSeries::colorBy 方法。

另請參閱 setGradient .

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

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

注意: 通知程序信號對於特性 max .

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

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

注意: 通知程序信號對於特性 min .

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

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

void QColorAxis:: setGradient (const QLinearGradient & gradient )

Sets the gradient on the color scale to gradient .

注意: If the axis is attached to a series, the gradient is also used by the QXYSeries::colorBy 方法。

另請參閱 gradient .

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

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

注意: 通知程序信號對於特性 tickCount .