Attributes of an entry on a legend.
More...
#include <qwt_legend_data.h>
Attributes of an entry on a legend.
QwtLegendData is an abstract container ( like QAbstractModel ) to exchange attributes, that are only known between to the plot item and the legend.
By overloading QwtPlotItem::legendData() any other set of attributes could be used, that can be handled by a modified ( or completely different ) implementation of a legend.
- See also
- QwtLegend, QwtPlotLegendItem
- Note
- The stockchart example implements a legend as a tree with checkable items
◆ Mode
Mode defining how a legend entry interacts.
| Enumerator |
|---|
| ReadOnly | The legend item is not interactive, like a label.
|
| Clickable | The legend item is clickable, like a push button.
|
| Checkable | The legend item is checkable, like a checkable button.
|
◆ hasRole()
| bool QwtLegendData::hasRole |
( |
int |
role | ) |
const |
- Parameters
-
- Returns
- True, when the internal map has an entry for role
◆ icon()
- Returns
- Value of the IconRole attribute
◆ isValid()
| bool QwtLegendData::isValid |
( |
| ) |
const |
- Returns
- True, when the internal map is empty
◆ mode()
- Returns
- Value of the ModeRole attribute
◆ setValue()
| void QwtLegendData::setValue |
( |
int |
role, |
|
|
const QVariant & |
data |
|
) |
| |
Set an attribute value.
- Parameters
-
| role | Attribute role |
| data | Attribute value |
- See also
- value()
◆ setValues()
| void QwtLegendData::setValues |
( |
const QMap< int, QVariant > & |
map | ) |
|
◆ title()
| QwtText QwtLegendData::title |
( |
| ) |
const |
- Returns
- Value of the TitleRole attribute
◆ value()
| QVariant QwtLegendData::value |
( |
int |
role | ) |
const |
- Parameters
-
- Returns
- Attribute value for a specific role
◆ values()
| const QMap< int, QVariant > & QwtLegendData::values |
( |
| ) |
const |
The documentation for this class was generated from the following files:
- /home/runner/work/QWT/QWT/src/qwt_legend_data.h
- /home/runner/work/QWT/QWT/src/qwt_legend_data.cpp