Reference documentation
Public Member Functions | Protected Member Functions | List of all members
ChartLegend Class Referenceabstract

The Thistle::ChartLegend class provides an abstract base for chart legends painting. More...

Inheritance diagram for ChartLegend:
LinearChartLegend PieChartLegend RadialChartLegend

Public Member Functions

 ChartLegend (AbstractChart *chart)
 Constructs a ChartLegend object for the given chart.
 
virtual void paint (QPainter &painter) const
 Paints the legend of the chart on the given QPainter. More...
 

Protected Member Functions

virtual void paintSerie (QPainter &painter, int serie, QPoint pos, int maxHeight) const =0
 Paints the serie on the given QPainter. More...
 

Detailed Description

The Thistle::ChartLegend class provides an abstract base for chart legends painting.

The Thistle::ChartLegend class provides an abstract base for chart legends painting.

Member Function Documentation

void paint ( QPainter &  painter) const
virtual

Paints the legend of the chart on the given QPainter.

The legend of a serie is the text in the Horizontal QHeaderView and the style defined for each column.

Reimplemented in PieChartLegend.

void paintSerie ( QPainter &  painter,
int  serie,
QPoint  pos,
int  maxHeight 
) const
protectedpure virtual

Paints the serie on the given QPainter.

The serie will be painted at pos. maxHeight indicates the maximum height allowed to paint the legend. The width should be calculates by the chart itself.

This method sucks and has to be modified.

Implemented in RadialChartLegend, LinearChartLegend, and PieChartLegend.