The QAbstract3DAxis class is a base class for the axes of a 3D graph. 更多...
| 頭: |
#include <QAbstract3DAxis>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs)
|
| qmake: |
QT += graphs
|
| 在 QML: | Abstract3DAxis |
| 繼承: | QObject |
| 繼承者: |
| 枚舉類 | AxisOrientation { None, X, Y, Z } |
| 枚舉類 | AxisType { None, Category, Value } |
|
|
| virtual | ~QAbstract3DAxis () override |
| bool | isAutoAdjustRange () const |
| bool | isScaleLabelsByCount () const |
| bool | isTitleFixed () const |
| bool | isTitleVisible () const |
| float | labelAutoAngle () const |
| qreal | labelSize () const |
| QStringList | labels () const |
| bool | labelsVisible () const |
| float | max () const |
| float | min () const |
| QAbstract3DAxis::AxisOrientation | orientation () const |
| void | setAutoAdjustRange (bool autoAdjust ) |
| void | setLabelAutoAngle (float degree ) |
| void | setLabelSize (qreal size ) |
| void | setLabels (const QStringList & labels ) |
| void | setLabelsVisible (bool visible ) |
| void | setMax (float max ) |
| void | setMin (float min ) |
| void | setRange (float min , float max ) |
| void | setScaleLabelsByCount (bool adjust ) |
| void | setTitle (const QString & title ) |
| void | setTitleFixed (bool fixed ) |
| void | setTitleOffset (float offset ) |
| void | setTitleVisible (bool visible ) |
| QString | title () const |
| float | titleOffset () const |
| QAbstract3DAxis::AxisType | type () const |
| void | autoAdjustRangeChanged (bool autoAdjust ) |
| void | labelAutoAngleChanged (float angle ) |
| void | labelSizeChanged (qreal size ) |
| void | labelVisibleChanged (bool visible ) |
| void | labelsChanged () |
| void | maxChanged (float value ) |
| void | minChanged (float value ) |
| void | orientationChanged (QAbstract3DAxis::AxisOrientation orientation ) |
| void | rangeChanged (float min , float max ) |
| void | scaleLabelsByCountChanged (bool adjust ) |
| void | titleChanged (const QString & newTitle ) |
| void | titleFixedChanged (bool fixed ) |
| void | titleOffsetChanged (float offset ) |
| void | titleVisibleChanged (bool visible ) |
This class specifies the enumerations, properties, and functions shared by graph axes. It should not be used directly, but one of its subclasses should be used instead.
另請參閱 QCategory3DAxis and QValue3DAxis .
軸對象的取嚮。
| 常量 | 值 |
|---|---|
QAbstract3DAxis::AxisOrientation::None
|
0
|
QAbstract3DAxis::AxisOrientation::X
|
1
|
QAbstract3DAxis::AxisOrientation::Y
|
2
|
QAbstract3DAxis::AxisOrientation::Z
|
3
|
軸對象的類型。
| 常量 | 值 |
|---|---|
QAbstract3DAxis::AxisType::None
|
0
|
QAbstract3DAxis::AxisType::Category
|
1
|
QAbstract3DAxis::AxisType::Value
|
2
|
This property holds whether the axis will automatically adjust the range so that all data fits in it.
訪問函數:
| bool | isAutoAdjustRange () const |
| void | setAutoAdjustRange (bool autoAdjust ) |
通知程序信號:
| void | autoAdjustRangeChanged (bool autoAdjust ) |
另請參閱 setRange (), setMin (),和 setMax ().
This property holds the maximum angle the labels can autorotate when the camera angle changes.
The angle can be between 0 and 90, inclusive. The default value is 0. If the value is 0, axis labels do not automatically rotate. If the value is greater than zero, labels attempt to orient themselves toward the camera, up to the specified angle.
訪問函數:
| float | labelAutoAngle () const |
| void | setLabelAutoAngle (float degree ) |
通知程序信號:
| void | labelAutoAngleChanged (float angle ) |
[since 6.9]
labelSize
:
qreal
Size of the label
The size of the label. The default for this value is
1.0
.
該特性在 Qt 6.9 引入。
訪問函數:
| qreal | labelSize () const |
| void | setLabelSize (qreal size ) |
通知程序信號:
| void | labelSizeChanged (qreal size ) |
另請參閱 scaleLabelsByCount .
此特性保持軸的標簽。
注意: Setting this property for QValue3DAxis does nothing, as it generates labels automatically.
訪問函數:
| QStringList | labels () const |
| void | setLabels (const QStringList & labels ) |
通知程序信號:
| void | labelsChanged () |
This property holds whether the axis labels are visible in the primary graph view.
默認值為
true
.
訪問函數:
| bool | labelsVisible () const |
| void | setLabelsVisible (bool visible ) |
通知程序信號:
| void | labelVisibleChanged (bool visible ) |
此特性保持軸的最大值。
When setting this property, the minimum value is adjusted if necessary, to ensure that the range remains valid.
注意: For QCategory3DAxis , specifies the index of the last row or column to show.
訪問函數:
| float | max () const |
| void | setMax (float max ) |
通知程序信號:
| void | maxChanged (float value ) |
此特性保持軸的最小值。
When setting this property, the maximum value is adjusted if necessary, to ensure that the range remains valid.
注意: For QCategory3DAxis , specifies the index of the first row or column to show.
訪問函數:
| float | min () const |
| void | setMin (float min ) |
通知程序信號:
| void | minChanged (float value ) |
[read-only]
orientation
: const
QAbstract3DAxis::AxisOrientation
此特性保持軸的取嚮。
The value is one of AxisOrientation 值。
訪問函數:
| QAbstract3DAxis::AxisOrientation | orientation () const |
通知程序信號:
| void | orientationChanged (QAbstract3DAxis::AxisOrientation orientation ) |
[since 6.9]
scaleLabelsByCount
:
bool
This property holds whether the labels will automatically adjust their size based on the total amount of labels
該特性在 Qt 6.9 引入。
訪問函數:
| bool | isScaleLabelsByCount () const |
| void | setScaleLabelsByCount (bool adjust ) |
通知程序信號:
| void | scaleLabelsByCountChanged (bool adjust ) |
另請參閱 labelSize ().
此特性保持軸的標題。
訪問函數:
| QString | title () const |
| void | setTitle (const QString & title ) |
通知程序信號:
| void | titleChanged (const QString & newTitle ) |
另請參閱 titleVisible and titleFixed .
此特性保持軸標題的鏇轉。
若
false
, axis titles in the primary graph view will be rotated towards the camera similarly to the axis labels. If
true
, axis titles are only rotated around their axis but are not otherwise oriented towards the camera. This property does not have any effect if the
labelAutoAngle
特性值為 0。默認值為
true
.
訪問函數:
| bool | isTitleFixed () const |
| void | setTitleFixed (bool fixed ) |
通知程序信號:
| void | titleFixedChanged (bool fixed ) |
另請參閱 labelAutoAngle , title ,和 titleVisible .
The position of the axis title on the axis. The value must be between
-1.0f
and
1.0f
訪問函數:
| float | titleOffset () const |
| void | setTitleOffset (float offset ) |
通知程序信號:
| void | titleOffsetChanged (float offset ) |
另請參閱 title and titleFixed .
此特性保持軸標題在首要圖形視圖中是否可見。
默認值為
false
.
訪問函數:
| bool | isTitleVisible () const |
| void | setTitleVisible (bool visible ) |
通知程序信號:
| void | titleVisibleChanged (bool visible ) |
另請參閱 title and titleFixed .
[read-only]
type
: const
QAbstract3DAxis::AxisType
此特性保持軸的類型。
The value is one of AxisType 值。
訪問函數:
| QAbstract3DAxis::AxisType | type () const |
[override virtual noexcept]
QAbstract3DAxis::
~QAbstract3DAxis
()
銷毀 QAbstract3DAxis .
[signal]
void
QAbstract3DAxis::
rangeChanged
(
float
min
,
float
max
)
Emits the minimum and maximum values of the range, min and max ,當範圍改變時。
Sets the value range of the axis from min to max . When setting the range, the maximum value is adjusted if necessary, to ensure that the range remains valid.
注意: For QCategory3DAxis , specifies the index range of rows or columns to show.