The QBoxSet class represents one item in a box-and-whiskers chart. 更多...
| 头: | #include <QBoxSet> | 
| 实例化: | BoxSet | 
| 继承: | QObject | 
| 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> & 值 ) | 
| 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 () | 
| const QMetaObject | staticMetaObject | 
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 () 方法。
见 box-and-whiskers chart example to learn how to create a box-and-whiskers chart.
另请参阅 QBoxPlotSeries .
This enum type defines the values of a box-and-whiskers item:
| 常量 | 值 | 描述 | 
|---|---|---|
| 
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.
访问函数:
| QBrush | brush () const | 
| void | setBrush (const QBrush & brush ) | 
通知程序信号:
| void | brushChanged () | 
This property holds the pen used to draw the lines of the box-and-whiskers item.
访问函数:
| QPen | pen () const | 
| void | setPen (const QPen & pen ) | 
通知程序信号:
| void | penChanged () | 
Constructs a box-and-whiskers item with the optional label label 和父级 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.
[虚拟]
						
						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 值 to the end of the box-and-whiskers item.
另请参阅 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.
注意: getter 函数对于特性 brush .
另请参阅 setBrush ().
[signal]
						
						
							void
						
						QBoxSet::
						
							brushChanged
						
						()
						
					This signal is emitted when the brush of the box-and-whiskers item changes.
注意: 通知程序信号对于特性 brush .
另请参阅 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.
另请参阅 setLabel ().
Returns the pen used to draw the box-and-whiskers item.
注意: getter 函数对于特性 pen .
另请参阅 setPen ().
[signal]
						
						
							void
						
						QBoxSet::
						
							penChanged
						
						()
						
					This signal is emitted when the pen of the box-and-whiskers item changes.
注意: 通知程序信号对于特性 pen .
另请参阅 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 .
注意: setter 函数对于特性 brush .
另请参阅 brush ().
Sets the label specified by label for the category of the box-and-whiskers item.
另请参阅 label ().
Sets the pen used to draw the box-and-whiskers item to pen .
注意: setter 函数对于特性 pen .
另请参阅 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 被修改。
另请参阅 at ().
[signal]
						
						
							void
						
						QBoxSet::
						
							valuesChanged
						
						()
						
					This signal is emitted when multiple values of the box-and-whiskers item change.
另请参阅 append ().
A convenience operator for appending the real value specified by value to the end of the box-and-whiskers item.
另请参阅 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.