QAbstractSeries 類是所有 Qt Charts 係列的基類。 更多...
| 頭: | #include <QAbstractSeries> |
| 實例化: | AbstractSeries |
| 繼承: | QObject |
| 繼承者: |
QAbstractBarSeries , QAreaSeries , QBoxPlotSeries , QCandlestickSeries , QPieSeries ,和 QXYSeries |
| enum | SeriesType { SeriesTypeLine, SeriesTypeArea, SeriesTypeBar, SeriesTypeStackedBar, SeriesTypePercentBar, …, SeriesTypeCandlestick } |
| virtual | ~QAbstractSeries () |
| bool | attachAxis (QAbstractAxis * axis ) |
| QList<QAbstractAxis *> | attachedAxes () |
| QChart * | chart () const |
| bool | detachAxis (QAbstractAxis * axis ) |
| void | hide () |
| bool | isVisible () const |
| QString | name () const |
| qreal | opacity () const |
| void | setName (const QString & name ) |
| void | setOpacity (qreal opacity ) |
| void | setUseOpenGL (bool enable = true) |
| void | setVisible (bool visible = true) |
| void | show () |
| virtual QAbstractSeries::SeriesType | type () const = 0 |
| bool | useOpenGL () const |
| void | nameChanged () |
| void | opacityChanged () |
| void | useOpenGLChanged () |
| void | visibleChanged () |
通常,使用繼承類的特定於係列類型而不是基類。
另請參閱 QXYSeries , QLineSeries , QSplineSeries , QScatterSeries , QAreaSeries , QAbstractBarSeries , QBarSeries , QStackedBarSeries , QPercentBarSeries , QHorizontalBarSeries , QHorizontalStackedBarSeries , QHorizontalPercentBarSeries ,和 QPieSeries .
此枚舉描述係列的類型。
| 常量 | 值 | 描述 |
|---|---|---|
QAbstractSeries::SeriesTypeLine
|
0
|
綫圖錶。 |
QAbstractSeries::SeriesTypeArea
|
1
|
An area chart. |
QAbstractSeries::SeriesTypeBar
|
2
|
A vertical bar chart. |
QAbstractSeries::SeriesTypeStackedBar
|
3
|
A vertical stacked bar chart. |
QAbstractSeries::SeriesTypePercentBar
|
4
|
A vertical percent bar chart. |
QAbstractSeries::SeriesTypePie
|
5
|
餅狀圖錶。 |
QAbstractSeries::SeriesTypeScatter
|
6
|
散點圖錶。 |
QAbstractSeries::SeriesTypeSpline
|
7
|
A spline chart. |
QAbstractSeries::SeriesTypeHorizontalBar
|
8
|
A horizontal bar chart. |
QAbstractSeries::SeriesTypeHorizontalStackedBar
|
9
|
A horizontal stacked bar chart. |
QAbstractSeries::SeriesTypeHorizontalPercentBar
|
10
|
A horizontal percent bar chart. |
QAbstractSeries::SeriesTypeBoxPlot
|
11
|
A box plot chart. |
QAbstractSeries::SeriesTypeCandlestick
|
12
|
A candlestick chart. |
This property holds the name of the series.
The name is displayed in the legend for the series and it supports HTML formatting.
訪問函數:
| QString | name () const |
| void | setName (const QString & name ) |
通知程序信號:
| void | nameChanged () |
This property holds the opacity of the series.
By default, the opacity is 1.0. The valid values range from 0.0 (transparent) to 1.0 (opaque).
訪問函數:
| qreal | opacity () const |
| void | setOpacity (qreal opacity ) |
通知程序信號:
| void | opacityChanged () |
This property holds the type of the series.
訪問函數:
| virtual QAbstractSeries::SeriesType | type () const = 0 |
Specifies whether or not drawing the series is accelerated by using OpenGL.
Acceleration using OpenGL is supported only for QLineSeries and QScatterSeries . A line series used as an edge series for QAreaSeries cannot use OpenGL acceleration. When a chart contains any series that are drawn with OpenGL, a transparent QOpenGLWidget is created on top of the chart plot area. The accelerated series are not drawn on the underlying QGraphicsView , but are instead drawn on the created QOpenGLWidget .
Performance gained from using OpenGL to accelerate series drawing depends on the underlying hardware, but in most cases it is significant. For example, on a standard desktop computer, enabling OpenGL acceleration for a series typically allows rendering at least a hundred times more points without reduction on the frame rate. Chart size also has less effect on the frame rate.
The OpenGL acceleration of series drawing is meant for use cases that need fast drawing of large numbers of points. It is optimized for efficiency, and therefore the series using it lack support for many features available to non-accelerated series:
These additional restrictions stem from the fact that the accelerated series is drawn on a separate widget on top of the chart:
默認值為
false
.
訪問函數:
| bool | useOpenGL () const |
| void | setUseOpenGL (bool enable = true) |
通知程序信號:
| void | useOpenGLChanged () |
This property holds whether the series is visible or not.
默認情況下,
true
.
訪問函數:
| bool | isVisible () const |
| void | setVisible (bool visible = true) |
通知程序信號:
| void | visibleChanged () |
[signal]
void
QAbstractSeries::
nameChanged
()
This signal is emitted when the series name changes.
注意: 通知程序信號對於特性 name .
[signal]
void
QAbstractSeries::
opacityChanged
()
This signal is emitted when the opacity of the series changes.
注意: 通知程序信號對於特性 opacity .
[signal]
void
QAbstractSeries::
useOpenGLChanged
()
This signal is emitted when accelerating the drawing of the series by using OpenGL is enabled or disabled.
注意: 通知程序信號對於特性 useOpenGL .
[signal]
void
QAbstractSeries::
visibleChanged
()
This signal is emitted when the series visibility changes.
注意: 通知程序信號對於特性 visible .
[虛擬]
QAbstractSeries::
~QAbstractSeries
()
Virtual destructor for the chart series.
附加軸的指定是通過 axis 到係列。
返迴
true
若軸附加成功,
false
否則。
注意: If multiple axes of the same orientation are attached to the same series, they will have the same minimum and maximum values.
另請參閱 QChart::addAxis () 和 QChart::createDefaultAxes ().
Returns the list of axes attached to the series. Usually, an x-axis and a y-axis are attached to a series, except for QPieSeries , which does not have any axes attached.
另請參閱 attachAxis () 和 detachAxis ().
Returns the chart that the series belongs to.
Set automatically when the series is added to the chart, and unset when the series is removed from the chart.
Detaches the axis specified by axis from the series.
返迴
true
if the axis was detached successfully,
false
否則。
另請參閱 QChart::removeAxis ().
Sets the visibility of the series to
false
.
另請參閱 setVisible () 和 isVisible ().
Sets the visibility of the series to
true
.
另請參閱 setVisible () 和 isVisible ().