QSpline3DSeries Class

The QSpline3DSeries class represents a data series as a spline. More...

Header: #include <QSpline3DSeries>
CMake: find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs)
qmake: QT += graphs
Since: Qt 6.9
In QML: Spline3DSeries
Inherits: QScatter3DSeries

Properties

Public Functions

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(float knotting)
void setSplineLooping(bool looping)
void setSplineResolution(int resolution)
void setSplineTension(float tension)
void setSplineVisible(bool draw)
QColor splineColor() const
float splineKnotting() const
int splineResolution() const
float splineTension() const

Signals

void splineColorChanged(QColor color)
void splineKnottingChanged(float knotting)
void splineLoopingChanged(bool looping)
void splineResolutionChanged(int resolution)
void splineTensionChanged(float tension)
void splineVisibilityChanged(bool visible)

Detailed Description

Spline graphs are used to show information as a series of data points connected by a curved or straight Catmull-Rom spline.

This class manages the spline specific visual elements.

Spline3DSeries extends the Scatter3DSeries API.

Property Documentation

splineColor : QColor

This property holds the color of the spline.

Access functions:

QColor splineColor() const
void setSplineColor(QColor color)

Notifier signal:

void splineColorChanged(QColor color)

splineKnotting : float

This property holds the knot parametrization of the spline.

This parameter can change the profile of the curve. The spline is classified as a uniform Catmull-Rom spline at a value of 0.0, a centripetal Catmull-Rom spline at a value of 0.5, and a chordal Catmull-Rom spline at a value of 1.0.

The value must be between 0.0 and 1.0. The default value is 0.5.

Access functions:

float splineKnotting() const
void setSplineKnotting(float knotting)

Notifier signal:

void splineKnottingChanged(float knotting)

splineLooping : bool

Determines whether the spline loops.

This adds a spline segment between the first and last points of the series connecting the spline into a loop.

The default value is false

Access functions:

bool isSplineLooping() const
void setSplineLooping(bool looping)

Notifier signal:

void splineLoopingChanged(bool looping)

splineResolution : int

This property holds the resolution of the segments spline.

The number of vertices per spline segment, which is defined as the part between two points.

Must be a value above 2. The default value is 10.

Access functions:

int splineResolution() const
void setSplineResolution(int resolution)

Notifier signal:

void splineResolutionChanged(int resolution)

splineTension : float

This property holds the tension of the spline.

The spline uses maximum curvature for segments at a value of 0.0 Segments are completely straight at a value of 1.0 Must be between 0.0 and 1.0 The default value is 0.0

Access functions:

float splineTension() const
void setSplineTension(float tension)

Notifier signal:

void splineTensionChanged(float tension)

splineVisible : bool

Visibility of the spline.

Visibility of the spline. The default value is true.

Access functions:

bool isSplineVisible() const
void setSplineVisible(bool draw)

Notifier signal:

void splineVisibilityChanged(bool visible)

Member Function Documentation

[explicit] QSpline3DSeries::QSpline3DSeries(QObject *parent = nullptr)

Constructs a spline 3D series with the parent parent.

[explicit] QSpline3DSeries::QSpline3DSeries(QScatterDataProxy *dataProxy, QObject *parent = nullptr)

Constructs a spline 3D series with the data proxy dataProxy and the parent parent.

[override virtual noexcept] QSpline3DSeries::~QSpline3DSeries()

Deletes the spline 3D series.

© 2024 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.