Class QAccelPlot::Category¶
ClassList > QAccelPlot > Category
One category of a BarSeries orRectangleSeries : a value, a name, and a fill color.More...
#include <Category.hpp>
Inherits the following classes: QObject
Inheritance diagram¶
flowchart TB
classQAccelPlot_1_1Category["QAccelPlot::Category"]
external_base_classQAccelPlot_1_1Category_1["QObject"]
external_base_classQAccelPlot_1_1Category_1 --> classQAccelPlot_1_1Category
Public Properties¶
| Type | Name |
|---|---|
| property QColor | color Fill color. Default: an invalid color, which uses the series color . |
| property QString | name Name for the legend, categoryName , and QML data. Default: empty. |
| property int | value Value that data points carry as their category . Default: 0. |
Public Signals¶
| Type | Name |
|---|---|
| signal void | colorChanged Emitted when the color property changes. |
| signal void | nameChanged Emitted when the name property changes. |
| signal void | valueChanged Emitted when the value property changes. |
Public Functions¶
| Type | Name |
|---|---|
| Category (QObject * parent=nullptr) Constructs a category with value 0, no name, and no color, owned by parent . |
|
| Category (int value, QString name, const QColor & color, QObject * parent=nullptr) Constructs a category with value _,_name , and__color , owned by__parent . |
|
| QColor | color () const Returns the fill color. |
| QString | name () const Returns the name. |
| void | setColor (const QColor & color) Sets the fill color to color . An invalid color uses the series color . |
| void | setName (const QString & name) Sets the name to name . |
| void | setValue (int value) Sets the value data points carry to value . |
| int | value () const Returns the value data points carry. |
Detailed Description¶
Data points carry the category value as their category. The name labels the category in the legend and in barAt() / rectangleAt(), and QML data can use it instead of the value.
QAccelPlot.RectangleSeries {
categories: [
QAccelPlot.Category { value: 0; name: "Running"; color: "seagreen" },
QAccelPlot.Category { value: 1; name: "Alarm"; color: "firebrick" }
]
}
See also: BarSeries::categories, RectangleSeries::categories
Public Properties Documentation¶
property color¶
Fill color. Default: an invalid color, which uses the series color .
property name¶
Name for the legend, categoryName , and QML data. Default: empty.
property value¶
Value that data points carry as their category . Default: 0.
Public Signals Documentation¶
signal colorChanged¶
Emitted when the color property changes.
signal nameChanged¶
Emitted when the name property changes.
signal valueChanged¶
Emitted when the value property changes.
Public Functions Documentation¶
function Category¶
Constructs a category with value 0, no name, and no color, owned by parent .
function Category¶
Constructs a category with value _,_name , and__color , owned by__parent .
QAccelPlot::Category::Category (
int value,
QString name,
const QColor & color,
QObject * parent=nullptr
)
function color¶
Returns the fill color.
function name¶
Returns the name.
function setColor¶
Sets the fill color to color . An invalid color uses the seriescolor .
function setName¶
Sets the name to name .
function setValue¶
Sets the value data points carry to value .
function value¶
Returns the value data points carry.
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/series/Category.hpp