QAbstract3DSeries 类

QAbstract3DSeries 类是所有数据系列的基类。 更多...

头: #include <QAbstract3DSeries>
Since: QtDataVisualization 1.0
实例化: Abstract3DSeries
继承: QObject
继承者: QBar3DSeries , QScatter3DSeries ,和 QSurface3DSeries

公共类型

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

特性

公共函数

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
QAbstract3DSeries::Mesh mesh () const
QQuaternion meshRotation () const
QColor multiHighlightColor () const
QLinearGradient multiHighlightGradient () const
QString name () const
void setBaseColor (const QColor & color )
void setBaseGradient (const QLinearGradient & gradient )
void setColorStyle (Q3DTheme::ColorStyle style )
void setItemLabelFormat (const QString & format )
void setItemLabelVisible (bool visible )
void setMesh (QAbstract3DSeries::Mesh mesh )
void setMeshAxisAndAngle (const QVector3D & axis , float angle )
void setMeshRotation (const QQuaternion & rotation )
void setMeshSmooth (bool enable )
void setMultiHighlightColor (const QColor & color )
void setMultiHighlightGradient (const QLinearGradient & gradient )
void setName (const QString & name )
void setSingleHighlightColor (const QColor & color )
void setSingleHighlightGradient (const QLinearGradient & gradient )
void setUserDefinedMesh (const QString & fileName )
void setVisible (bool visible )
QColor singleHighlightColor () const
QLinearGradient singleHighlightGradient () const
QAbstract3DSeries::SeriesType type () const
QString userDefinedMesh () const

信号

void baseColorChanged (const QColor & color )
void baseGradientChanged (const QLinearGradient & gradient )
void colorStyleChanged (Q3DTheme::ColorStyle style )
void itemLabelChanged (const QString & label )
void itemLabelFormatChanged (const QString & format )
void itemLabelVisibilityChanged (bool visible )
void meshChanged (QAbstract3DSeries::Mesh mesh )
void meshRotationChanged (const QQuaternion & rotation )
void meshSmoothChanged (bool enabled )
void multiHighlightColorChanged (const QColor & color )
void multiHighlightGradientChanged (const QLinearGradient & gradient )
void nameChanged (const QString & name )
void singleHighlightColorChanged (const QColor & color )
void singleHighlightGradientChanged (const QLinearGradient & gradient )
void userDefinedMeshChanged (const QString & fileName )
void visibilityChanged (bool visible )

详细描述

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

更多信息,见 Qt Data Visualization 数据处理 .

成员类型文档编制

enum QAbstract3DSeries:: Mesh

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

常量 描述
QAbstract3DSeries::MeshUserDefined 0 User defined mesh, set via QAbstract3DSeries::userDefinedMesh 特性。
QAbstract3DSeries::MeshBar 1 Basic rectangular bar.
QAbstract3DSeries::MeshCube 2 基本立方体。
QAbstract3DSeries::MeshPyramid 3 Four-sided pyramid.
QAbstract3DSeries::MeshCone 4 Basic cone.
QAbstract3DSeries::MeshCylinder 5 Basic cylinder.
QAbstract3DSeries::MeshBevelBar 6 Slightly beveled (rounded) rectangular bar.
QAbstract3DSeries::MeshBevelCube 7 Slightly beveled (rounded) cube.
QAbstract3DSeries::MeshSphere 8 球体。
QAbstract3DSeries::MeshMinimal 9 The minimal 3D mesh: a triangular pyramid. Usable only with Q3DScatter .
QAbstract3DSeries::MeshArrow 10 Arrow pointing upwards.
QAbstract3DSeries::MeshPoint 11 2D 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.

常量 描述
QAbstract3DSeries::SeriesTypeNone 0 No series type.
QAbstract3DSeries::SeriesTypeBar 1 Series type for Q3DBars .
QAbstract3DSeries::SeriesTypeScatter 2 Series type for Q3DScatter .
QAbstract3DSeries::SeriesTypeSurface 4 Series type for Q3DSurface .

特性文档编制

baseColor : QColor

This property holds the base color of the series.

访问函数:

QColor baseColor () const
void setBaseColor (const QColor & color )

通知程序信号:

void baseColorChanged (const QColor & color )

另请参阅 colorStyle and Q3DTheme::baseColors .

baseGradient : QLinearGradient

This property holds the base gradient of the series.

访问函数:

QLinearGradient baseGradient () const
void setBaseGradient (const QLinearGradient & gradient )

通知程序信号:

void baseGradientChanged (const QLinearGradient & gradient )

另请参阅 colorStyle and Q3DTheme::baseGradients .

colorStyle : Q3DTheme::ColorStyle

This property holds the color style for the series.

访问函数:

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

通知程序信号:

void colorStyleChanged (Q3DTheme::ColorStyle style )

另请参阅 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.

该特性在 QtDataVisualization 1.1 引入。

访问函数:

QString itemLabel () const

通知程序信号:

void itemLabelChanged (const QString & label )

另请参阅 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 .

访问函数:

QString itemLabelFormat () const
void setItemLabelFormat (const QString & format )

通知程序信号:

void itemLabelFormatChanged (const QString & format )

[since QtDataVisualization 1.1] itemLabelVisible : bool

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

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 。默认为 true .

该特性在 QtDataVisualization 1.1 引入。

访问函数:

bool isItemLabelVisible () const
void setItemLabelVisible (bool visible )

通知程序信号:

void itemLabelVisibilityChanged (bool visible )

另请参阅 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.

访问函数:

QAbstract3DSeries::Mesh mesh () const
void setMesh (QAbstract3DSeries::Mesh mesh )

通知程序信号:

void meshChanged (QAbstract3DSeries::Mesh mesh )

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.

访问函数:

QQuaternion meshRotation () const
void setMeshRotation (const QQuaternion & rotation )

通知程序信号:

void meshRotationChanged (const QQuaternion & rotation )

meshSmooth : bool

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

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 。默认为 false .

访问函数:

bool isMeshSmooth () const
void setMeshSmooth (bool enable )

通知程序信号:

void meshSmoothChanged (bool enabled )

multiHighlightColor : QColor

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

访问函数:

QColor multiHighlightColor () const
void setMultiHighlightColor (const QColor & color )

通知程序信号:

void multiHighlightColorChanged (const QColor & color )

另请参阅 colorStyle and Q3DTheme::multiHighlightColor .

multiHighlightGradient : QLinearGradient

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

访问函数:

QLinearGradient multiHighlightGradient () const
void setMultiHighlightGradient (const QLinearGradient & gradient )

通知程序信号:

void multiHighlightGradientChanged (const QLinearGradient & gradient )

另请参阅 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 .

访问函数:

QString name () const
void setName (const QString & name )

通知程序信号:

void nameChanged (const QString & name )

另请参阅 itemLabelFormat .

singleHighlightColor : QColor

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

访问函数:

QColor singleHighlightColor () const
void setSingleHighlightColor (const QColor & color )

通知程序信号:

void singleHighlightColorChanged (const QColor & color )

另请参阅 colorStyle and Q3DTheme::singleHighlightColor .

singleHighlightGradient : QLinearGradient

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

访问函数:

QLinearGradient singleHighlightGradient () const
void setSingleHighlightGradient (const QLinearGradient & gradient )

通知程序信号:

void singleHighlightGradientChanged (const QLinearGradient & gradient )

另请参阅 colorStyle and Q3DTheme::singleHighlightGradient .

[read-only] type : const SeriesType

This property holds the type of the series.

访问函数:

QAbstract3DSeries::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 .

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

访问函数:

QString userDefinedMesh () const
void setUserDefinedMesh (const QString & fileName )

通知程序信号:

void userDefinedMeshChanged (const QString & fileName )

visible : bool

此特性保持系列的可见性。

若此特性为 false , the series is not rendered. Defaults to true .

访问函数:

bool isVisible () const
void setVisible (bool visible )

通知程序信号:

void visibilityChanged (bool visible )

成员函数文档编制

[虚拟] QAbstract3DSeries:: ~QAbstract3DSeries ()

删除抽象 3D 系列。

[invokable] void QAbstract3DSeries:: setMeshAxisAndAngle (const QVector3D & axis , float angle )

A convenience function to construct a mesh rotation quaternion from axis and angle .

注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .

另请参阅 meshRotation .