The QAbstract3DSeries class is a base class for all 3D data series. 更多...
| 头: |
#include <QAbstract3DSeries>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs)
|
| qmake: |
QT += graphs
|
| 在 QML: | Abstract3DSeries |
| 继承: | QObject |
| 继承者: |
| 枚举类 | Mesh { UserDefined, Bar, Cube, Pyramid, Cone, …, Point } |
| 枚举类 | SeriesType { None, Bar, Scatter, Surface } |
|
|
| virtual | ~QAbstract3DSeries () override |
| QColor | baseColor () const |
| QLinearGradient | baseGradient () const |
| QGraphsTheme::ColorStyle | colorStyle () const |
| bool | isItemLabelVisible () const |
| bool | isMeshSmooth () const |
| bool | isVisible () const |
| QString | itemLabel () |
| QString | itemLabelFormat () const |
| QAbstract3DSeries::Mesh | mesh () const |
| QQuaternion | meshRotation () const |
| QColor | multiHighlightColor () const |
| QLinearGradient | multiHighlightGradient () const |
| QString | name () const |
| void | setBaseColor (QColor color ) |
| void | setBaseGradient (const QLinearGradient & gradient ) |
| void | setColorStyle (QGraphsTheme::ColorStyle style ) |
| void | setItemLabelFormat (const QString & format ) |
| void | setItemLabelVisible (bool visible ) |
| void | setMesh (QAbstract3DSeries::Mesh mesh ) |
| void | setMeshAxisAndAngle (QVector3D axis , float angle ) |
| void | setMeshRotation (const QQuaternion & rotation ) |
| void | setMeshSmooth (bool enable ) |
| void | setMultiHighlightColor (QColor color ) |
| void | setMultiHighlightGradient (const QLinearGradient & gradient ) |
| void | setName (const QString & name ) |
| void | setSingleHighlightColor (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 (QColor color ) |
| void | baseGradientChanged (const QLinearGradient & gradient ) |
| void | colorStyleChanged (QGraphsTheme::ColorStyle style ) |
| void | itemLabelChanged (const QString & label ) |
| void | itemLabelFormatChanged (const QString & format ) |
| void | itemLabelVisibleChanged (bool visible ) |
| void | meshChanged (QAbstract3DSeries::Mesh mesh ) |
| void | meshRotationChanged (const QQuaternion & rotation ) |
| void | meshSmoothChanged (bool enabled ) |
| void | multiHighlightColorChanged (QColor color ) |
| void | multiHighlightGradientChanged (const QLinearGradient & gradient ) |
| void | nameChanged (const QString & name ) |
| void | singleHighlightColorChanged (QColor color ) |
| void | singleHighlightGradientChanged (const QLinearGradient & gradient ) |
| void | userDefinedMeshChanged (const QString & fileName ) |
| void | visibleChanged (bool visible ) |
There are inherited classes for each supported series type: QBar3DSeries , QScatter3DSeries ,和 QSurface3DSeries .
更多信息,见 Qt Graphs Data Handling with 3D .
Predefined mesh types. All styles are not usable with all graphs types.
| 常量 | 值 | 描述 |
|---|---|---|
QAbstract3DSeries::Mesh::UserDefined
|
0
|
User defined mesh, set via QAbstract3DSeries::userDefinedMesh 特性。 |
QAbstract3DSeries::Mesh::Bar
|
1
|
Basic rectangular bar. |
QAbstract3DSeries::Mesh::Cube
|
2
|
基本立方体。 |
QAbstract3DSeries::Mesh::Pyramid
|
3
|
Four-sided pyramid. |
QAbstract3DSeries::Mesh::Cone
|
4
|
Basic cone. |
QAbstract3DSeries::Mesh::Cylinder
|
5
|
Basic cylinder. |
QAbstract3DSeries::Mesh::BevelBar
|
6
|
Slightly beveled (rounded) rectangular bar. |
QAbstract3DSeries::Mesh::BevelCube
|
7
|
Slightly beveled (rounded) cube. |
QAbstract3DSeries::Mesh::Sphere
|
8
|
球体。 |
QAbstract3DSeries::Mesh::Minimal
|
9
|
The minimal 3D mesh: a triangular pyramid. Usable only with Q3DScatterWidgetItem . |
QAbstract3DSeries::Mesh::Arrow
|
10
|
Arrow pointing upwards. |
QAbstract3DSeries::Mesh::Point
|
11
|
2D point. Usable only with Q3DScatterWidgetItem . Shadows do not affect this style. Color style QGraphsTheme::ColorStyle::ObjectGradient is not supported by this style. |
Type of the series.
| 常量 | 值 | 描述 |
|---|---|---|
QAbstract3DSeries::SeriesType::None
|
0
|
No series type. |
QAbstract3DSeries::SeriesType::Bar
|
1
|
Series type for Q3DBarsWidgetItem . |
QAbstract3DSeries::SeriesType::Scatter
|
2
|
Series type for Q3DScatterWidgetItem . |
QAbstract3DSeries::SeriesType::Surface
|
3
|
Series type for Q3DSurfaceWidgetItem . |
This property holds the base color of the series.
访问函数:
| QColor | baseColor () const |
| void | setBaseColor (QColor color ) |
通知程序信号:
| void | baseColorChanged (QColor color ) |
另请参阅 colorStyle and QGraphsTheme::seriesColors .
This property holds the base gradient of the series.
访问函数:
| QLinearGradient | baseGradient () const |
| void | setBaseGradient (const QLinearGradient & gradient ) |
通知程序信号:
| void | baseGradientChanged (const QLinearGradient & gradient ) |
另请参阅 colorStyle and QGraphsTheme::seriesGradients .
This property holds the color style for the series.
访问函数:
| QGraphsTheme::ColorStyle | colorStyle () const |
| void | setColorStyle (QGraphsTheme::ColorStyle style ) |
通知程序信号:
| void | colorStyleChanged (QGraphsTheme::ColorStyle style ) |
另请参阅 QGraphsTheme::ColorStyle .
[read-only]
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.
访问函数:
| QString | itemLabel () |
通知程序信号:
| void | itemLabelChanged (const QString & label ) |
另请参阅 itemLabelFormat .
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.
访问函数:
| QString | itemLabelFormat () const |
| void | setItemLabelFormat (const QString & format ) |
通知程序信号:
| void | itemLabelFormatChanged (const QString & format ) |
另请参阅 QBar3DSeries , QScatter3DSeries ,和 QSurface3DSeries .
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
.
访问函数:
| bool | isItemLabelVisible () const |
| void | setItemLabelVisible (bool visible ) |
通知程序信号:
| void | itemLabelVisibleChanged (bool visible ) |
另请参阅 itemLabelFormat and itemLabel .
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 ) |
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 ) |
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. Defaults to
false
.
访问函数:
| bool | isMeshSmooth () const |
| void | setMeshSmooth (bool enable ) |
通知程序信号:
| void | meshSmoothChanged (bool enabled ) |
This property holds the multiple item highlight color of the series.
访问函数:
| QColor | multiHighlightColor () const |
| void | setMultiHighlightColor (QColor color ) |
通知程序信号:
| void | multiHighlightColorChanged (QColor color ) |
另请参阅 colorStyle and QGraphsTheme::multiHighlightColor .
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 QGraphsTheme::multiHighlightGradient .
This property holds the series name.
The series name can be used in item label format with the tag
@seriesName
.
访问函数:
| QString | 名称 () const |
| void | setName (const QString & name ) |
通知程序信号:
| void | nameChanged (const QString & name ) |
另请参阅 itemLabelFormat .
This property holds the single item highlight color of the series.
访问函数:
| QColor | singleHighlightColor () const |
| void | setSingleHighlightColor (QColor color ) |
通知程序信号:
| void | singleHighlightColorChanged (QColor color ) |
另请参阅 colorStyle and QGraphsTheme::singleHighlightColor .
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 QGraphsTheme::singleHighlightGradient .
[read-only]
type
: const
QAbstract3DSeries::SeriesType
This property holds the type of the series.
访问函数:
| QAbstract3DSeries::SeriesType | type () const |
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
QtQuick3D
mesh format. Use the
balsam
conversion tool to create a mesh from other 3D model formats.
访问函数:
| QString | userDefinedMesh () const |
| void | setUserDefinedMesh (const QString & fileName ) |
通知程序信号:
| void | userDefinedMeshChanged (const QString & fileName ) |
此特性保持系列的可见性。
若此特性为
false
, the series is not rendered. Defaults to
true
.
访问函数:
| bool | isVisible () const |
| void | setVisible (bool visible ) |
通知程序信号:
| void | visibleChanged (bool visible ) |
[override virtual noexcept]
QAbstract3DSeries::
~QAbstract3DSeries
()
删除抽象 3D 系列。
[invokable]
void
QAbstract3DSeries::
setMeshAxisAndAngle
(
QVector3D
axis
,
float
angle
)
A convenience function to construct a mesh rotation quaternion from axis and angle .
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
另请参阅 meshRotation .