KDChartPainter Class Reference

#include <KDChartPainter.h>

Inheritance diagram for KDChartPainter:

KDChartAxesPainter KDChartPiePainter KDChartPolarPainter KDChartRingPainter KDChartBarPainter KDChartBWPainter KDChartHiLoPainter KDChartLinesPainter KDChartAreaPainter
Collaboration diagram for KDChartPainter:

Collaboration graph

List of all members.

Public Member Functions

virtual ~KDChartPainter ()
virtual void setupGeometry (QPainter *painter, KDChartTableDataBase *data, const QRect &rect)
virtual void paint (QPainter *painter, KDChartTableDataBase *data, bool paintFirst, bool paintLast, KDChartDataRegionList *regions=0, const QRect *rect=0, bool mustCalculateGeometry=true)
virtual QRect outermostRect () const

Static Public Member Functions

static KDChartPaintercreate (KDChartParams *params, bool make2nd=false)
static void registerPainter (const QString &painterName, KDChartPainter *painter)
static void unregisterPainter (const QString &painterName)
static void drawMarker (QPainter *painter, int style, const QColor &color, const QPoint &p, const QSize &size, uint align=Qt::AlignCenter)

Protected Member Functions

 KDChartPainter (KDChartParams *)
virtual void paintArea (QPainter *painter, uint area, KDChartDataRegionList *regions=0, uint dataRow=0, uint dataCol=0, uint data3rd=0)
virtual void paintDataRegionAreas (QPainter *painter, KDChartDataRegionList *regions)
virtual void paintAreaWithGap (QPainter *painter, QRect rect, const KDChartParams::KDChartFrameSettings &settings)
virtual void paintCustomBoxes (QPainter *painter, KDChartDataRegionList *regions)
virtual void paintData (QPainter *painter, KDChartTableDataBase *data, bool paint2nd, KDChartDataRegionList *regions=0)=0
virtual void paintDataValues (QPainter *painter, KDChartTableDataBase *data, KDChartDataRegionList *regions)
virtual void paintAxes (QPainter *painter, KDChartTableDataBase *data)
virtual void paintLegend (QPainter *painter, KDChartTableDataBase *data)
virtual void paintHeaderFooter (QPainter *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 (QPainter *painter, bool finalPrecision, KDChartTableDataBase *data)
virtual QPoint calculateAnchor (const KDChartCustomBox &box, KDChartDataRegionList *regions=0) const
virtual QRect calculateAreaRect (bool &allCustomBoxes, uint area, uint dataRow, uint dataCol, uint data3rd, KDChartDataRegionList *regions) const
virtual QString fallbackLegendText (uint dataset) const
virtual uint numLegendFallbackTexts (KDChartTableDataBase *data) const
const KDChartParamsparams () const
virtual bool calculateAllAxesLabelTextsAndCalcValues (QPainter *painter, KDChartTableDataBase *data, double areaWidthP1000, double areaHeightP1000, double &delimLen)
virtual void drawExtraLinesAndMarkers (KDChartPropertySet &propSet, const QPen &defaultPen, const KDChartParams::LineMarkerStyle &defaultMarkerStyle, int myPointX, int myPointY, QPainter *painter, const KDChartAxisParams *abscissaPara, const KDChartAxisParams *ordinatePara, const double areaWidthP1000, const double areaHeightP1000, bool bDrawInFront=FALSE)

Static Protected Member Functions

static QPoint pointOnCircle (const QRect &rect, double angle)
static void makeArc (QPointArray &points, const QRect &rect, double startAngle, double angles)
static KDChartDataRegiondrawMarker (QPainter *painter, const KDChartParams *params, double areaWidthP1000, double areaHeightP1000, int deltaX, int deltaY, int style, const QColor &color, const QPoint &p, uint dataset, uint value, uint chart, KDChartDataRegionList *regions=0, int *width=0, int *height=0, uint align=Qt::AlignCenter)

Protected Attributes

QRect _outermostRect
QRect _innermostRect
QRect _dataRect
QRect _axesRect
QRect _legendRect
int _legendEMSpace
int _legendSpacing
int _legendHeight
int _legendLeading
int _numLegendTexts
int _logicalWidth
int _logicalHeight
double _areaWidthP1000
double _areaHeightP1000
QMap< int, QString > _legendTexts
internal__KDChart__CalcValues calcVal [KDCHART_MAX_AXES]

Private Member Functions

 KDChartPainter (const KDChartPainter &)
KDChartPainteroperator= (const KDChartPainter &)
QRect trueFrameRect (const QRect &orgRect, const KDChartParams::KDChartFrameSettings *settings) const
int legendTitleVertGap () const
QFont trueLegendTitleFont () const
QFont trueLegendFont () const
void calculateHorizontalLegendSize (QPainter *painter, QSize &size, bool &legendNewLinesStartAtLeft) const
bool mustDrawVerticalLegend () const
void findLegendTexts (KDChartTableDataBase *)
int calculateHdFtRects (QPainter *painter, double averageValueP1000, int xposLeft, int xposRight, bool bHeader, int &yposTop, int &yposBottom)

Private Attributes

QMap< QString, KDChartPainter * > _customPainters
bool _legendNewLinesStartAtLeft
int _legendTitleHeight
int _legendTitleWidth
int _legendTitleMetricsHeight
int _hdLeading
int _ftLeading

Constructor & Destructor Documentation

virtual KDChartPainter::~KDChartPainter (  )  [virtual]

KDChartPainter::KDChartPainter ( KDChartParams  )  [protected]

KDChartPainter::KDChartPainter ( const KDChartPainter  )  [private]

Member Function Documentation

static KDChartPainter* KDChartPainter::create ( KDChartParams params,
bool  make2nd = false 
) [static]

static void KDChartPainter::registerPainter ( const QString &  painterName,
KDChartPainter painter 
) [static]

static void KDChartPainter::unregisterPainter ( const QString &  painterName  )  [static]

virtual void KDChartPainter::setupGeometry ( QPainter *  painter,
KDChartTableDataBase data,
const QRect &  rect 
) [virtual]

virtual void KDChartPainter::paint ( QPainter *  painter,
KDChartTableDataBase data,
bool  paintFirst,
bool  paintLast,
KDChartDataRegionList regions = 0,
const QRect *  rect = 0,
bool  mustCalculateGeometry = true 
) [virtual]

virtual QRect KDChartPainter::outermostRect (  )  const [inline, virtual]

static void KDChartPainter::drawMarker ( QPainter *  painter,
int  style,
const QColor &  color,
const QPoint &  p,
const QSize &  size,
uint  align = Qt::AlignCenter 
) [static]

virtual void KDChartPainter::paintArea ( QPainter *  painter,
uint  area,
KDChartDataRegionList regions = 0,
uint  dataRow = 0,
uint  dataCol = 0,
uint  data3rd = 0 
) [protected, virtual]

virtual void KDChartPainter::paintDataRegionAreas ( QPainter *  painter,
KDChartDataRegionList regions 
) [protected, virtual]

virtual void KDChartPainter::paintAreaWithGap ( QPainter *  painter,
QRect  rect,
const KDChartParams::KDChartFrameSettings settings 
) [protected, virtual]

virtual void KDChartPainter::paintCustomBoxes ( QPainter *  painter,
KDChartDataRegionList regions 
) [protected, virtual]

virtual void KDChartPainter::paintData ( QPainter *  painter,
KDChartTableDataBase data,
bool  paint2nd,
KDChartDataRegionList regions = 0 
) [protected, pure virtual]

virtual void KDChartPainter::paintDataValues ( QPainter *  painter,
KDChartTableDataBase data,
KDChartDataRegionList regions 
) [protected, virtual]

virtual void KDChartPainter::paintAxes ( QPainter *  painter,
KDChartTableDataBase data 
) [protected, virtual]

Reimplemented in KDChartAxesPainter.

virtual void KDChartPainter::paintLegend ( QPainter *  painter,
KDChartTableDataBase data 
) [protected, virtual]

virtual void KDChartPainter::paintHeaderFooter ( QPainter *  painter,
KDChartTableDataBase data 
) [protected, virtual]

virtual bool KDChartPainter::axesOverlapping ( int  axis1,
int  axis2 
) [protected, virtual]

virtual void KDChartPainter::findChartDatasets ( KDChartTableDataBase data,
bool  paint2nd,
uint  chart,
uint &  chartDatasetStart,
uint &  chartDatasetEnd 
) [protected, virtual]

virtual void KDChartPainter::calculateAllAxesRects ( QPainter *  painter,
bool  finalPrecision,
KDChartTableDataBase data 
) [protected, virtual]

virtual QPoint KDChartPainter::calculateAnchor ( const KDChartCustomBox box,
KDChartDataRegionList regions = 0 
) const [protected, virtual]

virtual QRect KDChartPainter::calculateAreaRect ( bool &  allCustomBoxes,
uint  area,
uint  dataRow,
uint  dataCol,
uint  data3rd,
KDChartDataRegionList regions 
) const [protected, virtual]

virtual QString KDChartPainter::fallbackLegendText ( uint  dataset  )  const [protected, virtual]

virtual uint KDChartPainter::numLegendFallbackTexts ( KDChartTableDataBase data  )  const [protected, virtual]

static QPoint KDChartPainter::pointOnCircle ( const QRect &  rect,
double  angle 
) [static, protected]

static void KDChartPainter::makeArc ( QPointArray &  points,
const QRect &  rect,
double  startAngle,
double  angles 
) [static, protected]

const KDChartParams* KDChartPainter::params (  )  const [inline, protected]

virtual bool KDChartPainter::calculateAllAxesLabelTextsAndCalcValues ( QPainter *  painter,
KDChartTableDataBase data,
double  areaWidthP1000,
double  areaHeightP1000,
double &  delimLen 
) [protected, virtual]

Reimplemented in KDChartAxesPainter.

virtual void KDChartPainter::drawExtraLinesAndMarkers ( KDChartPropertySet propSet,
const QPen &  defaultPen,
const KDChartParams::LineMarkerStyle defaultMarkerStyle,
int  myPointX,
int  myPointY,
QPainter *  painter,
const KDChartAxisParams abscissaPara,
const KDChartAxisParams ordinatePara,
const double  areaWidthP1000,
const double  areaHeightP1000,
bool  bDrawInFront = FALSE 
) [protected, virtual]

static KDChartDataRegion* KDChartPainter::drawMarker ( QPainter *  painter,
const KDChartParams params,
double  areaWidthP1000,
double  areaHeightP1000,
int  deltaX,
int  deltaY,
int  style,
const QColor &  color,
const QPoint &  p,
uint  dataset,
uint  value,
uint  chart,
KDChartDataRegionList regions = 0,
int *  width = 0,
int *  height = 0,
uint  align = Qt::AlignCenter 
) [static, protected]

KDChartPainter& KDChartPainter::operator= ( const KDChartPainter  )  [private]

QRect KDChartPainter::trueFrameRect ( const QRect &  orgRect,
const KDChartParams::KDChartFrameSettings settings 
) const [private]

int KDChartPainter::legendTitleVertGap (  )  const [private]

QFont KDChartPainter::trueLegendTitleFont (  )  const [private]

QFont KDChartPainter::trueLegendFont (  )  const [private]

void KDChartPainter::calculateHorizontalLegendSize ( QPainter *  painter,
QSize &  size,
bool &  legendNewLinesStartAtLeft 
) const [private]

bool KDChartPainter::mustDrawVerticalLegend (  )  const [private]

void KDChartPainter::findLegendTexts ( KDChartTableDataBase  )  [private]

int KDChartPainter::calculateHdFtRects ( QPainter *  painter,
double  averageValueP1000,
int  xposLeft,
int  xposRight,
bool  bHeader,
int &  yposTop,
int &  yposBottom 
) [private]

Member Data Documentation

QRect KDChartPainter::_outermostRect [protected]

QRect KDChartPainter::_innermostRect [protected]

QRect KDChartPainter::_dataRect [protected]

QRect KDChartPainter::_axesRect [protected]

QRect KDChartPainter::_legendRect [protected]

double KDChartPainter::_areaWidthP1000 [protected]

QMap< int, QString > KDChartPainter::_legendTexts [protected]

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

Generated on Wed Jan 26 13:06:31 2011 for KMyMoney by  doxygen 1.5.6