QScatterSeries Class

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
virtual void setBrush (const QBrush & brush )
virtual void setColor (const QColor & color )
virtual void setPen (const QPen & pen )
virtual QAbstractSeries::SeriesType type () const

信号

void borderColorChanged (QColor color )
void colorChanged (QColor color )
void markerShapeChanged (QScatterSeries::MarkerShape shape )
void markerSizeChanged (qreal size )

静态公共成员

const QMetaObject staticMetaObject

额外继承成员

详细描述

The QScatterSeries class presents data in scatter charts.

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);
					

更多信息,见 散点图表范例 and 散点交互范例 .

成员类型文档编制

enum QScatterSeries:: MarkerShape

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.

特性文档编制

borderColor : QColor

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 ().

brush : QBrush

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 )

color : QColor

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
virtual void setColor (const QColor & color )

通知程序信号:

void colorChanged (QColor color )

另请参阅 QScatterSeries::brush ().

markerShape : MarkerShape

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 .

markerSize : qreal

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 )

成员函数文档编制

QScatterSeries:: QScatterSeries ( QObject * parent = nullptr)

Constructs a series object that is a child of parent .

[虚拟] QScatterSeries:: ~QScatterSeries ()

Deletes the scatter series.

注意: Adding the series to QChart transfers the ownership to the chart.

[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 .

[虚拟] void QScatterSeries:: setBrush (const QBrush & brush )

重实现自 QXYSeries::setBrush ().

注意: setter 函数对于特性 brush .

另请参阅 brush ().

[虚拟] void QScatterSeries:: setPen (const QPen & pen )

重实现自 QXYSeries::setPen ().

[虚拟] QAbstractSeries::SeriesType QScatterSeries:: type () const

重实现自 QAbstractSeries::type ().