QwtLegendData(3) | Qwt User's Guide | QwtLegendData(3) |
NAME¶
QwtLegendData - Attributes of an entry on a legend.SYNOPSIS¶
#include <qwt_legend_data.h>
Public Types¶
enum Mode { ReadOnly, Clickable, Checkable }
Mode defining how a legend entry interacts. enum Role { ModeRole, TitleRole, IconRole, UserRole = 32 }
Identifier how to interprete a QVariant.
Public Member Functions¶
QwtLegendData ()
Constructor. ~QwtLegendData ()
Destructor. void setValues (const QMap< int, QVariant > &)
const QMap< int, QVariant > & values () const
void setValue (int role, const QVariant &)
QVariant value (int role) const
bool hasRole (int role) const
bool isValid () const
QwtGraphic icon () const
QwtText title () const
Mode mode () const
Detailed Description¶
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:
Member Enumeration Documentation¶
enum QwtLegendData::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.
Member Function Documentation¶
bool QwtLegendData::hasRole (int role) const¶
Parameters:Returns:
QwtGraphic QwtLegendData::icon () const¶
Returns:bool QwtLegendData::isValid () const¶
Returns:QwtLegendData::Mode QwtLegendData::mode () const¶
Returns:void QwtLegendData::setValue (int role, const QVariant & data)¶
Set an attribute valueParameters:
data Attribute value
See also:
void QwtLegendData::setValues (const QMap< int, QVariant > & map)¶
Set the legend attributesQwtLegendData actually is a QMap<int, QVariant> with some convenience interfaces
Parameters:
See also:
QwtText QwtLegendData::title () const¶
Returns:QVariant QwtLegendData::value (int role) const¶
Parameters:Returns:
const QMap< int, QVariant > & QwtLegendData::values () const¶
Returns:See also:
Author¶
Generated automatically by Doxygen for Qwt User's Guide from the source code.Wed Jan 2 2019 | Version 6.1.4 |