# class toLegendChart

A widget that displays a legend to other charts. More...

Definition | `#include <tolegendchart.h>`
Inherits | QWidget (qt) [public ]
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- toLegendChart (int columns,QWidget *parent=NULL,const char *name=NULL,WFlags f=0)
- void setTitle (const QString &title=QString::null)
- const QString & title (void)
- void setLabels (std::list<QString> &labels)
- void addLabel (const QString &label)
- std::list<QString> & labels (void)
- virtual QSize sizeHint ()

#### Protected Methods

- virtual void paintEvent (QPaintEvent *e)

## Detailed Description

A widget that displays a legend to other charts.

toLegendChart (int columns,QWidget *parent=NULL,const char *name=NULL,WFlags f=0)

### toLegendChart

Create a new legend.

Parameters:

columns | Columns.
parent | Parent widget.
name | Name of widget.
f | Widget flags.

void setTitle (const QString &title=QString::null)

### setTitle

Set title of the chart. Set to empty string to not display title.

Parameters:

title | Title of chart.

const QString & title (void)

### title

Get title of chart.

Returns: Title of chart.

void setLabels (std::list<QString> &labels)

### setLabels

Set list of chart labels.

Parameters:

labels | List of labels, if label is empty it will not appear in legend.

void addLabel (const QString &label)

### addLabel

Add a value to the chart.

Parameters:

value | New value to add.
label | Label of this new value.

std::list<QString> & labels (void)

### labels

Get labels of chart.

Returns: List of labels.

QSize sizeHint ()

### sizeHint

[virtual]

Reimplemented for internal reasons.

void paintEvent (QPaintEvent *e)

### paintEvent

[protected virtual]

Reimplemented for internal reasons.

Generated by: nneul on skyhawk on Wed Feb 23 19:49:58 2005, using kdoc 2.0a54.