QBoxPlotSeries Class

The QBoxPlotSeries class presents data in box-and-whiskers charts. 更多...

头: #include <QBoxPlotSeries>
实例化: BoxPlotSeries
继承: QAbstractSeries

特性

公共函数

QBoxPlotSeries (QObject * parent = nullptr)
virtual ~QBoxPlotSeries ()
bool append (QBoxSet * set )
bool append (QList<QBoxSet *> sets )
bool boxOutlineVisible ()
QList<QBoxSet *> boxSets () const
qreal boxWidth ()
QBrush brush () const
void clear ()
int count () const
bool insert (int index , QBoxSet * set )
QPen pen () const
bool remove (QBoxSet * set )
void setBoxOutlineVisible (bool visible )
void setBoxWidth (qreal width )
void setBrush (const QBrush & brush )
void setPen (const QPen & pen )
bool take (QBoxSet * set )

重实现公共函数

virtual QAbstractSeries::SeriesType type () const

信号

void boxOutlineVisibilityChanged ()
void boxWidthChanged ()
void boxsetsAdded (QList<QBoxSet *> sets )
void boxsetsRemoved (QList<QBoxSet *> sets )
void brushChanged ()
void clicked (QBoxSet * boxset )
void countChanged ()
void doubleClicked (QBoxSet * boxset )
void hovered (bool status , QBoxSet * boxset )
void penChanged ()
void pressed (QBoxSet * boxset )
void released (QBoxSet * boxset )

静态公共成员

const QMetaObject staticMetaObject

额外继承成员

详细描述

The QBoxPlotSeries class presents data in box-and-whiskers charts.

A box plot series acts as a container for box-and-whiskers items. Items from multiple series are grouped into categories according to their index value.

The QBarCategoryAxis class is used to add the categories to the chart's axis. Category labels have to be unique. If the same category label is defined for several box-and-whiskers items, only the first one is drawn.

box-and-whiskers chart example to learn how to create a box-and-whiskers chart.

另请参阅 QBoxSet and QBarCategoryAxis .

特性文档编制

boxOutlineVisible : bool

This property holds the visibility of the box outline.

访问函数:

bool boxOutlineVisible ()
void setBoxOutlineVisible (bool visible )

通知程序信号:

void boxOutlineVisibilityChanged ()

boxWidth : qreal

This property holds the width of the box-and-whiskers item. The value indicates the relative width of the item within its category. The value can be between 0.0 and 1.0. Negative values are replaced with 0.0 and values greater than 1.0 are replaced with 1.0.

访问函数:

qreal boxWidth ()
void setBoxWidth (qreal width )

通知程序信号:

void boxWidthChanged ()

brush : QBrush

This property holds the brush used to fill the boxes of the box-and-whiskers items.

访问函数:

QBrush brush () const
void setBrush (const QBrush & brush )

通知程序信号:

void brushChanged ()

count : const int

This property holds the number of box-and-whiskers items in a box plot series.

访问函数:

int count () const

通知程序信号:

void countChanged ()

pen : QPen

This property holds the pen used to draw the lines of the box-and-whiskers items.

访问函数:

QPen pen () const
void setPen (const QPen & pen )

通知程序信号:

void penChanged ()

成员函数文档编制

QBoxPlotSeries:: QBoxPlotSeries ( QObject * parent = nullptr)

Constructs an empty box plot series that is a QObject 和子级对于 parent .

[虚拟] QBoxPlotSeries:: ~QBoxPlotSeries ()

Removes the series from the chart.

bool QBoxPlotSeries:: append ( QBoxSet * set )

Adds a single box-and-whiskers item specified by set to the series and takes ownership of it. If the item is null or it already belongs to the series, it will not be appended. Returns true if appending succeeded.

bool QBoxPlotSeries:: append ( QList < QBoxSet *> sets )

Adds a list of box-and-whiskers items specified by sets to the series and takes ownership of them. If the list is null or the items already belong to the series, it will not be appended. Returns true if appending succeeded.

[signal] void QBoxPlotSeries:: boxOutlineVisibilityChanged ()

This signal is emitted when the box outline visibility changes.

注意: 通知程序信号对于特性 boxOutlineVisible .

QList < QBoxSet *> QBoxPlotSeries:: boxSets () const

Returns a list of box-and-whiskers items in a box plot series. Keeps the ownership of the items.

[signal] void QBoxPlotSeries:: boxWidthChanged ()

This signal is emitted when the width of the box-and-whiskers item changes.

注意: 通知程序信号对于特性 boxWidth .

[signal] void QBoxPlotSeries:: boxsetsAdded ( QList < QBoxSet *> sets )

This signal is emitted when the list of box-and-whiskers items specified by sets is added to the series.

[signal] void QBoxPlotSeries:: boxsetsRemoved ( QList < QBoxSet *> sets )

This signal is emitted when the list of box-and-whiskers items specified by sets is removed from the series.

[signal] void QBoxPlotSeries:: brushChanged ()

This signal is emitted when the brush used to fill the boxes of the box-and-whiskers items changes.

注意: 通知程序信号对于特性 brush .

void QBoxPlotSeries:: clear ()

Removes all box-and-whiskers items from the series and permanently deletes them.

[signal] void QBoxPlotSeries:: clicked ( QBoxSet * boxset )

This signal is emitted when the user clicks the box-and-whiskers item specified by boxset in the chart.

int QBoxPlotSeries:: count () const

Returns the number of box-and-whiskers items in a box plot series.

注意: getter 函数对于特性 count .

[signal] void QBoxPlotSeries:: countChanged ()

This signal is emitted when the number of box-and-whiskers items in the series changes.

注意: 通知程序信号对于特性 count .

[signal] void QBoxPlotSeries:: doubleClicked ( QBoxSet * boxset )

This signal is emitted when the user double-clicks the box-and-whiskers item specified by boxset in the chart.

[signal] void QBoxPlotSeries:: hovered ( bool status , QBoxSet * boxset )

This signal is emitted when a mouse is hovered over the box-and-whiskers item specified by boxset in the chart. When the mouse moves over the item, status turns true , and when the mouse moves away again, it turns false .

bool QBoxPlotSeries:: insert ( int index , QBoxSet * set )

Inserts a box-and-whiskers item specified by set to a series at the position specified by index and takes ownership of the item. If the item is null or already belongs to the series, it will not be appended. Returns true if inserting succeeds.

[signal] void QBoxPlotSeries:: penChanged ()

This signal is emitted when the pen used to draw the lines of the box-and-whiskers items changes.

注意: 通知程序信号对于特性 pen .

[signal] void QBoxPlotSeries:: pressed ( QBoxSet * boxset )

This signal is emitted when the user clicks the box-and-whiskers item specified by boxset in the chart and holds down the mouse button.

[signal] void QBoxPlotSeries:: released ( QBoxSet * boxset )

This signal is emitted when the user releases the mouse press on the box-and-whiskers item specified by boxset in the chart.

bool QBoxPlotSeries:: remove ( QBoxSet * set )

Removes the box-and-whiskers item specified by set from the series and permanently deletes it if the removal succeeds. Returns true if the item was removed.

bool QBoxPlotSeries:: take ( QBoxSet * set )

Takes the box-and-whiskers item specified by set from the series. Does not delete the item.

注意: The series remains the item's parent object. You must set the parent object to take full ownership.

返回 true 若 take 操作成功。

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

重实现自 QAbstractSeries::type ().

Returns the type of the series.

另请参阅 QAbstractSeries and SeriesType .