kchart

KDChartPolarPainter Class Reference

#include <KDChartPolarPainter.h>

Inheritance diagram for KDChartPolarPainter:
KDChartPainter

Protected Member Functions

 KDChartPolarPainter (KDChartParams *params)
virtual ~KDChartPolarPainter ()
virtual void paintData (TQPainter *painter, KDChartTableDataBase *data, bool paint2nd, 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)

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)
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]

Detailed Description

A chart painter implementation that can paint polar charts.

Definition at line 36 of file KDChartPolarPainter.h.

Constructor & Destructor Documentation

◆ KDChartPolarPainter()

KDChartPolarPainter::KDChartPolarPainter ( KDChartParams * params)
protected

Constructor.

Sets up internal data structures as necessary.

Parameters
paramsthe KDChartParams structure that defines the chart
datathe data that will be displayed as a chart

Definition at line 49 of file KDChartPolarPainter.cpp.

◆ ~KDChartPolarPainter()

KDChartPolarPainter::~KDChartPolarPainter ( )
protectedvirtual

Destructor.

Definition at line 60 of file KDChartPolarPainter.cpp.

Member Function Documentation

◆ fallbackLegendText()

TQString KDChartPolarPainter::fallbackLegendText ( uint dataset) const
protectedvirtual

This method is a specialization that returns a fallback legend text appropriate for polar charts 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 781 of file KDChartPolarPainter.cpp.

◆ numLegendFallbackTexts()

uint KDChartPolarPainter::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 796 of file KDChartPolarPainter.cpp.

◆ paintData()

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

Paints the actual data area.

Data regions will only be added if regions is not 0 and the chart is configured to be drawn with markers.

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 77 of file KDChartPolarPainter.cpp.

◆ KDChartPainter

friend class KDChartPainter
friend

Definition at line 38 of file KDChartPolarPainter.h.


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