Class QAccelPlot::Internal::CategoryTable¶
ClassList > QAccelPlot > Internal > CategoryTable
A snapshot of the categories of a series, looked up by value or name.
#include <CategoryTable.hpp>
Classes¶
| Type | Name |
|---|---|
| struct | Entry One category: the value data points carry, an optional name, and an optional color. |
Public Functions¶
| Type | Name |
|---|---|
| QColor | color (int value) const Returns the color of the category with value , or an invalid color when it has none. |
| std::optional< int > | dataPointCategory (const QVariant & value, const char * seriesName, qsizetype index) const Returns the category in value , the category of the QML data point at__index . |
| bool | empty () const Returns true when there are no categories. |
| const std::vector< Entry > & | entries () const Returns the categories in list order. |
| QList< LegendEntry > | legendEntries (const LegendEntry & seriesEntry) const Returns one legend entry per category: seriesEntry with the category's name and color. |
| QString | name (int value) const Returns the name of the category with value , or an empty string when it has none. |
| const QStringList & | problems () const Returns a description of each category the snapshot skipped or could not name. |
Public Static Functions¶
| Type | Name |
|---|---|
| CategoryTable | fromCategories (const QList< Category * > & categories) Takes a snapshot of categories , skipping null entries. |
Public Functions Documentation¶
function color¶
Returns the color of the category with value , or an invalid color when it has none.
function dataPointCategory¶
Returns the category in value , thecategory of the QML data point at__index .
std::optional< int > QAccelPlot::Internal::CategoryTable::dataPointCategory (
const QVariant & value,
const char * seriesName,
qsizetype index
) const
A number must be a whole number; a string is a category name. Returns std::nullopt for a missing or null value, and for any other value, which logs a warning naming seriesName.
function empty¶
Returns true when there are no categories.
function entries¶
Returns the categories in list order.
function legendEntries¶
Returns one legend entry per category: seriesEntry with the category's name and color.
QList< LegendEntry > QAccelPlot::Internal::CategoryTable::legendEntries (
const LegendEntry & seriesEntry
) const
A category without a name is labeled with its value; one without a color keeps the series color.
function name¶
Returns the name of the category with value , or an empty string when it has none.
function problems¶
Returns a description of each category the snapshot skipped or could not name.
Public Static Functions Documentation¶
function fromCategories¶
Takes a snapshot of categories , skipping null entries.
static CategoryTable QAccelPlot::Internal::CategoryTable::fromCategories (
const QList< Category * > & categories
)
Keeps the first of categories that share a value or a name, and describes each later one in problems().
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/series/internal/CategoryTable.hpp