QAbstract3DSeries 類

QAbstract3DSeries 類是所有數據係列的基類。 更多...

頭: #include <QAbstract3DSeries>
qmake: QT += datavisualization
Since: QtDataVisualization 1.0
實例化: Abstract3DSeries
繼承: QObject
繼承者:

QBar3DSeries , QScatter3DSeries ,和 QSurface3DSeries

該類在 QtDataVisualization 1.0 引入。

公共類型

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

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 )

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 .

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 係列。

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 .