#include <KDChartAxesPainter.h>
|
| static void | calculateAbscissaInfos (const KDChartParams ¶ms, 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 ¶ms, 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 ¶, 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 ¶, 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 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) |
|
| | KDChartAxesPainter (KDChartParams *params) |
| virtual | ~KDChartAxesPainter () |
| virtual void | paintAxes (TQPainter *painter, KDChartTableDataBase *data) |
| virtual void | paintData (TQPainter *painter, KDChartTableDataBase *data, bool paint2nd, KDChartDataRegionList *regions) |
|
virtual bool | isNormalMode () const =0 |
|
virtual int | clipShiftUp (bool normalMode, double areaWidthP1000) const =0 |
| 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)=0 |
| virtual bool | calculateAllAxesLabelTextsAndCalcValues (TQPainter *painter, KDChartTableDataBase *data, double areaWidthP1000, double areaHeightP1000, double &delimLen) |
| | 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) |
|
| 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 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) |
| 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] |
A common base class for classes that implement chart painters for chart types ith axes.
Definition at line 42 of file KDChartAxesPainter.h.
◆ KDChartAxesPainter()
Constructor.
Sets up internal data structures as necessary.
- Parameters
-
Definition at line 64 of file KDChartAxesPainter.cpp.
◆ ~KDChartAxesPainter()
| KDChartAxesPainter::~KDChartAxesPainter |
( |
| ) |
|
|
protectedvirtual |
◆ applyLabelsFormat()
| TQString KDChartAxesPainter::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 |
◆ calculateAbscissaAxisValue()
| bool KDChartAxesPainter::calculateAbscissaAxisValue |
( |
const TQVariant & | value, |
|
|
abscissaInfos & | ai, |
|
|
int | colNumber, |
|
|
double & | xValue ) |
|
static |
◆ calculateAbscissaInfos()
| void KDChartAxesPainter::calculateAbscissaInfos |
( |
const KDChartParams & | params, |
|
|
const KDChartTableDataBase & | data, |
|
|
uint | datasetStart, |
|
|
uint | datasetEnd, |
|
|
double | logWidth, |
|
|
const TQRect & | dataRect, |
|
|
abscissaInfos & | infos ) |
|
static |
◆ calculateAllAxesLabelTextsAndCalcValues()
| bool KDChartAxesPainter::calculateAllAxesLabelTextsAndCalcValues |
( |
TQPainter * | painter, |
|
|
KDChartTableDataBase * | data, |
|
|
double | areaWidthP1000, |
|
|
double | areaHeightP1000, |
|
|
double & | delimLen ) |
|
protectedvirtual |
◆ calculateBasicTextFactors()
| void KDChartAxesPainter::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 |
Calculates some label text factors needed by function calculateLabelTexts().
- Note
- When calling this function the actual area size for this axis must be set, this means you may only call it when
KDChartPainter::setupGeometry() has been called before.
- Parameters
-
| nTxtHeight | the text height to be used for calculating the return values |
| para | the KDChartAxisParams that were specified for this axis |
| averageValueP1000 | (average height+width of the prtbl. area) / 1000 |
| basicPos | the basic axis position returned by KDChartAxisParams::basicAxisPos() |
| orig | the axis start point |
| delimLen | the length of one delimiter mark |
| nLabels | the number of labels to be shown at this axis |
| (all | others) the reference parameters to be returned by this function |
Definition at line 3489 of file KDChartAxesPainter.cpp.
◆ calculateLabelTexts()
| void KDChartAxesPainter::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 |
Calculates the actual label texts for one axis.
- Note
- When calling this function the actual area size for this axis must be set, this means you may only call it when
KDChartPainter::setupGeometry() has been called before.
- Parameters
-
| painter | the TQPainter onto which the chart should be painted |
| data | the data that will be displayed as a chart |
| params | the KDChartParams that were specified globally |
| axisNumber | the number of this axis (used in some params structures) |
| averageValueP1000 | (average height+width of the prtbl. area) / 1000 |
| basicPos | the basic axis position returned by KDChartAxisParams::basicAxisPos() |
| orig | the axis start point |
| delimLen | the length of one delimiter mark |
| (all | others) the reference parameters to be returned by this function |
Definition at line 1967 of file KDChartAxesPainter.cpp.
◆ calculateOrdinateFactors()
| void KDChartAxesPainter::calculateOrdinateFactors |
( |
const KDChartAxisParams & | para, |
|
|
bool | isLogarithmic, |
|
|
double & | nDist, |
|
|
double & | nDivisor, |
|
|
double & | nRound, |
|
|
double & | nDelta, |
|
|
double & | nSubDelimFactor, |
|
|
double & | nLow, |
|
|
double & | nHigh, |
|
|
bool | findNextRound = false ) |
|
static |
Calculates the factors to be used for calculating ordinate labels texts.
- Note
- This function is reserved for internal use.
Definition at line 3753 of file KDChartAxesPainter.cpp.
◆ dtAddDays()
| void KDChartAxesPainter::dtAddDays |
( |
const TQDateTime & | org, |
|
|
const int | days, |
|
|
TQDateTime & | dest ) |
|
static |
◆ dtAddMonths()
| void KDChartAxesPainter::dtAddMonths |
( |
const TQDateTime & | org, |
|
|
const int | months, |
|
|
TQDateTime & | dest ) |
|
static |
◆ dtAddSecs()
| void KDChartAxesPainter::dtAddSecs |
( |
const TQDateTime & | org, |
|
|
const int | secs, |
|
|
TQDateTime & | dest ) |
|
static |
◆ dtAddYears()
| void KDChartAxesPainter::dtAddYears |
( |
const TQDateTime & | org, |
|
|
const int | years, |
|
|
TQDateTime & | dest ) |
|
static |
◆ paintAxes()
Paints the actual axes areas.
- Parameters
-
| painter | the TQPainter onto which the chart should be painted |
| data | the data that will be displayed as a chart |
Reimplemented from KDChartPainter.
Definition at line 335 of file KDChartAxesPainter.cpp.
◆ paintData()
Paints the actual data area and registers the region for the data points if regions is not 0.
- 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.
Reimplemented in KDChartAreaPainter, and KDChartLinesPainter.
Definition at line 4330 of file KDChartAxesPainter.cpp.
◆ saveDrawLine()
| void KDChartAxesPainter::saveDrawLine |
( |
TQPainter & | painter, |
|
|
TQPoint | pA, |
|
|
TQPoint | pZ, |
|
|
TQPen | pen ) |
|
static |
◆ specificPaintData()
| virtual void KDChartAxesPainter::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 ) |
|
protectedpure virtual |
◆ truncateBehindComma()
| TQString KDChartAxesPainter::truncateBehindComma |
( |
const double | nVal, |
|
|
const int | behindComma, |
|
|
const double | nDelta, |
|
|
int & | trueBehindComma ) |
|
static |
Takes double nVal and returns a TQString showing the amount of digits behind the comma that was specified by behindComma (or calculated automatically by removing trailing zeroes, resp.).
To make sure the resulting string looks fine together with other strings of the same label row please specify nDelta indicating the step width from one label text to the other. To prevent the function from having to re-calculate the number of digits to keep behind the comma, provide it with a temporary helper variable "trueBehindComma" that has to be initialized with a value smaller than zero.
- Note
- This function is reserved for internal use.
Definition at line 3596 of file KDChartAxesPainter.cpp.
The documentation for this class was generated from the following files:
|