Qwt User's Guide 6.0.2

- Main Page
- Related Pages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Slots | Signals | Public Member Functions | Protected Member Functions
QwtLegendItem Class Reference

`#include <qwt_legend_item.h>`

Inheritance diagram for QwtLegendItem:
[legend]

List of all members.

## Public Slots
void | setChecked (bool on)
Public Slots inherited from QwtTextLabel
void | clear ()
void | setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText)

## Signals
void | checked (bool)
void | clicked ()
void | pressed ()
void | released ()

## Public Member Functions
| QwtLegendItem (QWidget *parent=0)
virtual | ~QwtLegendItem ()
QPixmap | identifier () const
QSize | identifierSize () const
bool | isChecked () const
QwtLegend::LegendItemMode | itemMode () const
void | setIdentifier (const QPixmap &)
void | setIdentifierSize (const QSize &)
void | setItemMode (QwtLegend::LegendItemMode)
void | setSpacing (int spacing)
virtual void | setText (const QwtText &)
virtual QSize | sizeHint () const
int | spacing () const
Public Member Functions inherited from QwtTextLabel
| QwtTextLabel (QWidget *parent=NULL)
| QwtTextLabel (const QwtText &, QWidget *parent=NULL)
virtual | ~QwtTextLabel ()
virtual int | heightForWidth (int) const
int | indent () const
int | margin () const
virtual QSize | minimumSizeHint () const
void | setIndent (int)
void | setMargin (int)
const QwtText & | text () const
QRect | textRect () const

## Protected Member Functions
bool | isDown () const
virtual void | keyPressEvent (QKeyEvent *)
virtual void | keyReleaseEvent (QKeyEvent *)
virtual void | mousePressEvent (QMouseEvent *)
virtual void | mouseReleaseEvent (QMouseEvent *)
virtual void | paintEvent (QPaintEvent *)
void | setDown (bool)
Protected Member Functions inherited from QwtTextLabel
virtual void | drawContents (QPainter *)
virtual void | drawText (QPainter *, const QRect &)

## Detailed Description

A widget representing something on a QwtLegend().

## Constructor & Destructor Documentation

QwtLegendItem::QwtLegendItem | ( | QWidget * | parent = `0` | ) |
| explicit

Parameters:

  parent | Parent widget

## Member Function Documentation

QPixmap QwtLegendItem::identifier | ( |  | ) | const

Returns:
  pixmap representing a plot item

See also:
  setIdentifier()

QSize QwtLegendItem::identifierSize | ( |  | ) | const

Return the width of the identifier

See also:
  setIdentifierSize()

QwtLegend::LegendItemMode QwtLegendItem::itemMode | ( |  | ) | const

Return the item mode

See also:
  setItemMode()

void QwtLegendItem::setChecked | ( | bool | on | ) |
| slot

Check/Uncheck a the item

Parameters:

  on | check/uncheck

See also:
  setItemMode()

void QwtLegendItem::setIdentifier | ( | const QPixmap & | identifier | ) |

Assign the identifier The identifier needs to be created according to the identifierWidth()

Parameters:

  identifier | Pixmap representing a plot item

See also:
  identifier(), identifierWidth()

void QwtLegendItem::setIdentifierSize | ( | const QSize & | size | ) |

Set the size for the identifier Default is 8x8 pixels

Parameters:

  size | New size

See also:
  identifierSize()

void QwtLegendItem::setItemMode | ( | QwtLegend::LegendItemMode | mode | ) |

Set the item mode The default is QwtLegend::ReadOnlyItem

Parameters:

  mode | Item mode

See also:
  itemMode()

void QwtLegendItem::setSpacing | ( | int | spacing | ) |

Change the spacing

Parameters:

  spacing | Spacing

See also:
  spacing(), identifierWidth(), QwtTextLabel::margin()

void QwtLegendItem::setText | ( | const QwtText & | text | ) |
| virtual

Set the text to the legend item

Parameters:

  text | Text label

See also:
  QwtTextLabel::text()

Reimplemented from QwtTextLabel.

int QwtLegendItem::spacing | ( |  | ) | const

Return the spacing

See also:
  setSpacing(), identifierWidth(), QwtTextLabel::margin()