29#ifndef __KDCHARTPAINTER_H__
30#define __KDCHARTPAINTER_H__
34#include <tqdatetime.h>
38#include "KDChartGlobal.h"
39#include "KDChartUnknownTypeException.h"
40#include "KDChartNotEnoughSpaceException.h"
41#include "KDChartTable.h"
42#include "KDChartDataRegion.h"
47class KDChartTextPiece;
53struct internal__KDChart__CalcValues {
58 KDChartAxisParams::AxisPos basicPos;
63 double pXDelimDeltaFaktor;
64 double pYDelimDeltaFaktor;
65 double nSubDelimFactor;
77 KDChartAxisParams::ValueScale dtDeltaScale;
91 bool make2nd = false );
95 static void registerPainter( const TQString& painterName,
97 static void unregisterPainter( const TQString& painterName );
99 virtual void setupGeometry ( TQPainter* painter,
101 const TQRect& rect );
107 const TQRect* rect = 0,
108 bool mustCalculateGeometry = true );
110 virtual TQRect outermostRect() const { return _outermostRect; }
112 static void drawMarker( TQPainter* painter,
114 const TQColor& color,
117 uint align = TQt::AlignCenter );
124 virtual void paintArea( TQPainter* painter,
131 virtual void paintDataRegionAreas( TQPainter* painter,
134 virtual void paintAreaWithGap( TQPainter* painter,
137 virtual void paintCustomBoxes( TQPainter* painter,
143 virtual void paintDataValues( TQPainter* painter,
146 virtual void paintAxes( TQPainter* painter,
148 virtual void paintLegend( TQPainter* painter,
150 virtual void paintHeaderFooter( TQPainter* painter,
152 virtual bool axesOverlapping( int axis1, int axis2 );
157 uint& chartDatasetStart,
158 uint& chartDatasetEnd );
160 virtual void calculateAllAxesRects( TQPainter* painter,
166 virtual TQRect calculateAreaRect( bool & allCustomBoxes,
173 virtual TQString fallbackLegendText( uint dataset ) const;
176 static TQPoint pointOnCircle( const TQRect& rect, double angle );
177 static void makeArc( TQPointArray& points,
179 double startAngle, double angles );
186 TQRect _outermostRect;
189 TQRect _innermostRect;
214 KDChartTextPiece* _legendTitle;
220 double _areaWidthP1000;
221 double _areaHeightP1000;
223 TQMap < int, TQString > _legendTexts;
226 virtual bool calculateAllAxesLabelTextsAndCalcValues(
229 double areaWidthP1000,
230 double areaHeightP1000,
233 virtual void drawExtraLinesAndMarkers(
235 const TQPen& defaultPen,
242 const double areaWidthP1000,
243 const double areaHeightP1000,
244 bool bDrawInFront = false );
246 static KDChartDataRegion* drawMarker( TQPainter* painter,
248 double areaWidthP1000,
249 double areaHeightP1000,
253 const TQColor& color,
255 uint dataset, uint value, uint chart,
259 uint align = TQt::AlignCenter );
267 TQMap < TQString, KDChartPainter* > _customPainters;
270 TQRect trueFrameRect( const TQRect& orgRect,
273 int legendTitleVertGap() const;
274 TQFont trueLegendTitleFont() const;
275 TQFont trueLegendFont() const;
276 void calculateHorizontalLegendSize( TQPainter* painter,
278 bool& legendNewLinesStartAtLeft ) const;
279 bool mustDrawVerticalLegend() const;
281 int calculateHdFtRects( TQPainter* painter,
282 double averageValueP1000,
288 bool _legendNewLinesStartAtLeft;
289 int _legendTitleHeight;
290 int _legendTitleWidth;
291 int _legendTitleMetricsHeight;
Header for all common chart parameters.
#define KDCHART_MAX_AXES Charts have up to 12 axes: up to two axes on both sides for X, Y and Z (if data is 3-dimensional).
access the chart axis parameters.
Class for specifying and drawing custom boxes.
The collection class used by KD Chart to store data region information.
An abstract base class that defines an interface for classes that implement chart drawing.
Stores the frame settings for one of the chart areas:
Bundles the display parameters of a chart.
LineMarkerStyle The available line marker styles.
Property settings of a single KDChart data cell.
KD Chart's build-in table data for an easy way of storing data values.
|