kchart

KDChartPolarPainter.h
1/*
2 KDChart - a multi-platform charting engine
3 */
4
5/****************************************************************************
6 ** Copyright (C) 2001-2003 Klarälvdalens Datakonsult AB. All rights reserved.
7 **
8 ** This file is part of the KDChart library.
9 **
10 ** This file may be distributed and/or modified under the terms of the
11 ** GNU General Public License version 2 as published by the Free Software
12 ** Foundation and appearing in the file LICENSE.GPL included in the
13 ** packaging of this file.
14 **
15 ** Licensees holding valid commercial KDChart licenses may use this file in
16 ** accordance with the KDChart Commercial License Agreement provided with
17 ** the Software.
18 **
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 **
22 ** See http://www.klaralvdalens-datakonsult.se/?page=products for
23 ** information about KDChart Commercial License Agreements.
24 **
25 ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
26 ** licensing are not clear to you.
27 **
28 **********************************************************************/
29#ifndef __KDCHARTPOLARPAINTER_H__
30#define __KDCHARTPOLARPAINTER_H__
31
32#include "KDChartPainter.h"
33#include <KDChartTable.h>
34#include <KDChartParams.h>
35
36class KDChartPolarPainter : public KDChartPainter
37{
38 friend class KDChartPainter;
39
40 protected:
42 virtual ~KDChartPolarPainter();
43
44 virtual void paintData( TQPainter* painter,
46 bool paint2nd,
47 KDChartDataRegionList* regions = 0 );
48/* void drawMarker( TQPainter* painter,
49 KDChartParams::PolarMarkerStyle style,
50 const TQColor& color, const TQPoint& p,
51 uint dataset, uint value, uint chart,
52 double minSizeP1000,
53 TQRegion & region );*/
54 virtual TQString fallbackLegendText( uint dataset ) const;
55 virtual uint numLegendFallbackTexts( KDChartTableDataBase* data ) const;
56
57 private:
58 TQPoint polarToXY( int radius, int angle );
59 void paintAxisLabels( TQPainter* painter,
60 TQStringList& labelTexts,
61 double radiusDelta,
62 const TQRect& position,
63 const TQPoint& center,
64 double radiusPPU,
65 double& currentRadiusPPU,
66 const KDChartAxisParams & paraCircular,
67 double minSizeP1000 );
68 void paintCircularAxisLabel( TQPainter* painter,
69 bool rotate,
70 int txtAngle,
71 TQPoint center,
72 double currentRadiusPPU,
73 const TQString& txt,
74 int align,
75 int step );
76};
77
78#endif
Header for all common chart parameters.
access the chart axis parameters.
The collection class used by KD Chart to store data region information.
Bundles the display parameters of a chart.
virtual void paintData(TQPainter *painter, KDChartTableDataBase *data, bool paint2nd, KDChartDataRegionList *regions=0)
Paints the actual data area.
virtual ~KDChartPolarPainter()
Destructor.
virtual uint numLegendFallbackTexts(KDChartTableDataBase *data) const
This methods returns the number of elements to be shown in the legend in case fallback texts are used...
KDChartPolarPainter(KDChartParams *params)
Constructor.
virtual TQString fallbackLegendText(uint dataset) const
This method is a specialization that returns a fallback legend text appropriate for polar charts wher...
KD Chart's build-in table data for an easy way of storing data values.