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 .