QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
QwtLegendData Class Reference

Attributes of an entry on a legend. More...

#include <qwt_legend_data.h>

Public Types

enum  Mode { ReadOnly , Clickable , Checkable }
 Mode defining how a legend entry interacts . More...
 
enum  Role { ModeRole , TitleRole , IconRole , UserRole = 32 }
 Identifier how to interpret a QVariant . More...
 

Public Member Functions

 QwtLegendData ()
 Constructor .
 
 ~QwtLegendData ()
 Destructor .
 
void setValues (const QMap< int, QVariant > &)
 Set the legend attributes.
 
const QMap< int, QVariant > & values () const
 Return the legend attributes.
 
void setValue (int role, const QVariant &)
 Set an attribute value.
 
QVariant value (int role) const
 Return the attribute value for a specific role.
 
bool hasRole (int role) const
 Check if a value exists for a specific role.
 
bool isValid () const
 Check if the legend data is valid.
 
QwtGraphic icon () const
 Return the icon.
 
QwtText title () const
 Return the title.
 
Mode mode () const
 Return the mode.
 

Detailed Description

Attributes of an entry on a legend.

Member Enumeration Documentation

◆ 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 .

◆ Role

Identifier how to interpret a QVariant .

Enumerator
ModeRole 

The value is a Mode .

TitleRole 

The value is a title .

IconRole 

The value is an icon .

UserRole 

Values < UserRole are reserved for internal use .

Constructor & Destructor Documentation

◆ QwtLegendData()

QwtLegendData::QwtLegendData ( )

Constructor .

◆ ~QwtLegendData()

QwtLegendData::~QwtLegendData ( )

Destructor .

Member Function Documentation

◆ hasRole()

bool QwtLegendData::hasRole ( int  role) const

Check if a value exists for a specific role.

◆ icon()

QwtGraphic QwtLegendData::icon ( ) const

Return the icon.

◆ isValid()

bool QwtLegendData::isValid ( ) const

Check if the legend data is valid.

◆ mode()

QwtLegendData::Mode QwtLegendData::mode ( ) const

Return the mode.

◆ setValue()

void QwtLegendData::setValue ( int  role,
const QVariant &  data 
)

Set an attribute value.

◆ setValues()

void QwtLegendData::setValues ( const QMap< int, QVariant > &  map)

Set the legend attributes.

◆ title()

QwtText QwtLegendData::title ( ) const

Return the title.

◆ value()

QVariant QwtLegendData::value ( int  role) const

Return the attribute value for a specific role.

◆ values()

const QMap< int, QVariant > & QwtLegendData::values ( ) const

Return the legend attributes.


The documentation for this class was generated from the following files: