kchart

#include <KDChartRingPainter.h>

Inheritance diagram for KDChartRingPainter:
KDChartPainter

Protected Member Functions

 KDChartRingPainter (KDChartParams *params)
virtual ~KDChartRingPainter ()
virtual void paintData (TQPainter *painter, KDChartTableDataBase *data, bool paint2nd, KDChartDataRegionList *regions=0)
void drawOneSegment (TQPainter *painter, uint outerRadius, uint innerRadius, double startAngle, double angles, uint dataset, uint value, uint chart, bool explode, KDChartDataRegionList *regions=0)
virtual TQString fallbackLegendText (uint dataset) const
virtual uint numLegendFallbackTexts (KDChartTableDataBase *data) const
Protected Member Functions inherited from KDChartPainter
 KDChartPainter (KDChartParams *)
virtual void paintArea (TQPainter *painter, uint area, KDChartDataRegionList *regions=0, uint dataRow=0, uint dataCol=0, uint data3rd=0)
virtual void paintDataRegionAreas (TQPainter *painter, KDChartDataRegionList *regions)
virtual void paintAreaWithGap (TQPainter *painter, TQRect rect, const KDChartParams::KDChartFrameSettings &settings)
virtual void paintCustomBoxes (TQPainter *painter, KDChartDataRegionList *regions)
virtual void paintDataValues (TQPainter *painter, KDChartTableDataBase *data, KDChartDataRegionList *regions)
virtual void paintAxes (TQPainter *painter, KDChartTableDataBase *data)
virtual void paintLegend (TQPainter *painter, KDChartTableDataBase *data)
virtual void paintHeaderFooter (TQPainter *painter, KDChartTableDataBase *data)
virtual bool axesOverlapping (int axis1, int axis2)
virtual void findChartDatasets (KDChartTableDataBase *data, bool paint2nd, uint chart, uint &chartDatasetStart, uint &chartDatasetEnd)
virtual void calculateAllAxesRects (TQPainter *painter, bool finalPrecision, KDChartTableDataBase *data)
virtual TQPoint calculateAnchor (const KDChartCustomBox &box, KDChartDataRegionList *regions=0) const
virtual TQRect calculateAreaRect (bool &allCustomBoxes, uint area, uint dataRow, uint dataCol, uint data3rd, KDChartDataRegionList *regions) const
const KDChartParams * params () const
virtual bool calculateAllAxesLabelTextsAndCalcValues (TQPainter *painter, KDChartTableDataBase *data, double areaWidthP1000, double areaHeightP1000, double &delimLen)
virtual void drawExtraLinesAndMarkers (KDChartPropertySet &propSet, const TQPen &defaultPen, const KDChartParams::LineMarkerStyle &defaultMarkerStyle, int myPointX, int myPointY, TQPainter *painter, const KDChartAxisParams *abscissaPara, const KDChartAxisParams *ordinatePara, const double areaWidthP1000, const double areaHeightP1000, bool bDrawInFront=false)

Protected Attributes

TQRect _position
int _size
int _numValues
Protected Attributes inherited from KDChartPainter
TQRect _outermostRect
TQRect _innermostRect
TQRect _dataRect
TQRect _axesRect
TQRect _legendRect
int _legendEMSpace
int _legendSpacing
int _legendHeight
int _legendLeading
KDChartTextPiece * _legendTitle
int _numLegendTexts
int _logicalWidth
int _logicalHeight
double _areaWidthP1000
double _areaHeightP1000
TQMap< int, TQString > _legendTexts
internal__KDChart__CalcValues calcVal [KDCHART_MAX_AXES]

Friends

class KDChartPainter

Additional Inherited Members

Public Member Functions inherited from KDChartPainter
virtual ~KDChartPainter ()
virtual void setupGeometry (TQPainter *painter, KDChartTableDataBase *data, const TQRect &rect)
virtual void paint (TQPainter *painter, KDChartTableDataBase *data, bool paintFirst, bool paintLast, KDChartDataRegionList *regions=0, const TQRect *rect=0, bool mustCalculateGeometry=true)
virtual TQRect outermostRect () const
Static Public Member Functions inherited from KDChartPainter
static KDChartPainter * create (KDChartParams *params, bool make2nd=false)
static void registerPainter (const TQString &painterName, KDChartPainter *painter)
static void unregisterPainter (const TQString &painterName)
static void drawMarker (TQPainter *painter, int style, const TQColor &color, const TQPoint &p, const TQSize &size, uint align=TQt::AlignCenter)
Static Protected Member Functions inherited from KDChartPainter
static TQPoint pointOnCircle (const TQRect &rect, double angle)
static void makeArc (TQPointArray &points, const TQRect &rect, double startAngle, double angles)
static KDChartDataRegion * drawMarker (TQPainter *painter, const KDChartParams *params, double areaWidthP1000, double areaHeightP1000, int deltaX, int deltaY, int style, const TQColor &color, const TQPoint &p, uint dataset, uint value, uint chart, KDChartDataRegionList *regions=0, int *width=0, int *height=0, uint align=TQt::AlignCenter)

Detailed Description

A chart painter implementation that can paint pie charts.

PENDING(kalle) Write more documentation.

Definition at line 37 of file KDChartRingPainter.h.

Constructor & Destructor Documentation

◆ KDChartRingPainter()

KDChartRingPainter::KDChartRingPainter ( KDChartParams * params)
protected

Constructor.

Sets up internal data structures as necessary.

Parameters
paramsthe KDChartParams structure that defines the chart

Definition at line 52 of file KDChartRingPainter.cpp.

◆ ~KDChartRingPainter()

KDChartRingPainter::~KDChartRingPainter ( )
protectedvirtual

Destructor.

Definition at line 63 of file KDChartRingPainter.cpp.

Member Function Documentation

◆ drawOneSegment()

void KDChartRingPainter::drawOneSegment ( TQPainter * painter,
uint outerRadius,
uint innerRadius,
double startAngle,
double angles,
uint dataset,
uint value,
uint chart,
bool explode,
KDChartDataRegionList * regions = 0 )
protected

Definition at line 217 of file KDChartRingPainter.cpp.

◆ fallbackLegendText()

TQString KDChartRingPainter::fallbackLegendText ( uint dataset) const
protectedvirtual

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
uintdataset 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 376 of file KDChartRingPainter.cpp.

◆ numLegendFallbackTexts()

uint KDChartRingPainter::numLegendFallbackTexts ( KDChartTableDataBase * data) const
protectedvirtual

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 391 of file KDChartRingPainter.cpp.

◆ paintData()

void KDChartRingPainter::paintData ( TQPainter * painter,
KDChartTableDataBase * data,
bool paint2nd,
KDChartDataRegionList * regions = 0 )
protectedvirtual

Paints the actual data area.

Parameters
painterthe TQPainter onto which the chart should be painted
datathe data that will be displayed as a chart
paint2ndspecifies whether the main chart or the additional chart is to be drawn now
regionsa 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.

◆ KDChartPainter

friend class KDChartPainter
friend

Definition at line 39 of file KDChartRingPainter.h.

Member Data Documentation

◆ _numValues

int KDChartRingPainter::_numValues
protected

Definition at line 60 of file KDChartRingPainter.h.

◆ _position

TQRect KDChartRingPainter::_position
protected

Definition at line 58 of file KDChartRingPainter.h.

◆ _size

int KDChartRingPainter::_size
protected

Definition at line 59 of file KDChartRingPainter.h.


The documentation for this class was generated from the following files: