QValue3DAxis Class

The QValue3DAxis class manipulates an axis of a graph. 更多...

头: #include <QValue3DAxis>
Since: QtDataVisualization 1.0
实例化: ValueAxis3D
继承: QAbstract3DAxis

特性

公共函数

  QValue3DAxis (QObject * parent = nullptr)
virtual ~QValue3DAxis ()
QValue3DAxisFormatter * formatter () const
QString labelFormat () const
bool reversed () const
int segmentCount () const
void setFormatter (QValue3DAxisFormatter * formatter )
void setLabelFormat (const QString & format )
void setReversed (bool enable )
void setSegmentCount (int count )
void setSubSegmentCount (int count )
int subSegmentCount () const

信号

void formatterChanged (QValue3DAxisFormatter * formatter )
void labelFormatChanged (const QString & format )
void reversedChanged (bool enable )
void segmentCountChanged (int count )
void subSegmentCountChanged (int count )

详细描述

A value axis can be given a range of values and segment and subsegment counts to divide the range into.

Labels are drawn between each segment. Grid lines are drawn between each segment and each subsegment.

注意: If visible, there will always be at least two grid lines and labels indicating the minimum and the maximum values of the range, as there is always at least one segment.

特性文档编制

[since QtDataVisualization 1.1] formatter : QValue3DAxisFormatter *

This property holds the axis formatter to be used.

Any existing formatter is deleted when a new formatter is set.

该特性在 QtDataVisualization 1.1 引入。

访问函数:

QValue3DAxisFormatter * formatter () const
void setFormatter (QValue3DAxisFormatter * formatter )

通知程序信号:

void formatterChanged (QValue3DAxisFormatter * formatter )

labelFormat : QString

This property holds the label format to be used for the labels on this axis.

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

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

用法范例:

axis->setLabelFormat("%.2f mm");

访问函数:

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

通知程序信号:

void labelFormatChanged (const QString & format )

另请参阅 formatter and QAbstract3DGraph::locale .

[since QtDataVisualization 1.1] reversed : bool

This property holds whether the axis is rendered in reverse.

true , the axis will be rendered in reverse, i.e. the positions of minimum and maximum values are swapped when the graph is rendered. This property doesn't affect the actual minimum and maximum values of the axis.

该特性在 QtDataVisualization 1.1 引入。

访问函数:

bool reversed () const
void setReversed (bool enable )

通知程序信号:

void reversedChanged (bool enable )

segmentCount : int

This property holds the number of segments on the axis.

This indicates how many labels are drawn. The number of grid lines to be drawn is calculated with formula: segments * subsegments + 1 . The preset default is 5 . The value cannot be below 1 .

访问函数:

int segmentCount () const
void setSegmentCount (int count )

通知程序信号:

void segmentCountChanged (int count )

另请参阅 setSubSegmentCount ().

subSegmentCount : int

This property holds the number of subsegments inside each segment on the axis.

Grid lines are drawn between each subsegment, in addition to each segment. The preset default is 1 . The value cannot be below 1 .

访问函数:

int subSegmentCount () const
void setSubSegmentCount (int count )

通知程序信号:

void subSegmentCountChanged (int count )

另请参阅 setSegmentCount ().

成员函数文档编制

QValue3DAxis:: QValue3DAxis ( QObject * parent = nullptr)

Constructs QValue3DAxis with the given parent .

[虚拟] QValue3DAxis:: ~QValue3DAxis ()

销毁 QValue3DAxis .