The QScatterSeries class presents data in scatter charts. 更多...
| 頭: | #include <QScatterSeries> |
| 實例化: | ScatterSeries |
| 繼承: | QXYSeries |
| enum | MarkerShape { MarkerShapeCircle, MarkerShapeRectangle } |
|
|
| QScatterSeries (QObject * parent = nullptr) | |
| virtual | ~QScatterSeries () |
| QColor | borderColor () const |
| QBrush | brush () const |
| QScatterSeries::MarkerShape | markerShape () const |
| qreal | markerSize () const |
| void | setBorderColor (const QColor & color ) |
| void | setMarkerShape (QScatterSeries::MarkerShape shape ) |
| void | setMarkerSize (qreal size ) |
| virtual QColor | color () const override |
| virtual void | setBrush (const QBrush & brush ) override |
| virtual void | setColor (const QColor & color ) override |
| virtual void | setPen (const QPen & pen ) override |
| virtual QAbstractSeries::SeriesType | type () const override |
| void | borderColorChanged (QColor color ) |
| void | colorChanged (QColor color ) |
| void | markerShapeChanged (QScatterSeries::MarkerShape shape ) |
| void | markerSizeChanged (qreal size ) |
The scatter data is displayed as a collection of points on the chart. For each point, two values are specified that determine its position on the horizontal axis and the vertical axis.
The following code snippet illustrates how to create a basic scatter chart:
QScatterSeries* series = new QScatterSeries(); series->append(0, 6); series->append(2, 4); ... chart->addSeries(series);
This enum value describes the shape used when rendering marker items.
| 常量 | 值 | 描述 |
|---|---|---|
QScatterSeries::MarkerShapeCircle
|
0
|
The marker is a circle. This is the default value. |
QScatterSeries::MarkerShapeRectangle
|
1
|
The marker is a rectangle. |
This property holds the color used to draw the marker borders.
This is a convenience property for modifying the color of the pen.
訪問函數:
| QColor | borderColor () const |
| void | setBorderColor (const QColor & color ) |
通知程序信號:
| void | borderColorChanged (QColor color ) |
另請參閱 QScatterSeries::pen ().
This property holds the brush used to draw the scatter series markers.
The brush can be an image that can be created using QPainterPath ,例如。
訪問函數:
| QBrush | brush () const |
| virtual void | setBrush (const QBrush & brush ) override |
This property holds the color used to fill the series markers.
This is a convenience property for modifying the color of the brush.
訪問函數:
| virtual QColor | color () const override |
| virtual void | setColor (const QColor & color ) override |
通知程序信號:
| void | colorChanged (QColor color ) |
另請參閱 QScatterSeries::brush ().
This property holds the shape of the marker used to render the points in the series.
The default shape is MarkerShapeCircle .
訪問函數:
| QScatterSeries::MarkerShape | markerShape () const |
| void | setMarkerShape (QScatterSeries::MarkerShape shape ) |
通知程序信號:
| void | markerShapeChanged (QScatterSeries::MarkerShape shape ) |
另請參閱 MarkerShape .
This property holds the size of the marker used to render the points in the series.
The default size is 15.0.
訪問函數:
| qreal | markerSize () const |
| void | setMarkerSize (qreal size ) |
通知程序信號:
| void | markerSizeChanged (qreal size ) |
Constructs a series object that is a child of parent .
[signal]
void
QScatterSeries::
borderColorChanged
(
QColor
color
)
This signal is emitted when the line (pen) color changes to color .
注意: 通知程序信號對於特性 borderColor .
[signal]
void
QScatterSeries::
colorChanged
(
QColor
color
)
This signal is emitted when the fill (brush) color changes to color .
注意: 通知程序信號對於特性 color .
[signal]
void
QScatterSeries::
markerShapeChanged
(
QScatterSeries::MarkerShape
shape
)
This signal is emitted when the marker shape changes to shape .
注意: 通知程序信號對於特性 markerShape .
[signal]
void
QScatterSeries::
markerSizeChanged
(
qreal
size
)
This signal is emitted when the marker size changes to size .
注意: 通知程序信號對於特性 markerSize .
[虛擬]
QScatterSeries::
~QScatterSeries
()
Deletes the scatter series.
注意: Adding the series to QChart transfers the ownership to the chart.
[override virtual]
void
QScatterSeries::
setBrush
(const
QBrush
&
brush
)
重實現: QXYSeries::setBrush (const QBrush &brush).
另請參閱 brush ().
[override virtual]
void
QScatterSeries::
setPen
(const
QPen
&
pen
)
重實現: QXYSeries::setPen (const QPen &pen).
[override virtual]
QAbstractSeries::SeriesType
QScatterSeries::
type
() const
重實現訪問函數為特性: QAbstractSeries::type .