QBoxSet Class▲
-
Header: QBoxSet
-
Inherited By:
-
Instantiated By: qml-qtcharts-boxset.xml
-
Inherits: QObject
-
Inherited By:
Detailed Description▲
A box-and-whiskers item is a graphical representation of a range and three median values that is constructed from five different values. There are two ways to specify the values. The first one is by using a constructor or stream operator (<<). The values have to be specified in the following order: lower extreme, lower quartile, median, upper quartile, and upper extreme.
The second way is to create an empty QBoxSet instance and specify the values using the setValue() method.
See the box-and-whiskers chart example to learn how to create a box-and-whiskers chart.
See Also▲
See also QBoxPlotSeries
Member Type Documentation▲
enum QBoxSet::ValuePositions▲
This enum type defines the values of a box-and-whiskers item:
Constant |
Value |
Description |
---|---|---|
QBoxSet::LowerExtreme |
0 |
The smallest value of the box-and-whiskers item. |
QBoxSet::LowerQuartile |
1 |
The median value of the lower half of the box-and-whiskers item. |
QBoxSet::Median |
2 |
The median value of the box-and-whiskers item. |
QBoxSet::UpperQuartile |
3 |
The median value of the upper half of the box-and-whiskers item. |
QBoxSet::UpperExtreme |
4 |
The largest value of the box-and-whiskers item. |
Property Documentation▲
brush : QBrush▲
This property holds the brush used fill the box of the box-and-whiskers item.
Access functions:
Notifier signal:
-
void brushChanged()
pen : QPen▲
This property holds the pen used to draw the lines of the box-and-whiskers item.
Access functions:
Notifier signal:
-
void penChanged()
Member Function Documentation▲
[explicit] QBoxSet::QBoxSet(const QString label = QString(), QObject *parent = nullptr)▲
Constructs a box-and-whiskers item with the optional label label and parent parent.
[explicit] QBoxSet::QBoxSet(const qreal le, const qreal lq, const qreal m, const qreal uq, const qreal ue, const QString label = QString(), QObject *parent = nullptr)▲
Constructs a box-and-whiskers item with the following ordered values: le specifies the lower extreme, lq the lower quartile, m the median, uq the upper quartile, and ue the upper quartile. Optionally, the label and parent can be specified.
[virtual] QBoxSet::~QBoxSet()▲
Destroys the a box-and-whiskers item.
void QBoxSet::append(const qreal value)▲
Appends the new value specified by value to the end of the box-and-whiskers item.
void QBoxSet::append(const QList<qreal> &values)▲
Appends a list of real values specified by values to the end of the box-and-whiskers item.
See Also▲
See also append()
qreal QBoxSet::at(const int index) const▲
Returns the value of the box-and-whiskers item specified by index. The index can be specified by using ValuePositions enumeration values. If the index is out of bounds, 0.0 is returned.
QBrush QBoxSet::brush() const▲
Returns the brush used to fill the box-and-whiskers item.
Getter function for property brush.
See Also▲
See also setBrush()
void QBoxSet::brushChanged()▲
This signal is emitted when the brush of the box-and-whiskers item changes.
Notifier signal for property brush.
See Also▲
See also brush
void QBoxSet::clear()▲
Sets all the values of the box-and-whiskers item to 0.
void QBoxSet::cleared()▲
This signal is emitted when all the values of the box-and-whiskers item are set to 0.
void QBoxSet::clicked()▲
This signal is emitted when the user clicks a box-and-whiskers item in the chart.
int QBoxSet::count() const▲
Returns the number of values appended to the box-and-whiskers item.
void QBoxSet::doubleClicked()▲
This signal is emitted when the user double-clicks a box-and-whiskers item.
void QBoxSet::hovered(bool status)▲
This signal is emitted when a mouse is hovered over a box-and-whiskers item in a chart. When the mouse moves over the item, status turns true, and when the mouse moves away again, it turns false.
QString QBoxSet::label() const▲
QPen QBoxSet::pen() const▲
Returns the pen used to draw the box-and-whiskers item.
Getter function for property pen.
See Also▲
See also setPen()
void QBoxSet::penChanged()▲
This signal is emitted when the pen of the box-and-whiskers item changes.
Notifier signal for property pen.
See Also▲
See also pen
void QBoxSet::pressed()▲
This signal is emitted when the user clicks a box-and-whiskers item in the chart and holds down the mouse button.
void QBoxSet::released()▲
This signal is emitted when the user releases the mouse press on a box-and-whiskers item.
void QBoxSet::setBrush(const QBrush &brush)▲
Sets the brush used to fill the box-and-whiskers item to brush.
Setter function for property brush.
See Also▲
See also brush()
void QBoxSet::setLabel(const QString label)▲
Sets the label specified by label for the category of the box-and-whiskers item.
See Also▲
See also label()
void QBoxSet::setPen(const QPen &pen)▲
Sets the pen used to draw the box-and-whiskers item to pen.
Setter function for property pen.
See Also▲
See also pen()
void QBoxSet::setValue(const int index, const qreal value)▲
Sets the value specified by value in the position specified by index. The index can be specified by using the ValuePositions enumeration values.
void QBoxSet::valueChanged(int index)▲
This signal is emitted when the value of the box-and-whiskers item specified by index is modified.
See Also▲
See also at()
void QBoxSet::valuesChanged()▲
This signal is emitted when multiple values of the box-and-whiskers item change.
See Also▲
See also append()
QBoxSet &QBoxSet::operator<<(const qreal &value)▲
A convenience operator for appending the real value specified by value to the end of the box-and-whiskers item.
See Also▲
See also append()
qreal QBoxSet::operator[](const int index) const▲
Returns the value of the box-and-whiskers item specified by index. The index can be specified by using ValuePositions enumeration values. If the index is out of bounds, 0.0 is returned.