QwtLegendData¶
-
class
qwt.legend_data.
QwtLegendData
[source]¶ 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
Note
The stockchart example implements a legend as a tree with checkable items
-
hasRole
(role)[source]¶ Parameters: role (int) – Attribute role Returns: True, when the internal map has an entry for role
-
setValue
(role, data)[source]¶ Set an attribute value
Parameters: - role (int) – Attribute role
- data (QVariant) – Attribute value
See also
-
-
class
qwt.legend_data.
QwtLegendData
[source] 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
Note
The stockchart example implements a legend as a tree with checkable items
-
values
()[source] Returns: Legend attributes See also
-
hasRole
(role)[source] Parameters: role (int) – Attribute role Returns: True, when the internal map has an entry for role
-
setValue
(role, data)[source] Set an attribute value
Parameters: - role (int) – Attribute role
- data (QVariant) – Attribute value
See also
-
value
(role)[source] Parameters: role (int) – Attribute role Returns: Attribute value for a specific role See also
-
isValid
()[source] Returns: True, when the internal map is empty
-
title
()[source] Returns: Value of the TitleRole attribute
-
icon
()[source] Returns: Value of the IconRole attribute
-
mode
()[source] Returns: Value of the ModeRole attribute
-