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 (const 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 override |
void | boxOutlineVisibilityChanged () |
void | boxWidthChanged () |
void | boxsetsAdded (const QList<QBoxSet *> & sets ) |
void | boxsetsRemoved (const 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 ) |
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.
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 .
This property holds the visibility of the box outline.
访问函数:
bool | boxOutlineVisible () |
void | setBoxOutlineVisible (bool visible ) |
通知程序信号:
void | boxOutlineVisibilityChanged () |
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 () |
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 () |
[read-only]
count
: const
int
This property holds the number of box-and-whiskers items in a box plot series.
访问函数:
int | count () const |
通知程序信号:
void | countChanged () |
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 () |
Constructs an empty box plot series that is a QObject 和子级对于 parent .
[signal]
void
QBoxPlotSeries::
boxOutlineVisibilityChanged
()
This signal is emitted when the box outline visibility changes.
注意: 通知程序信号对于特性 boxOutlineVisible .
[signal]
void
QBoxPlotSeries::
boxWidthChanged
()
This signal is emitted when the width of the box-and-whiskers item changes.
注意: 通知程序信号对于特性 boxWidth .
[signal]
void
QBoxPlotSeries::
boxsetsAdded
(const
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
(const
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 .
[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.
[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
.
[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.
[虚拟]
QBoxPlotSeries::
~QBoxPlotSeries
()
Removes the series from the chart.
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.
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.
Returns a list of box-and-whiskers items in a box plot series. Keeps the ownership of the items.
Removes all box-and-whiskers items from the series and permanently deletes them.
Returns the number of box-and-whiskers items in a box plot series.
注意: getter 函数对于特性 count。
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.
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.
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 操作成功。
[override virtual]
QAbstractSeries::SeriesType
QBoxPlotSeries::
type
() const
重实现访问函数为特性: QAbstractSeries::type .
Returns the type of the series.
另请参阅 QAbstractSeries and SeriesType .