kchart
KDChartRingPainter Class Reference
#include <KDChartRingPainter.h>
Inheritance diagram for KDChartRingPainter:

Detailed Description
A chart painter implementation that can paint pie charts.PENDING(kalle) Write more documentation.
Definition at line 37 of file KDChartRingPainter.h.
Protected Member Functions | |
KDChartRingPainter (KDChartParams *params) | |
virtual | ~KDChartRingPainter () |
virtual void | paintData (QPainter *painter, KDChartTableDataBase *data, bool paint2nd, KDChartDataRegionList *regions=0) |
void | drawOneSegment (QPainter *painter, uint outerRadius, uint innerRadius, double startAngle, double angles, uint dataset, uint value, uint chart, bool explode, KDChartDataRegionList *regions=0) |
virtual QString | fallbackLegendText (uint dataset) const |
virtual uint | numLegendFallbackTexts (KDChartTableDataBase *data) const |
Protected Attributes | |
QRect | _position |
int | _size |
int | _numValues |
Friends | |
class | KDChartPainter |
Constructor & Destructor Documentation
KDChartRingPainter::KDChartRingPainter | ( | KDChartParams * | params | ) | [protected] |
Constructor.
Sets up internal data structures as necessary.
- Parameters:
-
params the KDChartParams structure that defines the chart
Definition at line 52 of file KDChartRingPainter.cpp.
KDChartRingPainter::~KDChartRingPainter | ( | ) | [protected, virtual] |
Member Function Documentation
QString KDChartRingPainter::fallbackLegendText | ( | uint | dataset | ) | const [protected, virtual] |
This method is a specialization that returns a fallback legend text appropriate for rings where the fallbacks should come from the values, not from the datasets.
This method is only used when automatic legends are used, because manual and first-column legends do not need fallback texts.
- Parameters:
-
uint dataset the dataset number for which to generate a fallback text
- Returns:
- the fallback text to use for describing the specified dataset in the legend
Reimplemented from KDChartPainter.
Definition at line 382 of file KDChartRingPainter.cpp.
uint KDChartRingPainter::numLegendFallbackTexts | ( | KDChartTableDataBase * | data | ) | const [protected, virtual] |
This methods returns the number of elements to be shown in the legend in case fallback texts are used.
This method is only used when automatic legends are used, because manual and first-column legends do not need fallback texts.
- Returns:
- the number of fallback texts to use
Reimplemented from KDChartPainter.
Definition at line 397 of file KDChartRingPainter.cpp.
void KDChartRingPainter::paintData | ( | QPainter * | painter, | |
KDChartTableDataBase * | data, | |||
bool | paint2nd, | |||
KDChartDataRegionList * | regions = 0 | |||
) | [protected, virtual] |
Paints the actual data area.
- Parameters:
-
painter the QPainter onto which the chart should be painted data the data that will be displayed as a chart paint2nd specifies whether the main chart or the additional chart is to be drawn now regions a pointer to a list of regions that will be filled with regions representing the data segments, if not null
Implements KDChartPainter.
Definition at line 78 of file KDChartRingPainter.cpp.
The documentation for this class was generated from the following files: