Spline3DSeries QML Type (Uncreatable)
表示三维样条图中的数据序列。更多...
| Import Statement: | import QtGraphs |
| Since: | Qt 6.9 |
| In C++: | QSpline3DSeries |
| Inherits: |
注意:此类型不可创建。无法在 QML 中实例化。
- 所有成员列表(包括继承的成员)
- Spline3DSeries 属于Qt Graphs 的3D QML 类型。
属性
- baseColor : color
- baseGradient : Gradient
- colorStyle : GraphsTheme.ColorStyle
- itemLabel : string
- itemLabelFormat : string
- itemLabelVisible : bool
- lightingMode : Abstract3DSeries.LightingMode
(since 6.10) - mesh : Abstract3DSeries.Mesh
- meshRotation : quaternion
- meshSmooth : bool
- multiHighlightColor : color
- multiHighlightGradient : Gradient
- name : string
- singleHighlightColor : color
- singleHighlightGradient : Gradient
- splineColor : color
- splineKnotting : real
- splineLooping : bool
- splineResolution : int
- splineTension : real
- splineVisible : bool
- type : Abstract3DSeries.SeriesType
- userDefinedMesh : string
- visible : bool
信号
- baseColorChanged(color color)
- baseGradientChanged(Gradient gradient)
- colorStyleChanged(GraphsTheme.ColorStyle style)
- itemLabelChanged(string label)
- itemLabelFormatChanged(string format)
- itemLabelVisibilityChanged(bool visible)
- lightingModeChanged(Abstract3DSeries.LightingMode lightingMode)
(since 6.10) - meshChanged(Abstract3DSeries.Mesh mesh)
- meshRotationChanged(quaternion rotation)
- meshSmoothChanged(bool enabled)
- multiHighlightColorChanged(color color)
- multiHighlightGradientChanged(Gradient gradient)
- nameChanged(string name)
- singleHighlightColorChanged(color color)
- singleHighlightGradientChanged(Gradient gradient)
- userDefinedMeshChanged(string fileName)
- visibilityChanged(bool visible)
方法
- void setMeshAxisAndAngle(vector3d axis, real angle)
详细说明
样条图用于将信息以一系列数据点的形式呈现,这些数据点通过曲线或直线的Catmull-Rom样条连接起来。
此类控件负责管理样条曲线特有的视觉元素。
属性文档
baseColor : color
该系列的基础色。
另请参阅 colorStyle 和GraphsTheme.seriesColors 。
baseGradient : Gradient
该系列的基底梯度。
另请参阅 colorStyle 。
colorStyle : GraphsTheme.ColorStyle
该系列的配色风格。
另请参阅 GraphsTheme.ColorStyle 。
itemLabel : string [read-only]
已格式化的项目标签。如果未选中任何项目,或者所选项目不可见,则返回一个空字符串。
另请参阅 itemLabelFormat 。
itemLabelFormat : string
该系列中数据项的标签格式。此格式用于单个数据项的标签,例如在选中某项时。该格式的解释方式取决于系列类型。
另请参阅 Bar3DSeries 、Scatter3DSeries 和Surface3DSeries 。
itemLabelVisible : bool
如果true ,则项目标签将在图中作为浮动标签绘制。否则,项目标签不会被绘制。若要在外部控件中显示项目标签,应将此属性设置为false 。默认值为true 。
另请参阅 itemLabelFormat 和itemLabel 。
lightingMode : Abstract3DSeries.LightingMode [since 6.10]
该系列中项目的照明模式。默认值为QAbstract3DSeries::LightingMode::Shaded
该属性自 Qt 6.10 起引入。
另请参阅 QAbstract3DSeries::LightingMode 。
mesh : Abstract3DSeries.Mesh
该系列中各项的网格,或者在Surface3DSeries 的情况下为选择指针。如果网格为Abstract3DSeries.Mesh.UserDefined ,则必须同时设置userDefinedMesh 属性,才能使各项正常渲染。默认值取决于图形类型。
另请参阅 QAbstract3DSeries::Mesh 。
meshRotation : quaternion
应用于该系列所有项的网格旋转。旋转应为归一化的四元数。对于支持单项旋转的系列类型,各项的旋转值将相乘。Bar3DSeries 会忽略任何非围绕 y 轴的旋转。Surface3DSeries 仅对选择指针应用旋转。默认不进行旋转。
meshSmooth : bool
如果true ,则使用通过mesh 属性设置的预定义网格的平滑版本。当网格设置为Abstract3DSeries.Mesh.UserDefined 时,此属性不会影响所使用的自定义网格。默认值为false 。
multiHighlightColor : color
该系列中多个项目的突出显示颜色。
另请参阅 colorStyle 和GraphsTheme.multiHighlightColor 。
multiHighlightGradient : Gradient
该系列中多个项目的高亮渐变效果。
另请参阅 colorStyle 和GraphsTheme.multiHighlightGradient 。
name : string
系列名称。可使用标签@seriesName 以项目标签格式显示。
另请参阅 itemLabelFormat 。
singleHighlightColor : color
该系列的单个项目高亮颜色。
另请参阅 colorStyle 和GraphsTheme.singleHighlightColor 。
singleHighlightGradient : Gradient
该系列中单件商品的渐变色效果。
另请参阅 colorStyle 和GraphsTheme.singleHighlightGradient 。
splineColor : color
样条线的颜色。
splineKnotting : real
样条的结点参数化。
该参数可改变曲线的轮廓。当值为0.0 时,样条被归类为均匀 Catmull-Rom 样条;当值为0.5 时,被归类为向心 Catmull-Rom 样条;当值为1.0 时,被归类为弦 Catmull-Rom 样条。
该值必须介于0.0 和1.0 之间。默认值为0.5 。
splineLooping : bool
确定样条曲线是否形成闭合环。
这会在序列的第一个点和最后一个点之间添加一个样条线段,从而将样条线连接成一个闭合环。
默认值为false
splineResolution : int
样条曲线的段数。
每个样条段的顶点数,其中样条段被定义为两个点之间的部分。
该值必须大于2 。默认值为10 。
splineTension : real
样条曲线的张力。
当0.0 时,样条曲线为各段采用最大曲率;当1.0 时,各段完全呈直线;该值必须介于0.0 和1.0 之间。默认值为0.0
splineVisible : bool
样条曲线的可见性。默认值为true 。
type : Abstract3DSeries.SeriesType [read-only]
序列的类型。QAbstract3DSeries::SeriesType 中的某个值。
userDefinedMesh : string
当使用mesh 时,用于对象的用户自定义网格的文件名为Abstract3DSeries.Mesh.UserDefined 。
注意:该文件 必须采用QtQuick3D 网格格式。请使用balsam 转换工具,将其他 3D 模型格式转换为网格。
visible : bool
该系列的可见性。如果false ,则该系列不会被渲染。
Signal 文档
baseColorChanged(color color)
当baseColor 变为color 时,会触发此信号。
注意: 相应的处理程序 是onBaseColorChanged 。
baseGradientChanged(Gradient gradient)
当baseGradient 变为gradient 时,会触发此信号。
注意: 相应的处理程序 是onBaseGradientChanged 。
colorStyleChanged(GraphsTheme.ColorStyle style)
当colorStyle 变为style 时,会触发此信号。
注意: 相应的处理程序 是onColorStyleChanged 。
itemLabelChanged(string label)
当itemLabel 变为label 时,会触发此信号。
注意: 相应的处理程序 是onItemLabelChanged 。
itemLabelFormatChanged(string format)
当itemLabelFormat 变为format 时,会触发此信号。
注意: 相应的处理程序 是onItemLabelFormatChanged 。
itemLabelVisibilityChanged(bool visible)
当 itemLabelVisibility 变为visible 时,会触发此信号。
注意: 相应的处理程序 为 `onItemLabelVisibilityChanged`。
[since 6.10] lightingModeChanged(Abstract3DSeries.LightingMode lightingMode)
当lightingMode 变为lightingMode 时,会触发此信号。
注意: 相应的处理程序 是onLightingModeChanged 。
该信号于 Qt 6.10 中引入。
meshChanged(Abstract3DSeries.Mesh mesh)
当mesh 变为mesh 时,会触发此信号。
注意: 对应的处理程序 是onMeshChanged 。
meshRotationChanged(quaternion rotation)
当meshRotation 变为rotation 时,会触发此信号。
注意: 相应的处理程序 是onMeshRotationChanged 。
meshSmoothChanged(bool enabled)
当meshSmooth 变为enabled 时,会触发此信号。
注意: 相应的处理程序 是onMeshSmoothChanged 。
multiHighlightColorChanged(color color)
当multiHighlightColor 变为color 时,会触发此信号。
注意: 相应的处理程序 是onMultiHighlightColorChanged 。
multiHighlightGradientChanged(Gradient gradient)
当multiHighlightGradient 变为gradient 时,会触发此信号。
注意: 对应的处理程序 是onMultiHighlightGradientChanged 。
nameChanged(string name)
当name 变为name 时,会触发此信号。
注意: 相应的处理程序 是onNameChanged 。
singleHighlightColorChanged(color color)
当singleHighlightColor 变为color 时,会触发此信号。
注意: 相应的处理程序 是onSingleHighlightColorChanged 。
singleHighlightGradientChanged(Gradient gradient)
当singleHighlightGradient 变为gradient 时,会触发此信号。
注意: 相应的处理程序 是onSingleHighlightGradientChanged 。
userDefinedMeshChanged(string fileName)
当userDefinedMesh 变为fileName 时,将触发此信号。
注意: 相应的处理程序 是onUserDefinedMeshChanged 。
visibilityChanged(bool visible)
当该系列的可见性变为“visible ”时,会发出此信号。
注意: 相应的处理程序 为onVisibilityChanged 。
方法文档
void setMeshAxisAndAngle(vector3d axis, real angle)
一个便捷函数,用于根据axis 和angle 构建网格旋转四元数。
另请参阅 meshRotation 。
© 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.