kchart
KDChartPolarPainter.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef __KDCHARTPOLARPAINTER_H__
00030 #define __KDCHARTPOLARPAINTER_H__
00031
00032 #include "KDChartPainter.h"
00033 #include <KDChartTable.h>
00034 #include <KDChartParams.h>
00035
00036 class KDChartPolarPainter : public KDChartPainter
00037 {
00038 friend class KDChartPainter;
00039
00040 protected:
00041 KDChartPolarPainter( KDChartParams* params );
00042 virtual ~KDChartPolarPainter();
00043
00044 virtual void paintData( QPainter* painter,
00045 KDChartTableDataBase* data,
00046 bool paint2nd,
00047 KDChartDataRegionList* regions = 0 );
00048
00049
00050
00051
00052
00053
00054 virtual QString fallbackLegendText( uint dataset ) const;
00055 virtual uint numLegendFallbackTexts( KDChartTableDataBase* data ) const;
00056
00057 private:
00058 QPoint polarToXY( int radius, int angle );
00059 void paintAxisLabels( QPainter* painter,
00060 QStringList& labelTexts,
00061 double radiusDelta,
00062 const QRect& position,
00063 const QPoint& center,
00064 double radiusPPU,
00065 double& currentRadiusPPU,
00066 const KDChartAxisParams & paraCircular,
00067 double minSizeP1000 );
00068 void paintCircularAxisLabel( QPainter* painter,
00069 bool rotate,
00070 int txtAngle,
00071 QPoint center,
00072 double currentRadiusPPU,
00073 const QString& txt,
00074 int align,
00075 int step );
00076 };
00077
00078 #endif
|