QSpline3DSeries Class
QSpline3DSeries 类将数据序列表示为样条曲线。更多内容...
| 头文件: | #include <QSpline3DSeries> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Graphs) target_link_libraries(mytarget PRIVATE Qt6::Graphs) |
| qmake: | QT += graphs |
| 自: | Qt 6.9 |
| 在 QML 中: | Spline3DSeries |
| 继承自: | QScatter3DSeries |
- 所有成员列表(包括继承的成员)
- QSpline3DSeries 属于Qt Graphs 的3D C++ 类库。
属性
|
|
公共函数
| QSpline3DSeries(QObject *parent = nullptr) | |
| QSpline3DSeries(QScatterDataProxy *dataProxy, QObject *parent = nullptr) | |
| virtual | ~QSpline3DSeries() override |
| bool | isSplineLooping() const |
| bool | isSplineVisible() const |
| void | setSplineColor(QColor color) |
| void | setSplineKnotting(qreal knotting) |
| void | setSplineLooping(bool looping) |
| void | setSplineResolution(int resolution) |
| void | setSplineTension(qreal tension) |
| void | setSplineVisible(bool draw) |
| QColor | splineColor() const |
| qreal | splineKnotting() const |
| int | splineResolution() const |
| qreal | splineTension() const |
信号
| void | splineColorChanged(QColor color) |
| void | splineKnottingChanged(qreal knotting) |
| void | splineLoopingChanged(bool looping) |
| void | splineResolutionChanged(int resolution) |
| void | splineTensionChanged(qreal tension) |
| void | splineVisibilityChanged(bool visible) |
详细说明
样条图用于通过一条由曲线或直线Catmull-Rom样条连接的一系列数据点来展示信息。
该类管理样条特有的视觉元素。
Spline3DSeries 扩展了Scatter3DSeries API。
属性文档
splineColor : QColor
该属性用于指定样条线的颜色。
访问函数:
| QColor | splineColor() const |
| void | setSplineColor(QColor color) |
通知器信号:
| void | splineColorChanged(QColor color) |
splineKnotting : qreal
该属性存储了样条的结点参数化信息。
此参数可改变曲线的轮廓。当该值设为0.0 时,样条被归类为均匀 Catmull-Rom 样条;设为0.5 时,为向心 Catmull-Rom 样条;设为1.0 时,为弦 Catmull-Rom 样条。
该值必须介于0.0 和1.0 之间。默认值为0.5 。
访问函数:
| qreal | splineKnotting() const |
| void | setSplineKnotting(qreal knotting) |
通知信号:
| void | splineKnottingChanged(qreal knotting) |
splineLooping : bool
确定样条曲线是否形成闭合环。
这将在序列的第一个和最后一个点之间添加一个样条线段,将样条线连接成一个闭合环。
默认值为false
访问函数:
| bool | isSplineLooping() const |
| void | setSplineLooping(bool looping) |
通知信号:
| void | splineLoopingChanged(bool looping) |
splineResolution : int
该属性存储样条曲线各段的分辨率。
每个样条线段(定义为两点之间的部分)的顶点数。
该值必须大于2 。默认值为10 。
访问函数:
| int | splineResolution() const |
| void | setSplineResolution(int resolution) |
通知信号:
| void | splineResolutionChanged(int resolution) |
splineTension : qreal
该属性控制样条曲线的张力。
当该值设为0.0 时,样条曲线各段将采用最大曲率;当该值设为1.0 时,各段将完全呈直线;该值必须介于0.0 和1.0 之间。默认值为0.0
访问函数:
| qreal | splineTension() const |
| void | setSplineTension(qreal tension) |
通知信号:
| void | splineTensionChanged(qreal tension) |
splineVisible : bool
样条线的可见性。
样条线的可见性。默认值为true 。
访问函数:
| bool | isSplineVisible() const |
| void | setSplineVisible(bool draw) |
通知信号:
| void | splineVisibilityChanged(bool visible) |
成员函数文档
[explicit] QSpline3DSeries::QSpline3DSeries(QObject *parent = nullptr)
使用父对象parent 构建一个3D样条序列。
[explicit] QSpline3DSeries::QSpline3DSeries(QScatterDataProxy *dataProxy, QObject *parent = nullptr)
使用数据代理dataProxy 和父对象parent 构建一个样条3D系列。
[override virtual noexcept] QSpline3DSeries::~QSpline3DSeries()
删除3D样条曲线序列。
© 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.