kchart

KDChartLinesPainter Class Reference

#include <KDChartLinesPainter.h>

Inheritance diagram for KDChartLinesPainter:
KDChartAxesPainter KDChartPainter KDChartAreaPainter

Protected Member Functions

 KDChartLinesPainter (KDChartParams *params)
virtual ~KDChartLinesPainter ()
virtual void paintData (TQPainter *painter, KDChartTableDataBase *data, bool paint2nd, KDChartDataRegionList *regions=0)
virtual bool isNormalMode () const
virtual int clipShiftUp (bool, double) const
virtual void specificPaintData (TQPainter *painter, const TQRect &ourClipRect, KDChartTableDataBase *data, KDChartDataRegionList *regions, const KDChartAxisParams *axisPara, bool bNormalMode, uint chart, double logWidth, double areaWidthP1000, double logHeight, double axisYOffset, double minColumnValue, double maxColumnValue, double columnValueDistance, uint chartDatasetStart, uint chartDatasetEnd, uint datasetStart, uint datasetEnd)
void paintDataInternal (TQPainter *painter, KDChartTableDataBase *data, bool centerThePoints, bool drawMarkers, bool isArea, bool paint2nd, KDChartDataRegionList *regions=0)
TQPoint project (int x, int y, int z)
Protected Member Functions inherited from KDChartAxesPainter
 KDChartAxesPainter (KDChartParams *params)
virtual ~KDChartAxesPainter ()
virtual void paintAxes (TQPainter *painter, KDChartTableDataBase *data)
virtual bool calculateAllAxesLabelTextsAndCalcValues (TQPainter *painter, KDChartTableDataBase *data, double areaWidthP1000, double areaHeightP1000, double &delimLen)
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 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
virtual TQString fallbackLegendText (uint dataset) const
virtual uint numLegendFallbackTexts (KDChartTableDataBase *data) const
const KDChartParams * params () const
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 KDChartAxesPainter
static void calculateAbscissaInfos (const KDChartParams &params, const KDChartTableDataBase &data, uint datasetStart, uint datasetEnd, double logWidth, const TQRect &dataRect, abscissaInfos &infos)
static bool calculateAbscissaAxisValue (const TQVariant &value, abscissaInfos &ai, int colNumber, double &xValue)
static void saveDrawLine (TQPainter &painter, TQPoint pA, TQPoint pZ, TQPen pen)
static void calculateLabelTexts (TQPainter *painter, const KDChartTableDataBase &data, const KDChartParams &params, uint axisNumber, double averageValueP1000, double delimLen, KDChartAxisParams::AxisPos &basicPos, TQPoint &orig, TQPoint &dest, double &pXDeltaFactor, double &pYDeltaFactor, double &pXDelimDeltaFaktor, double &pYDelimDeltaFaktor, double &nSubDelimFactor, double &pDelimDelta, double &nTxtHeight, double &pTextsX, double &pTextsY, double &pTextsW, double &pTextsH, int &textAlign, bool &isLogarithmic, bool &isDateTime, bool &autoDtLabels, TQDateTime &dtLow, TQDateTime &dtHigh, KDChartAxisParams::ValueScale &dtDeltaScale, bool adjustTheValues=false, double trueDelta=0.0, double trueDeltaPix=0.0)
static void calculateBasicTextFactors (double nTxtHeight, const KDChartAxisParams &para, double averageValueP1000, KDChartAxisParams::AxisPos basicPos, const TQPoint &orig, double delimLen, uint nLabels, double &pDelimDelta, double &pTextsX, double &pTextsY, double &pTextsW, double &pTextsH, int &textAlign)
static TQString truncateBehindComma (const double nVal, const int behindComma, const double nDelta, int &trueBehindComma)
static TQString applyLabelsFormat (const double nVal, int divPow10, int behindComma, double nDelta, int &trueBehindComma, KDChartEnums::NumberNotation notation, const TQString &decimalPoint, const TQString &thousandsPoint, const TQString &prefix, const TQString &postfix, int totalLen, const TQChar &padFill, bool blockAlign)
static void calculateOrdinateFactors (const KDChartAxisParams &para, bool bLogarithmic, double &nDist, double &nDivisor, double &nRound, double &nDelta, double &nSubDelimFactor, double &nLow, double &nHigh, bool findNextRound=false)
static void dtAddSecs (const TQDateTime &org, const int secs, TQDateTime &dest)
static void dtAddDays (const TQDateTime &org, const int days, TQDateTime &dest)
static void dtAddMonths (const TQDateTime &org, const int months, TQDateTime &dest)
static void dtAddYears (const TQDateTime &org, const int years, TQDateTime &dest)
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 line charts.

Definition at line 38 of file KDChartLinesPainter.h.

Constructor & Destructor Documentation

◆ KDChartLinesPainter()

KDChartLinesPainter::KDChartLinesPainter ( 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 50 of file KDChartLinesPainter.cpp.

◆ ~KDChartLinesPainter()

KDChartLinesPainter::~KDChartLinesPainter ( )
protectedvirtual

Destructor.

Definition at line 61 of file KDChartLinesPainter.cpp.

Member Function Documentation

◆ clipShiftUp()

int KDChartLinesPainter::clipShiftUp ( bool ,
double  ) const
protectedvirtual

Implements KDChartAxesPainter.

Definition at line 150 of file KDChartLinesPainter.cpp.

◆ isNormalMode()

bool KDChartLinesPainter::isNormalMode ( ) const
protectedvirtual

Implements KDChartAxesPainter.

Definition at line 145 of file KDChartLinesPainter.cpp.

◆ paintData()

void KDChartLinesPainter::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.

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

Reimplemented from KDChartAxesPainter.

Reimplemented in KDChartAreaPainter.

Definition at line 77 of file KDChartLinesPainter.cpp.

◆ paintDataInternal()

void KDChartLinesPainter::paintDataInternal ( TQPainter * painter,
KDChartTableDataBase * data,
bool centerThePoints,
bool drawMarkers,
bool isArea,
bool paint2nd,
KDChartDataRegionList * regions = 0 )
protected

Definition at line 110 of file KDChartLinesPainter.cpp.

◆ project()

TQPoint KDChartLinesPainter::project ( int x,
int y,
int z )
protected

Projects a point in a space defined by its x, y, and z coordinates into a point onto a plane, given two rotation angles around the x resp. y axis.

Definition at line 135 of file KDChartLinesPainter.cpp.

◆ specificPaintData()

void KDChartLinesPainter::specificPaintData ( TQPainter * painter,
const TQRect & ourClipRect,
KDChartTableDataBase * data,
KDChartDataRegionList * regions,
const KDChartAxisParams * axisPara,
bool bNormalMode,
uint chart,
double logWidth,
double areaWidthP1000,
double logHeight,
double axisYOffset,
double minColumnValue,
double maxColumnValue,
double columnValueDistance,
uint chartDatasetStart,
uint chartDatasetEnd,
uint datasetStart,
uint datasetEnd )
protectedvirtual

first dataset (or any dataset in normal mode, where the datasets overwrite each other)

Implements KDChartAxesPainter.

Definition at line 176 of file KDChartLinesPainter.cpp.

◆ KDChartPainter

friend class KDChartPainter
friend

Definition at line 40 of file KDChartLinesPainter.h.


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