class toPieChart

A widget that displays a piechart. More...

Definition#include <topiechart.h>
InheritsQWidget (qt) [public ]
Inherited bytoResultPie
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Signals

Protected Methods


Detailed Description

A widget that displays a piechart.

void  mouseDoubleClickEvent (QMouseEvent *e)

mouseDoubleClickEvent

[protected virtual]

Reimplemented from QWidget.

void  mousePressEvent (QMouseEvent *e)

mousePressEvent

[protected virtual]

Reimplemented from QWidget.

 toPieChart (QWidget *parent=NULL,const char *name=NULL,WFlags f=0)

toPieChart

Create a new piechart.

Parameters:
parentParent widget.
nameName of widget.
fWidget flags.

 toPieChart (toPieChart *pie,QWidget *parent=NULL,const char *name=NULL,WFlags f=0)

toPieChart

Create a copy of a piechart.

Parameters:
piePie chart to copy.
parentParent widget.
nameName of widget.
fWidget flags.

void  setPostfix (const QString &post)

setPostfix

Set the postfix text to append the current values when they are displayed in the pie.

Parameters:
postPostfix string, no space will be added after the value before the string so if you want the space you need to specify it first in this string.

const QString & postfix (void)

postfix

[const]

Get the postfix string.

Returns: Current postfix string.

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

setTitle

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

Parameters:
titleTitle of chart.

const QString & title (void)

title

Get title of chart.

Returns: Title of chart.

void  setDisplayPercent (bool pct)

setDisplayPercent

Display piecharts in percent instead of actual values

Parameters:
pctWether or not to display percent only.

bool  displayPercent (void)

displayPercent

[const]

Check if only percent is displayed

Returns: True if only percent is displayed.

void  showLegend (bool on)

showLegend

Specify if legend should be displayed to the right of the graph, default is on.

Parameters:
onWhether to display graph or not.

bool  legend (void)

legend

[const]

Check if legend is displayed or not.

Returns: If legend is displayed or not.

void  setValues (std::list<double> &values,std::list<QString> &labels)

setValues

Set value list of piechart.

Parameters:
valuesList of values to display.
labelsList of labels, if label is empty it will not appear in legend.

void  addValue (double value,const QString &label)

addValue

Add a value to the piechart.

Parameters:
valueNew value to add.
labelLabel of this new value.

std::list<double> & values (void)

values

Get list of values.

Returns: Values in piechart.

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

labels

Get labels of piechart.

Returns: List of labels.

QString  findLabel (QPoint p)

findLabel

Find the label if any of a point in the chart.

QRect  chartRectangle ()

chartRectangle

Get rectangle that the chart is contained in.

void  newValues (std::list<double> &values,std::list<QString> &labels)

newValues

[signal]

void  editPrint (void)

editPrint

[slot]

Print the chart

void  openCopy (void)

openCopy

[slot]

Open in new window

void  paintChart (QPainter *p,QRect rect)

paintChart

[protected virtual]

Paint chart in a given rectangle.

void  paintEvent (QPaintEvent *e)

paintEvent

[protected virtual]

Reimplemented for internal reasons.

Reimplemented from QWidget.