QAbstract3DAxis 类

The QAbstract3DAxis class is a base class for the axes of a 3D graph. 更多...

头: #include <QAbstract3DAxis>
CMake: find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs)
qmake: QT += graphs
在 QML: Abstract3DAxis
继承: QObject
继承者:

QCategory3DAxis and QValue3DAxis

公共类型

枚举类 AxisOrientation { None, X, Y, Z }
枚举类 AxisType { None, Category, Value }

特性

公共函数

virtual ~QAbstract3DAxis () override
bool isAutoAdjustRange () const
bool isTitleFixed () const
bool isTitleVisible () const
float labelAutoAngle () const
QStringList labels () const
bool labelsVisible () const
float max () const
float min () const
QAbstract3DAxis::AxisOrientation orientation () const
void setAutoAdjustRange (bool autoAdjust )
void setLabelAutoAngle (float degree )
void setLabels (const QStringList & labels )
void setLabelsVisible (bool visible )
void setMax (float max )
void setMin (float min )
void setRange (float min , float max )
void setTitle (const QString & title )
void setTitleFixed (bool fixed )
void setTitleOffset (float offset )
void setTitleVisible (bool visible )
QString title () const
float titleOffset () const
QAbstract3DAxis::AxisType type () const

信号

void autoAdjustRangeChanged (bool autoAdjust )
void labelAutoAngleChanged (float angle )
void labelVisibleChanged (bool visible )
void labelsChanged ()
void maxChanged (float value )
void minChanged (float value )
void orientationChanged (QAbstract3DAxis::AxisOrientation orientation )
void rangeChanged (float min , float max )
void titleChanged (const QString & newTitle )
void titleFixedChanged (bool fixed )
void titleOffsetChanged (float offset )
void titleVisibleChanged (bool visible )

详细描述

This class specifies the enumerations, properties, and functions shared by graph axes. It should not be used directly, but one of its subclasses should be used instead.

另请参阅 QCategory3DAxis and QValue3DAxis .

成员类型文档编制

enum class QAbstract3DAxis:: AxisOrientation

轴对象的取向。

常量
QAbstract3DAxis::AxisOrientation::None 0
QAbstract3DAxis::AxisOrientation::X 1
QAbstract3DAxis::AxisOrientation::Y 2
QAbstract3DAxis::AxisOrientation::Z 3

enum class QAbstract3DAxis:: AxisType

轴对象的类型。

常量
QAbstract3DAxis::AxisType::None 0
QAbstract3DAxis::AxisType::Category 1
QAbstract3DAxis::AxisType::Value 2

特性文档编制

autoAdjustRange : bool

This property holds whether the axis will automatically adjust the range so that all data fits in it.

访问函数:

bool isAutoAdjustRange () const
void setAutoAdjustRange (bool autoAdjust )

通知程序信号:

void autoAdjustRangeChanged (bool autoAdjust )

另请参阅 setRange (), setMin (),和 setMax ().

labelAutoAngle : float

This property holds the maximum angle the labels can autorotate when the camera angle changes.

The angle can be between 0 and 90, inclusive. The default value is 0. If the value is 0, axis labels do not automatically rotate. If the value is greater than zero, labels attempt to orient themselves toward the camera, up to the specified angle.

访问函数:

float labelAutoAngle () const
void setLabelAutoAngle (float degree )

通知程序信号:

void labelAutoAngleChanged (float angle )

labels : QStringList

此特性保持轴的标签。

注意: Setting this property for QValue3DAxis does nothing, as it generates labels automatically.

访问函数:

QStringList labels () const
void setLabels (const QStringList & labels )

通知程序信号:

void labelsChanged ()

labelsVisible : bool

This property holds whether the axis labels are visible in the primary graph view.

默认值为 true .

访问函数:

bool labelsVisible () const
void setLabelsVisible (bool visible )

通知程序信号:

void labelVisibleChanged (bool visible )

max : float

此特性保持轴的最大值。

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

注意: For QCategory3DAxis , specifies the index of the last row or column to show.

访问函数:

float max () const
void setMax (float max )

通知程序信号:

void maxChanged (float value )

min : float

此特性保持轴的最小值。

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

注意: For QCategory3DAxis , specifies the index of the first row or column to show.

访问函数:

float min () const
void setMin (float min )

通知程序信号:

void minChanged (float value )

[read-only] orientation : const QAbstract3DAxis::AxisOrientation

此特性保持轴的取向。

The value is one of AxisOrientation 值。

访问函数:

QAbstract3DAxis::AxisOrientation orientation () const

通知程序信号:

void orientationChanged (QAbstract3DAxis::AxisOrientation orientation )

title : QString

此特性保持轴的标题。

访问函数:

QString title () const
void setTitle (const QString & title )

通知程序信号:

void titleChanged (const QString & newTitle )

另请参阅 titleVisible and titleFixed .

titleFixed : bool

此特性保持轴标题的旋转。

false , axis titles in the primary graph view will be rotated towards the camera similarly to the axis labels. If true , axis titles are only rotated around their axis but are not otherwise oriented towards the camera. This property does not have any effect if the labelAutoAngle 特性值为 0。默认值为 true .

访问函数:

bool isTitleFixed () const
void setTitleFixed (bool fixed )

通知程序信号:

void titleFixedChanged (bool fixed )

另请参阅 labelAutoAngle , title ,和 titleVisible .

titleOffset : float

The position of the axis title on the axis. The value must be between -1.0f and 1.0f

访问函数:

float titleOffset () const
void setTitleOffset (float offset )

通知程序信号:

void titleOffsetChanged (float offset )

另请参阅 title and titleFixed .

titleVisible : bool

此特性保持轴标题在首要图形视图中是否可见。

默认值为 false .

访问函数:

bool isTitleVisible () const
void setTitleVisible (bool visible )

通知程序信号:

void titleVisibleChanged (bool visible )

另请参阅 title and titleFixed .

[read-only] type : const QAbstract3DAxis::AxisType

此特性保持轴的类型。

The value is one of AxisType 值。

访问函数:

QAbstract3DAxis::AxisType type () const

成员函数文档编制

[override virtual noexcept] QAbstract3DAxis:: ~QAbstract3DAxis ()

销毁 QAbstract3DAxis .

[signal] void QAbstract3DAxis:: rangeChanged ( float min , float max )

Emits the minimum and maximum values of the range, min and max ,当范围改变时。

void QAbstract3DAxis:: setRange ( float min , float max )

Sets the value range of the axis from min to max . When setting the range, the maximum value is adjusted if necessary, to ensure that the range remains valid.

注意: For QCategory3DAxis , specifies the index range of rows or columns to show.