The QValue3DAxis class manipulates an axis of a graph. 更多...
| 頭: | #include <QValue3DAxis> |
| Since: | QtDataVisualization 1.0 |
| 實例化: | ValueAxis3D |
| 繼承: | QAbstract3DAxis |
|
|
| QValue3DAxis (QObject * parent = nullptr) | |
| virtual | ~QValue3DAxis () |
| QValue3DAxisFormatter * | formatter () const |
| QString | labelFormat () const |
| bool | reversed () const |
| int | segmentCount () const |
| void | setFormatter (QValue3DAxisFormatter * formatter ) |
| void | setLabelFormat (const QString & format ) |
| void | setReversed (bool enable ) |
| void | setSegmentCount (int count ) |
| void | setSubSegmentCount (int count ) |
| int | subSegmentCount () const |
| void | formatterChanged (QValue3DAxisFormatter * formatter ) |
| void | labelFormatChanged (const QString & format ) |
| void | reversedChanged (bool enable ) |
| void | segmentCountChanged (int count ) |
| void | subSegmentCountChanged (int count ) |
| const QMetaObject | staticMetaObject |
The QValue3DAxis class manipulates an axis of a graph.
A value axis can be given a range of values and segment and subsegment counts to divide the range into.
Labels are drawn between each segment. Grid lines are drawn between each segment and each subsegment.
注意: If visible, there will always be at least two grid lines and labels indicating the minimum and the maximum values of the range, as there is always at least one segment.
This property holds the axis formatter to be used.
Any existing formatter is deleted when a new formatter is set.
該特性在 QtDataVisualization 1.1 引入。
訪問函數:
| QValue3DAxisFormatter * | formatter () const |
| void | setFormatter (QValue3DAxisFormatter * formatter ) |
通知程序信號:
| void | formatterChanged (QValue3DAxisFormatter * formatter ) |
This property holds the label format to be used for the labels on this axis.
格式字符串支持的以下轉換說明符、長度修飾符和標誌的提供通過
printf()
在標準 C++ 庫:d、i、o、x、X、f、F、e、E、g、G、c。
若
QAbstract3DGraph::locale
is anything else than
"C"
,支持的說明符限於:d、e、E、f、g、G 和 i。另外,僅支持精度修飾符。其餘格式來自默認
QLocale
對於應用程序。
用法範例:
axis->setLabelFormat("%.2f mm");
訪問函數:
| QString | labelFormat () const |
| void | setLabelFormat (const QString & format ) |
通知程序信號:
| void | labelFormatChanged (const QString & format ) |
另請參閱 formatter and QAbstract3DGraph::locale .
This property holds whether the axis is rendered in reverse.
若
true
, the axis will be rendered in reverse, i.e. the positions of minimum and maximum values are swapped when the graph is rendered. This property doesn't affect the actual minimum and maximum values of the axis.
該特性在 QtDataVisualization 1.1 引入。
訪問函數:
| bool | reversed () const |
| void | setReversed (bool enable ) |
通知程序信號:
| void | reversedChanged (bool enable ) |
This property holds the number of segments on the axis.
This indicates how many labels are drawn. The number of grid lines to be drawn is calculated with formula:
segments * subsegments + 1
. The preset default is
5
. The value cannot be below
1
.
訪問函數:
| int | segmentCount () const |
| void | setSegmentCount (int count ) |
通知程序信號:
| void | segmentCountChanged (int count ) |
另請參閱 setSubSegmentCount ().
This property holds the number of subsegments inside each segment on the axis.
Grid lines are drawn between each subsegment, in addition to each segment. The preset default is
1
. The value cannot be below
1
.
訪問函數:
| int | subSegmentCount () const |
| void | setSubSegmentCount (int count ) |
通知程序信號:
| void | subSegmentCountChanged (int count ) |
另請參閱 setSegmentCount ().
構造 QValue3DAxis 采用給定 parent .
[虛擬]
QValue3DAxis::
~QValue3DAxis
()
銷毀 QValue3DAxis .