#include <KDChartPiePainter.h>
Protected Member Functions | |
| KDChartPiePainter (KDChartParams *params) | |
| virtual | ~KDChartPiePainter () |
| virtual void | paintData (TQPainter *painter, KDChartTableDataBase *data, bool paint2nd, KDChartDataRegionList *regions=0) |
| virtual void | drawOnePie (TQPainter *painter, KDChartTableDataBase *data, uint dataset, uint pie, uint chart, uint threeDPieHeight, KDChartDataRegionList *regions=0) |
| virtual void | draw3DEffect (TQPainter *painter, const TQRect &drawPosition, uint dataset, uint pie, uint chart, uint threeDPieHeight, bool explode, TQRegion *region=0) |
| void | drawStraightEffectSegment (TQPainter *painter, const TQRect &rect, uint dataset, uint pie, uint chart, int threeDHeight, int angle, TQRegion *region=0) |
| void | drawArcEffectSegment (TQPainter *painter, const TQRect &rect, uint dataset, uint pie, uint chart, int threeDHeight, int startAngle, int endAngle, TQRegion *region=0) |
| virtual TQString | fallbackLegendText (uint dataset) const |
| virtual uint | numLegendFallbackTexts (KDChartTableDataBase *data) const |
| uint | findPieAt (int angle) |
| uint | findLeftPie (uint pie) |
| uint | findRightPie (uint pie) |
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 | |
| TQMemArray< int > | _startAngles |
| TQMemArray< int > | _angleLens |
| 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 KDChartPiePainter.h.
Constructor & Destructor Documentation
◆ KDChartPiePainter()
|
protected |
Constructor.
Sets up internal data structures as necessary.
- Parameters
-
params the KDChartParams structure that defines the chart
Definition at line 54 of file KDChartPiePainter.cpp.
◆ ~KDChartPiePainter()
|
protectedvirtual |
Destructor.
Definition at line 65 of file KDChartPiePainter.cpp.
Member Function Documentation
◆ draw3DEffect()
|
protectedvirtual |
Internal method that draws the shadow creating the 3D effect of a pie.
- Parameters
-
painter the TQPainter to draw in rect the position to draw at dataset the dataset to draw the pie for pie the pie to draw the shadow for the chart to draw the pie in threeDHeight the height of the shadow regions a pointer to a list of regions that will be filled with regions representing the data segments, if not null
starts and ends in first quadrant, less than 1/4
starts and ends in first quadrant, more than 3/4
starts in first quadrant, ends in second quadrant, less than 1/2
starts in first quadrant, ends in third quadrant
starts in first quadrant, ends in fourth quadrant, more than 3/4
starts in second quadrant, ends in second quadrant, less than 1/4
starts in second quadrant, ends in second quadrant, more than 1/4
starts in third quadrant, ends in third quadrant, less than 1/4
starts in third quadrant, ends in third quadrant, more than 3/4
starts in fourth quadrant, ends in fourth quadrant, less than 1/4
starts in fourth quadrant, ends in fourth quadrant, more than 3/4
Definition at line 477 of file KDChartPiePainter.cpp.
◆ drawArcEffectSegment()
|
protected |
Internal method that draws a segment with an arc 3D effect.
- Parameters
-
painter the TQPainter to draw in rect the position to draw at threeDHeight the height of the shadow startAngle the starting angle of the segment endAngle the ending angle of the segment regions a pointer to a list of regions that will be filled with regions representing the data segments, if not null
Definition at line 707 of file KDChartPiePainter.cpp.
◆ drawOnePie()
|
protectedvirtual |
Internal method that draws one of the pies in a pie chart.
- Parameters
-
painter the TQPainter to draw in dataset the dataset to draw the pie for pie the pie to draw the chart to draw the pie in regions a pointer to a list of regions that will be filled with regions representing the data segments, if not null
Definition at line 299 of file KDChartPiePainter.cpp.
◆ drawStraightEffectSegment()
|
protected |
Internal method that draws a segment with a straight 3D effect.
- Parameters
-
painter the TQPainter to draw in rect the position to draw at threeDHeight the height of the shadow angle the angle of the segment regions a pointer to a list of regions that will be filled with regions representing the data segments, if not null
Definition at line 675 of file KDChartPiePainter.cpp.
◆ fallbackLegendText()
|
protectedvirtual |
This method is a specialization that returns a fallback legend text appropriate for pies that do not have more than one dataset.
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 807 of file KDChartPiePainter.cpp.
◆ findLeftPie()
|
protected |
Internal method that finds the pie that is located to the left of the pie specified by pie.
- Parameters
-
pie the pie to start the search from
- Returns
- the number of the pie to the left of
pie
Definition at line 766 of file KDChartPiePainter.cpp.
◆ findPieAt()
|
protected |
Internal method that finds the pie that is located at the position specified by angle.
- Parameters
-
angle the angle at which to search for a pie
- Returns
- the number of the pie found
Definition at line 744 of file KDChartPiePainter.cpp.
◆ findRightPie()
|
protected |
Internal method that finds the pie that is located to the right of the pie specified by pie.
- Parameters
-
pie the pie to start the search from
- Returns
- the number of the pie to the right of
pie
Definition at line 786 of file KDChartPiePainter.cpp.
◆ numLegendFallbackTexts()
|
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 822 of file KDChartPiePainter.cpp.
◆ paintData()
|
protectedvirtual |
Paints the actual data area.
- Parameters
-
painter the TQPainter 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 81 of file KDChartPiePainter.cpp.
Friends And Related Symbol Documentation
◆ KDChartPainter
|
friend |
Definition at line 39 of file KDChartPiePainter.h.
Member Data Documentation
◆ _angleLens
|
protected |
Definition at line 76 of file KDChartPiePainter.h.
◆ _numValues
|
protected |
Definition at line 80 of file KDChartPiePainter.h.
◆ _position
|
protected |
Definition at line 78 of file KDChartPiePainter.h.
◆ _size
|
protected |
Definition at line 79 of file KDChartPiePainter.h.
◆ _startAngles
|
protected |
Definition at line 75 of file KDChartPiePainter.h.
The documentation for this class was generated from the following files:

Protected Member Functions inherited from