QAbstract3DAxis Class
The QAbstract3DAxis class is a base class for the axes of a graph. 更多...
头文件: | #include <QAbstract3DAxis> |
开始支持版本: | QtDataVisualization 1.0 |
Instantiated By: | AbstractAxis3D |
基类: | QObject |
派生类: |
公有类型
enum | AxisOrientation { AxisOrientationNone, AxisOrientationX, AxisOrientationY, AxisOrientationZ } |
enum | AxisType { AxisTypeNone, AxisTypeCategory, AxisTypeValue } |
属性
|
|
- 1 个属性继承自 QObject
公有函数
virtual | ~QAbstract3DAxis() |
bool | isAutoAdjustRange() const |
bool | isTitleFixed() const |
bool | isTitleVisible() const |
float | labelAutoRotation() const |
QStringList | labels() const |
float | max() const |
float | min() const |
AxisOrientation | orientation() const |
void | setAutoAdjustRange(bool autoAdjust) |
void | setLabelAutoRotation(float angle) |
void | setLabels(const QStringList &labels) |
void | setMax(float max) |
void | setMin(float min) |
void | setRange(float min, float max) |
void | setTitle(const QString &title) |
void | setTitleFixed(bool fixed) |
void | setTitleVisible(bool visible) |
QString | title() const |
AxisType | type() const |
- 32 个公有函数继承自 QObject
信号
void | autoAdjustRangeChanged(bool autoAdjust) |
void | labelAutoRotationChanged(float angle) |
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 | titleVisibilityChanged(bool visible) |
- 2 个信号继承自 QObject
其他继承的成员
- 1 个公有槽函数继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
The QAbstract3DAxis class is a base class for the axes of a graph.
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 QAbstract3DAxis::AxisOrientation
The orientation of the axis object.
Constant | Value |
---|---|
QAbstract3DAxis::AxisOrientationNone | 0 |
QAbstract3DAxis::AxisOrientationX | 1 |
QAbstract3DAxis::AxisOrientationY | 2 |
QAbstract3DAxis::AxisOrientationZ | 4 |
enum QAbstract3DAxis::AxisType
The type of the axis object.
Constant | Value |
---|---|
QAbstract3DAxis::AxisTypeNone | 0 |
QAbstract3DAxis::AxisTypeCategory | 1 |
QAbstract3DAxis::AxisTypeValue | 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) |
Notifier signal:
void | autoAdjustRangeChanged(bool autoAdjust) |
参见 setRange(), setMin(), and setMax().
labelAutoRotation : 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 | labelAutoRotation() const |
void | setLabelAutoRotation(float angle) |
Notifier signal:
void | labelAutoRotationChanged(float angle) |
labels : QStringList
This property holds the labels for the axis.
Note: Setting this property for QValue3DAxis does nothing, as it generates labels automatically.
访问函数:
QStringList | labels() const |
void | setLabels(const QStringList &labels) |
Notifier signal:
void | labelsChanged() |
max : float
This property holds the maximum value on the axis.
When setting this property, the minimum value is adjusted if necessary, to ensure that the range remains valid.
Note: For QCategory3DAxis, specifies the index of the last row or column to show.
访问函数:
float | max() const |
void | setMax(float max) |
Notifier signal:
void | maxChanged(float value) |
min : float
This property holds the minimum value on the axis.
When setting this property, the maximum value is adjusted if necessary, to ensure that the range remains valid.
Note: For QCategory3DAxis, specifies the index of the first row or column to show.
访问函数:
float | min() const |
void | setMin(float min) |
Notifier signal:
void | minChanged(float value) |
orientation : const AxisOrientation
This property holds the orientation of the axis.
The value is one of AxisOrientation values.
访问函数:
AxisOrientation | orientation() const |
Notifier signal:
void | orientationChanged(QAbstract3DAxis::AxisOrientation orientation) |
title : QString
This property holds the title for the axis.
访问函数:
QString | title() const |
void | setTitle(const QString &title) |
Notifier signal:
void | titleChanged(const QString &newTitle) |
参见 titleVisible and titleFixed.
titleFixed : bool
This property holds the rotation of the axis titles.
If true
, axis titles in the primary graph view will be rotated towards the camera similarly to the axis labels. If false
, 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 labelAutoRotation property value is zero. Default value is true
.
访问函数:
bool | isTitleFixed() const |
void | setTitleFixed(bool fixed) |
Notifier signal:
void | titleFixedChanged(bool fixed) |
参见 labelAutoRotation, title, and titleVisible.
titleVisible : bool
This property holds whether the axis title is visible in the primary graph view.
The default value is false
.
访问函数:
bool | isTitleVisible() const |
void | setTitleVisible(bool visible) |
Notifier signal:
void | titleVisibilityChanged(bool visible) |
参见 title and titleFixed.
type : const AxisType
This property holds the type of the axis.
The value is one of AxisType values.
访问函数:
AxisType | type() const |
成员函数
[virtual]
QAbstract3DAxis::~QAbstract3DAxis()
Destroys QAbstract3DAxis.
[signal]
void QAbstract3DAxis::rangeChanged(float min, float max)
Emits the minimum and maximum values of the range, min and max, when the range changes.
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.
Note: For QCategory3DAxis, specifies the index range of rows or columns to show.