Value3DAxis QML Type
操纵图形的坐标轴。更多
Import Statement: | import QtGraphs |
In C++: | QValue3DAxis |
Inherits: |
- 所有成员(包括继承成员)的列表
- Value3DAxis 是Qt Graphs QML Types for 3D 的一部分。
属性
- autoAdjustRange : bool
- formatter : Value3DAxisFormatter
- labelAutoAngle : real
- labelFormat : string
- labelSize : real
(since 6.9)
- labels : list
- labelsVisible : bool
- max : real
- min : real
- orientation : Abstract3DAxis.AxisOrientation
- reversed : bool
- scaleLabelsByCount : bool
(since 6.9)
- segmentCount : qsizetype
- subSegmentCount : qsizetype
- title : string
- titleFixed : bool
- titleOffset : real
- titleVisible : bool
- type : Abstract3DAxis.AxisType
信号
- autoAdjustRangeChanged(bool autoAdjust)
- formatterChanged(Value3DAxisFormatter formatter)
- labelAutoAngleChanged(real angle)
- labelFormatChanged(string format)
- labelSizeChanged(real size)
- labelVisibilityChanged(bool visible)
- labelsChanged()
- maxChanged(real value)
- minChanged(real value)
- orientationChanged(AxisOrientation orientation)
- rangeChanged(real min, real max)
- reversedChanged(bool enable)
- scaleLabelsByCountChanged(bool adjust)
- segmentCountChanged(qsizetype count)
- subSegmentCountChanged(qsizetype count)
- titleChanged(string newTitle)
- titleFixedChanged(bool fixed)
- titleOffsetChanged(real offset)
- titleVisibilityChanged(bool visible)
详细说明
该类型提供了一个坐标轴,可以给定数值范围以及用于划分范围的段和子段计数。
属性文档
autoAdjustRange : bool |
定义坐标轴是否会自动调整范围,以便所有数据都适合该范围。
formatter : Value3DAxisFormatter |
要使用的坐标轴格式。设置新格式时,任何现有格式都将被删除。
labelAutoAngle : real |
当摄像机角度发生变化时,标签可以自动旋转的最大角度。角度范围为 0 至 90(含 90)。默认值为 0。如果该值为 0,轴标签不会自动旋转。如果该值大于 0,标签会尝试朝向摄像机,直至达到指定角度。
labelFormat : string |
该轴标签的标签格式。
格式字符串支持printf()
在标准 C++ 库中提供的下列转换指定符、长度修饰符和标志:d、i、o、x、X、f、F、e、E、g、G、c。
如果GraphsItem3D::locale 不是"C"
,则支持的指定符仅限于:d、e、E、f、g、G 和 i。此外,只支持精度修饰符。其余格式来自应用程序的默认Locale 。
另请参阅 GraphsItem3D::locale 。
labelSize : real |
labels : list |
轴的标签。
注意: 为Value3DAxis 设置该属性没有任何作用,因为它会自动生成标签。
labelsVisible : bool |
定义坐标轴标签是否在主图形视图中可见。
默认值为true
。
max : real |
轴上的最大值。设置此属性时,必要时会调整最小值,以便范围保持有效。
min : real |
坐标轴上的最小值。设置此属性时,必要时会调整最大值,使范围保持有效。
orientation : Abstract3DAxis.AxisOrientation |
轴的方向。
reversed : bool |
如果true
,轴将反向渲染。也就是说,在渲染图形时,最小值和最大值的位置会互换。此属性不会影响坐标轴的实际最小值和最大值。
segmentCount : qsizetype |
坐标轴上的线段数。这表示要绘制多少个标签。要绘制的网格线数按以下公式计算:segments * subsegments + 1
.预设默认值为5
。该值不能低于1
。
subSegmentCount : qsizetype |
轴上每个线段内部的子线段数。除每个线段外,每个子线段之间也会绘制网格线。预设默认值为1
。该值不能低于1
。
title : string |
轴的标题。
另请参阅 titleVisible 和titleFixed 。
titleFixed : bool |
轴标题的旋转。
如果false
,主图视图中的轴标题将与轴标签一样朝摄像机方向旋转。如果为true
,轴标题只会绕轴旋转,而不会朝向摄像机。如果labelAutoAngle 属性值为零,则此属性不会有任何影响。默认值为true
。
另请参阅 labelAutoAngle 、title 和titleVisible 。
titleOffset : real |
titleVisible : bool |
type : Abstract3DAxis.AxisType |
轴的类型。
信号文档
autoAdjustRangeChanged(bool autoAdjust) |
当autoAdjustRange 属性值更改为autoAdjust 时,将发出该信号。
注: 相应的处理程序是onAutoAdjustRangeChanged
。
formatterChanged(Value3DAxisFormatter formatter) |
当formatter 变为formatter 时,发出该信号。
注: 相应的处理程序是onFormatterChanged
。
labelAutoAngleChanged(real angle) |
当标签旋转角度变为angle 时,发出该信号。
注: 相应的处理程序是onLabelAutoAngleChanged
。
labelFormatChanged(string format) |
当labelFormat 变更为format 时,发出该信号。
注: 相应的处理程序是onLabelFormatChanged
。
labelVisibilityChanged(bool visible) |
当标签可见性变为visible 时,发出该信号。
注: 相应的处理程序为onLabelVisibilityChanged
。
labelsChanged() |
轴标签更改时发出该信号。
注: 相应的处理程序是onLabelsChanged
。
maxChanged(real value) |
当轴的最大值变为value 时,发出该信号。
注: 相应的处理程序是onMaxChanged
。
minChanged(real value) |
当坐标轴的最小值变为value 时,将发出该信号。
注: 相应的处理程序是onMinChanged
。
orientationChanged(AxisOrientation orientation) |
当轴的方向值变为orientation 时,发出此信号。
注: 相应的处理程序是onOrientationChanged
。
scaleLabelsByCountChanged(bool adjust) |
当scaleLabelsByCount 属性值更改为adjust 时,将发出此信号。
注: 相应的处理程序是onScaleLabelsByCountChanged
。
segmentCountChanged(qsizetype count) |
当segmentCount 变更为count 时,发出该信号。
注: 相应的处理程序是onSegmentCountChanged
。
subSegmentCountChanged(qsizetype count) |
当subSegmentCount 变更为count 时,发出该信号。
注: 相应的处理程序是onSubSegmentCountChanged
。
titleFixedChanged(bool fixed) |
当titleFixed 属性值更改为fixed 时,发出此信号。
注: 相应的处理程序是onTitleFixedChanged
。
titleOffsetChanged(real offset) |
当titleOffset 属性值更改为offset 时,发出该信号。
注: 相应的处理程序是onTitleOffsetChanged
。
titleVisibilityChanged(bool visible) |
当标题可见性变为visible 时,发出该信号。
注: 相应的处理程序是onTitleVisibilityChanged
。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.