QAbstract3DSeries Class

The QAbstract3DSeries class is a base class for all data series. More...

Header: #include <QAbstract3DSeries>
CMake: find_package(Qt6 REQUIRED COMPONENTS DataVisualization)
target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)
qmake: QT += datavisualization
Since: QtDataVisualization 1.0
Instantiated By: Abstract3DSeries
Inherited By:

QBar3DSeries, QScatter3DSeries, and QSurface3DSeries

Public Types

enum Mesh { MeshUserDefined, MeshBar, MeshCube, MeshPyramid, MeshCone, …, MeshPoint }
enum SeriesType { SeriesTypeNone, SeriesTypeBar, SeriesTypeScatter, SeriesTypeSurface }

Properties

Public Functions

virtual ~QAbstract3DSeries()
QColor baseColor() const
QLinearGradient baseGradient() const
Q3DTheme::ColorStyle colorStyle() const
bool isItemLabelVisible() const
bool isMeshSmooth() const
bool isVisible() const
QString itemLabel() const
QString itemLabelFormat() const
Mesh mesh() const
QQuaternion meshRotation() const
QColor multiHighlightColor() const
QLinearGradient multiHighlightGradient() const
QString name() const
void setBaseColor()
void setBaseGradient()
void setColorStyle()
void setItemLabelFormat()
void setItemLabelVisible()
void setMesh()
void setMeshRotation()
void setMeshSmooth()
void setMultiHighlightColor()
void setMultiHighlightGradient()
void setName()
void setSingleHighlightColor()
void setSingleHighlightGradient()
void setUserDefinedMesh()
void setVisible()
QColor singleHighlightColor() const
QLinearGradient singleHighlightGradient() const
SeriesType type() const
QString userDefinedMesh() const

Signals

Detailed Description

There are inherited classes for each supported series type: QBar3DSeries, QScatter3DSeries, and QSurface3DSeries.

For more information, see Qt Data Visualization Data Handling.

Member Type Documentation

enum QAbstract3DSeries::Mesh

Predefined mesh types. All styles are not usable with all visualization types.

ConstantValueDescription
QAbstract3DSeries::MeshUserDefined0User defined mesh, set via QAbstract3DSeries::userDefinedMesh property.
QAbstract3DSeries::MeshBar1Basic rectangular bar.
QAbstract3DSeries::MeshCube2Basic cube.
QAbstract3DSeries::MeshPyramid3Four-sided pyramid.
QAbstract3DSeries::MeshCone4Basic cone.
QAbstract3DSeries::MeshCylinder5Basic cylinder.
QAbstract3DSeries::MeshBevelBar6Slightly beveled (rounded) rectangular bar.
QAbstract3DSeries::MeshBevelCube7Slightly beveled (rounded) cube.
QAbstract3DSeries::MeshSphere8Sphere.
QAbstract3DSeries::MeshMinimal9The minimal 3D mesh: a triangular pyramid. Usable only with Q3DScatter.
QAbstract3DSeries::MeshArrow10Arrow pointing upwards.
QAbstract3DSeries::MeshPoint112D point. Usable only with Q3DScatter. Shadows do not affect this style. Color style Q3DTheme::ColorStyleObjectGradient is not supported by this style.

enum QAbstract3DSeries::SeriesType

Type of the series.

ConstantValueDescription
QAbstract3DSeries::SeriesTypeNone0No series type.
QAbstract3DSeries::SeriesTypeBar1Series type for Q3DBars.
QAbstract3DSeries::SeriesTypeScatter2Series type for Q3DScatter.
QAbstract3DSeries::SeriesTypeSurface4Series type for Q3DSurface.

Property Documentation

baseColor : QColor

This property holds the base color of the series.

Access functions:

QColor baseColor() const
void setBaseColor()

Notifier signal:

void baseColorChanged()

See also colorStyle and Q3DTheme::baseColors.

baseGradient : QLinearGradient

This property holds the base gradient of the series.

Access functions:

QLinearGradient baseGradient() const
void setBaseGradient()

Notifier signal:

void baseGradientChanged()

See also colorStyle and Q3DTheme::baseGradients.

colorStyle : Q3DTheme::ColorStyle

This property holds the color style for the series.

Access functions:

Q3DTheme::ColorStyle colorStyle() const
void setColorStyle()

Notifier signal:

void colorStyleChanged()

See also Q3DTheme::ColorStyle.

[read-only, since QtDataVisualization 1.1] itemLabel : const QString

This property holds the formatted item label.

If there is no selected item or the selected item is not visible, returns an empty string.

This property was introduced in QtDataVisualization 1.1.

Access functions:

QString itemLabel() const

Notifier signal:

void itemLabelChanged()

See also itemLabelFormat.

itemLabelFormat : QString

This property holds the label format for data items in this series.

This format is used for single item labels, for example, when an item is selected. How the format is interpreted depends on series type: QBar3DSeries, QScatter3DSeries, QSurface3DSeries.

Access functions:

QString itemLabelFormat() const
void setItemLabelFormat()

Notifier signal:

void itemLabelFormatChanged()

[since QtDataVisualization 1.1] itemLabelVisible : bool

This property holds the visibility of item labels in the graph.

If true, item labels are drawn as floating labels in the graph. Otherwise, item labels are not drawn. To show the item label in an external control, this property is set to false. Defaults to true.

This property was introduced in QtDataVisualization 1.1.

Access functions:

bool isItemLabelVisible() const
void setItemLabelVisible()

Notifier signal:

void itemLabelVisibilityChanged()

See also itemLabelFormat and itemLabel.

mesh : Mesh

This property holds the mesh of the items in the series.

For QSurface3DSeries, this property holds the selection pointer.

If the mesh is MeshUserDefined, then the userDefinedMesh property must also be set for items to render properly. The default value depends on the graph type.

Access functions:

Mesh mesh() const
void setMesh()

Notifier signal:

void meshChanged()

meshRotation : QQuaternion

This property holds the mesh rotation that is applied to all items of the series.

The rotation should be a normalized QQuaternion. For those series types that support item specific rotation, the rotations are multiplied together. QBar3DSeries ignores any rotation that is not around the y-axis. QSurface3DSeries applies the rotation only to the selection pointer. Defaults to no rotation.

Access functions:

QQuaternion meshRotation() const
void setMeshRotation()

Notifier signal:

void meshRotationChanged()

meshSmooth : bool

This property holds whether smooth versions of predefined meshes are used.

If true, smooth versions set via the mesh property are used. This property does not affect custom meshes used when the mesh is set to MeshUserDefined. Defaults to false.

Access functions:

bool isMeshSmooth() const
void setMeshSmooth()

Notifier signal:

void meshSmoothChanged()

multiHighlightColor : QColor

This property holds the multiple item highlight color of the series.

Access functions:

QColor multiHighlightColor() const
void setMultiHighlightColor()

Notifier signal:

void multiHighlightColorChanged()

See also colorStyle and Q3DTheme::multiHighlightColor.

multiHighlightGradient : QLinearGradient

This property holds the multiple item highlight gradient of the series.

Access functions:

QLinearGradient multiHighlightGradient() const
void setMultiHighlightGradient()

Notifier signal:

void multiHighlightGradientChanged()

See also colorStyle and Q3DTheme::multiHighlightGradient.

name : QString

This property holds the series name.

The series name can be used in item label format with the tag @seriesName.

Access functions:

QString name() const
void setName()

Notifier signal:

void nameChanged()

See also itemLabelFormat.

singleHighlightColor : QColor

This property holds the single item highlight color of the series.

Access functions:

QColor singleHighlightColor() const
void setSingleHighlightColor()

Notifier signal:

void singleHighlightColorChanged()

See also colorStyle and Q3DTheme::singleHighlightColor.

singleHighlightGradient : QLinearGradient

This property holds the single item highlight gradient of the series.

Access functions:

QLinearGradient singleHighlightGradient() const
void setSingleHighlightGradient()

Notifier signal:

void singleHighlightGradientChanged()

See also colorStyle and Q3DTheme::singleHighlightGradient.

[read-only] type : const SeriesType

This property holds the type of the series.

Access functions:

SeriesType type() const

userDefinedMesh : QString

This property holds the filename for a user defined custom mesh for objects.

The custom mesh is used when mesh is MeshUserDefined.

Note: The file needs to be in the Wavefront OBJ format and include vertices, normals, and UVs. It also needs to be in triangles.

Access functions:

QString userDefinedMesh() const
void setUserDefinedMesh()

Notifier signal:

void userDefinedMeshChanged()

visible : bool

This property holds the visibility of the series.

If this property is false, the series is not rendered. Defaults to true.

Access functions:

bool isVisible() const
void setVisible()

Notifier signal:

void visibilityChanged()

Member Function Documentation

[virtual] QAbstract3DSeries::~QAbstract3DSeries()

Deletes the abstract 3D series.