The QBoxSet class represents one item in a box-and-whiskers chart. More...
enum | ValuePositions { LowerExtreme, LowerQuartile, Median, UpperQuartile, UpperExtreme } |
QBoxSet(const QString label = QString(), QObject *parent = nullptr) | |
QBoxSet(const qreal le, const qreal lq, const qreal m, const qreal uq, const qreal ue, const QString label = QString(), QObject *parent = nullptr) | |
virtual | ~QBoxSet() |
void | append(const qreal value) |
void | append(const QList<qreal> &values) |
qreal | at(const int index) const |
QBrush | brush() const |
void | clear() |
int | count() const |
QString | label() const |
QPen | pen() const |
void | setBrush(const QBrush &brush) |
void | setLabel(const QString label) |
void | setPen(const QPen &pen) |
void | setValue(const int index, const qreal value) |
QBoxSet & | operator<<(const qreal &value) |
qreal | operator[](const int index) const |
void | brushChanged() |
void | cleared() |
void | clicked() |
void | doubleClicked() |
void | hovered(bool status) |
void | penChanged() |
void | pressed() |
void | released() |
void | valueChanged(int index) |
void | valuesChanged() |
The QBoxSet class represents one item in a box-and-whiskers chart.
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 QBoxPlotSeries.
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. |
This property holds the brush used fill the box of the box-and-whiskers item.
Access functions:
Notifier signal:
void | brushChanged() |
This property holds the pen used to draw the lines of the box-and-whiskers item.
Access functions:
Notifier signal:
void | penChanged() |
Constructs a box-and-whiskers item with the optional label label and parent parent.
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.
Appends the new value specified by value to the end of the box-and-whiskers item.
Appends a list of real values specified by values to the end of the box-and-whiskers item.
See also append().
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.
Returns the brush used to fill the box-and-whiskers item.
Note: Getter function for property brush.
See also setBrush().
[signal]
void QBoxSet::brushChanged()This signal is emitted when the brush of the box-and-whiskers item changes.
Note: Notifier signal for property brush.
See also brush.
Sets all the values of the box-and-whiskers item to 0.
[signal]
void QBoxSet::cleared()This signal is emitted when all the values of the box-and-whiskers item are set to 0.
[signal]
void QBoxSet::clicked()This signal is emitted when the user clicks a box-and-whiskers item in the chart.
Returns the number of values appended to the box-and-whiskers item.
[signal]
void QBoxSet::doubleClicked()This signal is emitted when the user double-clicks a box-and-whiskers item.
[signal]
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
.
Returns the label of the category of the box-and-whiskers item.
See also setLabel().
Returns the pen used to draw the box-and-whiskers item.
Note: Getter function for property pen.
See also setPen().
[signal]
void QBoxSet::penChanged()This signal is emitted when the pen of the box-and-whiskers item changes.
Note: Notifier signal for property pen.
See also pen.
[signal]
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.
[signal]
void QBoxSet::released()This signal is emitted when the user releases the mouse press on a box-and-whiskers item.
Sets the brush used to fill the box-and-whiskers item to brush.
Note: Setter function for property brush.
See also brush().
Sets the label specified by label for the category of the box-and-whiskers item.
See also label().
Sets the pen used to draw the box-and-whiskers item to pen.
Note: Setter function for property pen.
See also pen().
Sets the value specified by value in the position specified by index. The index can be specified by using the ValuePositions enumeration values.
[signal]
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 at().
[signal]
void QBoxSet::valuesChanged()This signal is emitted when multiple values of the box-and-whiskers item change.
See also append().
A convenience operator for appending the real value specified by value to the end of the box-and-whiskers item.
See also append().
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.