QBarSet 类表示条形图表中的一组条形。 更多...
头: | #include <QBarSet> |
实例化: | BarSet |
继承: | QObject |
|
|
QBarSet (const QString label , QObject * parent = nullptr) | |
virtual | ~QBarSet () |
void | append (const qreal value ) |
void | append (const QList<qreal> & 值 ) |
qreal | at (const int index ) const |
QColor | borderColor () |
QBrush | brush () const |
QColor | color () |
int | count () const |
void | deselectAllBars () |
void | deselectBar (int index ) |
void | deselectBars (const QList<int> & indexes ) |
void | insert (const int index , const qreal value ) |
bool | isBarSelected (int index ) const |
QString | label () const |
QBrush | labelBrush () const |
QColor | labelColor () |
QFont | labelFont () const |
QPen | pen () const |
void | remove (const int index , const int count = 1) |
void | replace (const int index , const qreal value ) |
void | selectAllBars () |
void | selectBar (int index ) |
void | selectBars (const QList<int> & indexes ) |
QList<int> | selectedBars () const |
QColor | selectedColor () const |
void | setBarSelected (int index , bool selected ) |
void | setBorderColor (QColor color ) |
void | setBrush (const QBrush & brush ) |
void | setColor (QColor color ) |
void | setLabel (const QString label ) |
void | setLabelBrush (const QBrush & brush ) |
void | setLabelColor (QColor color ) |
void | setLabelFont (const QFont & font ) |
void | setPen (const QPen & pen ) |
void | setSelectedColor (const QColor & color ) |
qreal | sum () const |
void | toggleSelection (const QList<int> & indexes ) |
QBarSet & | operator<< (const qreal & value ) |
qreal | operator[] (const int index ) const |
void | borderColorChanged (QColor color ) |
void | brushChanged () |
void | clicked (int index ) |
void | colorChanged (QColor color ) |
void | doubleClicked (int index ) |
void | hovered (bool status , int index ) |
void | labelBrushChanged () |
void | labelChanged () |
void | labelColorChanged (QColor color ) |
void | labelFontChanged () |
void | penChanged () |
void | pressed (int index ) |
void | released (int index ) |
void | valueChanged (int index ) |
void | valuesAdded (int index , int count ) |
void | valuesRemoved (int index , int count ) |
条形集包含每个类别的一个数据值。假定集的第一个值属于第一个类别,第二个值属于第二个类别,依此类推。若集拥有的值少于类别,假定缺少值位于集末尾。对于集中间的缺少值,使用数值 0。0 值集标签不展示。
另请参阅 QAbstractBarSeries , QBarSeries , QStackedBarSeries , QPercentBarSeries , QHorizontalBarSeries , QHorizontalStackedBarSeries ,和 QHorizontalPercentBarSeries .
此特性保持条形集的线条 (钢笔) 颜色。
访问函数:
QColor | borderColor () |
void | setBorderColor (QColor color ) |
通知程序信号:
void | borderColorChanged (QColor color ) |
此特性保持用于填充条形集中条形的笔刷。
访问函数:
QBrush | brush () const |
void | setBrush (const QBrush & brush ) |
通知程序信号:
void | brushChanged () |
此特性保持条形集的填充 (笔刷) 颜色。
访问函数:
QColor | color () |
void | setColor (QColor color ) |
通知程序信号:
void | colorChanged (QColor color ) |
此特性保持条形集的标签。
访问函数:
QString | label () const |
void | setLabel (const QString label ) |
通知程序信号:
void | labelChanged () |
This property holds the brush used to draw the bar set's label.
访问函数:
QBrush | labelBrush () const |
void | setLabelBrush (const QBrush & brush ) |
通知程序信号:
void | labelBrushChanged () |
This property holds the text (label) color of the bar set.
访问函数:
QColor | labelColor () |
void | setLabelColor (QColor color ) |
通知程序信号:
void | labelColorChanged (QColor color ) |
This property holds the font used to draw the bar set's label.
访问函数:
QFont | labelFont () const |
void | setLabelFont (const QFont & font ) |
通知程序信号:
void | labelFontChanged () |
This property holds the pen used to draw the lines of bars in the bar set.
访问函数:
QPen | pen () const |
void | setPen (const QPen & pen ) |
通知程序信号:
void | penChanged () |
构造条形集采用标签 label and the parent parent .
[signal]
void
QBarSet::
borderColorChanged
(
QColor
color
)
This signal is emitted when the line (pen) color of the bar set changes to color .
注意: 通知程序信号对于特性 borderColor .
[signal]
void
QBarSet::
brushChanged
()
This signal is emitted when the brush used to draw the bar set changes.
注意: 通知程序信号对于特性 brush .
另请参阅 brush .
[signal]
void
QBarSet::
clicked
(
int
index
)
This signal is emitted when the user clicks the bar specified by index in a bar set.
[signal]
void
QBarSet::
colorChanged
(
QColor
color
)
This signal is emitted when the fill (brush) color of the bar set changes to color .
注意: 通知程序信号对于特性 color .
[signal]
void
QBarSet::
doubleClicked
(
int
index
)
This signal is emitted when the user double-clicks the bar specified by index in a bar set.
[signal]
void
QBarSet::
hovered
(
bool
status
,
int
index
)
This signal is emitted when a mouse is hovered over the bar specified by
index
in a bar set. When the mouse moves over the bar,
status
turns
true
, and when the mouse moves away again, it turns
false
.
[signal]
void
QBarSet::
labelBrushChanged
()
This signal is emitted when the brush used to draw the bar set's label changes.
注意: 通知程序信号对于特性 labelBrush .
另请参阅 labelBrush .
[signal]
void
QBarSet::
labelChanged
()
This signal is emitted when the label of the bar set changes.
注意: 通知程序信号对于特性 label .
另请参阅 label .
[signal]
void
QBarSet::
labelColorChanged
(
QColor
color
)
This signal is emitted when the text (label) color of the bar set changes to color .
注意: 通知程序信号对于特性 labelColor .
[signal]
void
QBarSet::
labelFontChanged
()
This signal is emitted when the font of the bar set's label changes.
注意: 通知程序信号对于特性 labelFont .
另请参阅 labelBrush .
[signal]
void
QBarSet::
penChanged
()
This signal is emitted when the pen used to draw the bar set changes.
注意: 通知程序信号对于特性 pen .
另请参阅 pen .
[signal]
void
QBarSet::
pressed
(
int
index
)
This signal is emitted when the user clicks the bar specified by index in a bar set and holds down the mouse button.
[signal]
void
QBarSet::
released
(
int
index
)
This signal is emitted when the user releases the mouse press on the bar specified by index in a bar set.
[signal]
void
QBarSet::
valueChanged
(
int
index
)
This signal is emitted when the value at the position specified by index 被修改。
另请参阅 at ().
[signal]
void
QBarSet::
valuesAdded
(
int
index
,
int
count
)
This signal is emitted when new values are added to the bar set. index indicates the position of the first inserted value, and count is the number of inserted values.
[signal]
void
QBarSet::
valuesRemoved
(
int
index
,
int
count
)
This signal is emitted when values are removed from the bar set. index indicates the position of the first removed value, and count is the number of removed values.
另请参阅 remove ().
[虚拟]
QBarSet::
~QBarSet
()
Removes the bar set.
Appends the new value specified by value to the end of the bar set.
Appends the list of real values specified by 值 to the end of the bar set.
另请参阅 append ().
Returns the value specified by index from the bar set. If the index is out of bounds, 0.0 is returned.
Returns the line color for the bar set.
注意: getter 函数对于特性 borderColor。
另请参阅 setBorderColor ().
Returns the brush used to fill the bars in the bar set.
注意: getter 函数对于特性 brush。
另请参阅 setBrush ().
Returns the fill color for the bar set.
注意: getter 函数对于特性 color。
另请参阅 setColor ().
Returns the number of values in a bar set.
[since 6.2]
void
QBarSet::
deselectAllBars
()
Deselects all bars in the series.
注意: Emits QBarSet::selectedBarsChanged.
该函数在 Qt 6.2 引入。
另请参阅 setBarSelected ().
[since 6.2]
void
QBarSet::
deselectBar
(
int
index
)
Deselects the bar at index .
注意: Emits QBarSet::selectedBarsChanged.
该函数在 Qt 6.2 引入。
另请参阅 setBarSelected ().
[since 6.2]
void
QBarSet::
deselectBars
(const
QList
<
int
> &
indexes
)
Marks multiple bars passed in an indexes list as deselected.
注意: Emits QBarSet::selectedBarsChanged.
该函数在 Qt 6.2 引入。
另请参阅 setBarSelected ().
插入 value in the position specified by index . The values following the inserted value are moved up one position.
另请参阅 remove ().
[since 6.2]
bool
QBarSet::
isBarSelected
(
int
index
) const
返回
true
if the bar at the given
index
is among selected bars and
false
否则。
注意: Selected bars are drawn using the selected color if it was specified using QBarSet::setSelectedColor .
该函数在 Qt 6.2 引入。
另请参阅 selectedBars (), setBarSelected (),和 setSelectedColor ().
Returns the label of the bar set.
注意: Getter function for property label.
另请参阅 setLabel ().
Returns the brush used to draw values on top of this bar set.
注意: Getter function for property labelBrush.
另请参阅 setLabelBrush ().
Returns the text color for the bar set.
注意: Getter function for property labelColor.
另请参阅 setLabelColor ().
Returns the pen used to draw values on top of this bar set.
注意: Getter function for property labelFont.
另请参阅 setLabelFont ().
Returns the pen used to draw the lines in the bar set.
注意: Getter function for property pen.
另请参阅 setPen ().
Removes the number of values specified by count from the bar set starting with the value specified by index .
另请参阅 insert ().
Adds the value specified by value to the bar set at the position specified by index .
[since 6.2]
void
QBarSet::
selectAllBars
()
Marks all bars in the series as selected.
注意: Emits QBarSet::selectedBarsChanged.
该函数在 Qt 6.2 引入。
另请参阅 setBarSelected ().
[since 6.2]
void
QBarSet::
selectBar
(
int
index
)
Marks the bar at index as selected.
注意: Emits QBarSet::selectedBarsChanged.
该函数在 Qt 6.2 引入。
另请参阅 setBarSelected ().
[since 6.2]
void
QBarSet::
selectBars
(const
QList
<
int
> &
indexes
)
Marks multiple bars passed in an indexes list as selected.
注意: Emits QBarSet::selectedBarsChanged.
该函数在 Qt 6.2 引入。
另请参阅 setBarSelected ().
[since 6.2]
QList
<
int
> QBarSet::
selectedBars
() const
Returns a list of bars marked as selected.
该函数在 Qt 6.2 引入。
另请参阅 setBarSelected ().
[since 6.2]
QColor
QBarSet::
selectedColor
() const
Returns the color of the selected bars.
This is the fill (brush) color of bars marked as selected. If not specified, value of QBarSet::color is used as default.
该函数在 Qt 6.2 引入。
另请参阅 setSelectedColor () 和 color .
[since 6.2]
void
QBarSet::
setBarSelected
(
int
index
,
bool
selected
)
Marks the bar at index as either selected or deselected as specified by selected .
注意: Selected bars are drawn using the selected color if it was specified. Emits QBarSet::selectedBarsChanged.
该函数在 Qt 6.2 引入。
另请参阅 isBarSelected () 和 setSelectedColor ().
将条形集的线颜色设为 color .
注意: setter 函数对于特性 borderColor .
另请参阅 borderColor ().
Sets the brush used to fill the bars in the bar set to brush .
注意: setter 函数对于特性 brush .
另请参阅 brush ().
将条形集的填充颜色设为 color .
注意: setter 函数对于特性 color .
另请参阅 color ().
设置 label as the new label for the bar set.
注意: setter 函数对于特性 label .
另请参阅 label ().
Sets the brush used to draw values on top of this bar set to brush .
注意: setter 函数对于特性 labelBrush .
另请参阅 labelBrush ().
Sets the text color for the bar set to color .
注意: setter 函数对于特性 labelColor .
另请参阅 labelColor ().
Sets the font used to draw values on top of this bar set to font .
注意: setter 函数对于特性 labelFont .
另请参阅 labelFont ().
Sets the pen used to draw the lines in the bar set to pen .
注意: setter 函数对于特性 pen .
另请参阅 pen ().
[since 6.2]
void
QBarSet::
setSelectedColor
(const
QColor
&
color
)
设置 color of the selected bars.
该函数在 Qt 6.2 引入。
另请参阅 selectedColor .
Returns the sum of all values in the bar set.
[since 6.2]
void
QBarSet::
toggleSelection
(const
QList
<
int
> &
indexes
)
Changes the selection state of bars at the given indexes to the opposite one.
注意: Emits QBarSet::selectedBarsChanged.
该函数在 Qt 6.2 引入。
另请参阅 setBarSelected ().
A convenience operator for appending the real value specified by value to the end of the bar set.
另请参阅 append ().
Returns the value of the bar set specified by index . If the index is out of bounds, 0.0 is returned.