Value3DAxis QML Type
操作图表的某个坐标轴。更多...
| Import Statement: | import QtGraphs |
| In C++: | QValue3DAxis |
| Inherits: |
- 所有成员列表(包括继承的成员)
- Value3DAxis 是Qt Graphs 3D QML 类型的一部分。
属性
- 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 之间(含 0 和 90)。默认值为 0。如果该值为 0,坐标轴标签不会自动旋转。如果该值大于零,标签将尝试朝向摄像机调整方向,最大旋转角度不超过指定值。
labelFormat : string
该轴上标签应采用的标签格式。
该格式字符串支持标准 C++ 库中printf() 提供的以下转换指定符、长度修饰符和标志: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 [since 6.9]
标签的大小。该值的默认值为1.0 。
该属性在 Qt 6.9 中引入。
另请参阅 scaleLabelsByCount 。
labels : list
坐标的标签。
注意: 为Value3DAxis 设置 此属性不会产生任何效果,因为它会自动生成标签。
labelsVisible : bool
用于指定主图表视图中是否显示坐标轴标签。
默认值为true 。
max : real
轴上的最大值。设置此属性时,系统会根据需要调整最小值,以确保范围有效。
min : real
轴上的最小值。设置此属性时,系统会在必要时调整最大值,以确保范围保持有效。
orientation : Abstract3DAxis.AxisOrientation [read-only]
轴的方向。
reversed : bool
如果true ,则坐标轴将以反向方式渲染。也就是说,在绘制图表时,最小值和最大值的位置会被互换。此属性不会影响坐标轴的实际最小值和最大值。
scaleLabelsByCount : bool [since 6.9]
标签是否会根据标签总数自动调整大小。
该属性在 Qt 6.9 中引入。
另请参阅 labelSize 。
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
坐标轴上轴标题的位置。该值必须在-1.0f 与1.0f
默认值为0 。
另请参阅 title 和titleVisible 。
titleVisible : bool
用于指定在主图表视图中是否显示轴标题。
默认值为false 。
另请参阅 title 和titleFixed 。
type : Abstract3DAxis.AxisType [read-only]
轴的类型。
信号文档
autoAdjustRangeChanged(bool autoAdjust)
当autoAdjustRange 属性值变为autoAdjust 时,会触发此信号。
注意: 相应的处理程序 为onAutoAdjustRangeChanged 。
formatterChanged(Value3DAxisFormatter formatter)
当formatter 变为formatter 时,会触发此信号。
注意: 相应的处理程序 是onFormatterChanged 。
labelAutoAngleChanged(real angle)
当标签旋转角度变为angle 时,会触发此信号。
注意: 相应的处理程序 为onLabelAutoAngleChanged 。
labelFormatChanged(string format)
当labelFormat 变为format 时,会发出此信号。
注意: 对应的处理程序 是onLabelFormatChanged 。
labelSizeChanged(real size)
当labelSize 属性值变为size 时,会触发此信号。
注意: 对应的处理程序 为onLabelSizeChanged 。
labelVisibilityChanged(bool visible)
当标签的可见性变为“visible ”时,会触发此信号。
注意: 相应的处理程序 为onLabelVisibilityChanged 。
labelsChanged()
当坐标轴标签发生变化时,会触发此信号。
注意: 相应的处理程序 为onLabelsChanged 。
maxChanged(real value)
当坐标轴的最大值变为value 时,会发出此信号。
注意: 相应的处理程序 为onMaxChanged 。
minChanged(real value)
当坐标轴的最小值变为value 时,会发出此信号。
注意: 相应的处理程序 为onMinChanged 。
orientationChanged(AxisOrientation orientation)
当轴的方向发生变化时,会发出此信号,具体可参见orientation 。
注意: 相应的处理程序 为onOrientationChanged 。
rangeChanged(real min, real max)
当坐标轴范围发生变化时,会触发此信号。min 和max 分别是新范围的最小值和最大值。
注意: 对应的处理程序 为onRangeChanged 。
reversedChanged(bool enable)
当reversed 变为enable 时,会触发此信号。
注意: 相应的处理程序 是onReversedChanged 。
scaleLabelsByCountChanged(bool adjust)
当scaleLabelsByCount 属性值变为adjust 时,会触发此信号。
注意: 相应的处理程序 为onScaleLabelsByCountChanged 。
segmentCountChanged(qsizetype count)
当segmentCount 变为count 时,会触发此信号。
注意: 相应的处理程序 为onSegmentCountChanged 。
subSegmentCountChanged(qsizetype count)
当subSegmentCount 变为count 时,会触发此信号。
注意: 相应的处理程序 是onSubSegmentCountChanged 。
titleChanged(string newTitle)
当title 变为newTitle 时,会触发此信号。
注意: 对应的处理程序 是onTitleChanged 。
titleFixedChanged(bool fixed)
当titleFixed 属性值变为fixed 时,会触发此信号。
注意: 相应的处理程序 为onTitleFixedChanged 。
titleOffsetChanged(real offset)
当titleOffset 属性值变为offset 时,会触发此信号。
注意: 相应的处理程序 为onTitleOffsetChanged 。
titleVisibilityChanged(bool visible)
当标题可见性变为visible 时,会触发此信号。
注意: 相应的处理程序 为onTitleVisibilityChanged 。
© 2026 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.