QValue3DAxis Class

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

头文件: #include <QValue3DAxis>
开始支持版本: QtDataVisualization 1.0
Instantiated By: ValueAxis3D
基类: QAbstract3DAxis

属性

公有函数

QValue3DAxis(QObject *parent = Q_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)

其他继承的成员

  • 1 个公有槽函数继承自 QObject
  • 1 个公有变量继承自 QObject
  • 10 个静态公有成员继承自 QObject
  • 9 个受保护的函数继承自 QObject
  • 2 个受保护的变量继承自 QObject

详细描述

The QValue3DAxis class manipulates an axis of a graph.

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.

Note: 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.

属性

formatter : QValue3DAxisFormatter *

This property holds the axis formatter to be used.

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

This property was introduced in QtDataVisualization 1.1.

访问函数:

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

Notifier signal:

void formatterChanged(QValue3DAxisFormatter *formatter)

labelFormat : QString

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

The format string supports the following conversion specifiers, length modifiers, and flags provided by printf() in the standard C++ library: d, i, o, x, X, f, F, e, E, g, G, c.

If QAbstract3DGraph::locale is anything else than "C", the supported specifiers are limited to: d, e, E, f, g, G, and i. Also, only the precision modifier is supported. The rest of the formatting comes from the default QLocale of the application.

Usage example:

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

访问函数:

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

Notifier signal:

void labelFormatChanged(const QString &format)

参见 formatter and QAbstract3DGraph::locale.

reversed : bool

This property holds whether the axis is rendered in reverse.

If 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.

This property was introduced in QtDataVisualization 1.1.

访问函数:

bool reversed() const
void setReversed(bool enable)

Notifier signal:

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)

Notifier signal:

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)

Notifier signal:

void subSegmentCountChanged(int count)

参见 setSegmentCount().

成员函数

QValue3DAxis::QValue3DAxis(QObject *parent = Q_NULLPTR)

Constructs QValue3DAxis with the given parent.

[virtual] QValue3DAxis::~QValue3DAxis()

Destroys QValue3DAxis.