kchart

KDChart.h
Go to the documentation of this file.
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 __KDCHART_H__
30#define __KDCHART_H__
31
32#ifdef TQSA
33#include <tqsproject.h>
34#endif // TQSA
35
36#include "KDChartGlobal.h"
37#include "KDChartTable.h"
38#include "KDChartUnknownTypeException.h"
39#include "KDChartParams.h"
40#include "KDChartDataRegion.h"
41
49
50class KDChartPainter;
51class TQPainter;
52class TQSInterpreter;
53
54
55class KDCHART_EXPORT KDChart
56{
57 friend void cleanupPainter();
58
59 public:
60 static bool setupGeometry( TQPainter* painter,
61 KDChartParams* params,
63 const TQRect& drawRect );
64
65 static bool painterToDrawRect( TQPainter* painter, TQRect& drawRect );
66
67 static void paint( TQPainter*, KDChartParams*, KDChartTableDataBase*,
68 KDChartDataRegionList* regions = 0,
69 const TQRect* rect = 0,
70 bool mustCalculateGeometry = true );
71
72 static void print( TQPainter*, KDChartParams*, KDChartTableDataBase*,
73 KDChartDataRegionList* regions = 0,
74 const TQRect* rect = 0,
75 bool mustCalculateGeometry = true );
76
77#ifdef TQSA
78 static void initInterpreter( TQSInterpreter* );
79 static void initProject( TQSProject* );
80#endif
81
82 private:
83 KDChart(); // prevent instantiations
84
85 static KDChartParams* oldParams;
86 static KDChartPainter* cpainter;
87 static KDChartPainter* cpainter2;
88 static KDChartParams::ChartType cpainterType;
89 static KDChartParams::ChartType cpainterType2;
90
91#ifdef TQSA
92 static TQString globals();
93 static void privateInitInterpreter( TQSInterpreter* interpreter );
94#endif
95};
96
97#endif
Header for all common chart parameters.
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.
Bundles the display parameters of a chart.
ChartType
The chart type.
KD Chart's build-in table data for an easy way of storing data values.
friend void cleanupPainter()
A global function that cleans up possible KDChartPainter objects at application shutdown.
Definition KDChart.cpp:375
static bool setupGeometry(TQPainter *painter, KDChartParams *params, KDChartTableDataBase *data, const TQRect &drawRect)
Calculates the axis and data area rects of a chart with the specified parameters on the specified pai...
Definition KDChart.cpp:156
static bool painterToDrawRect(TQPainter *painter, TQRect &drawRect)
Calculates the drawing area from a given TQPainter.
Definition KDChart.cpp:122
static void paint(TQPainter *, KDChartParams *, KDChartTableDataBase *, KDChartDataRegionList *regions=0, const TQRect *rect=0, bool mustCalculateGeometry=true)
Paints a chart with the specified parameters on the specified painter.
Definition KDChart.cpp:256
static void print(TQPainter *, KDChartParams *, KDChartTableDataBase *, KDChartDataRegionList *regions=0, const TQRect *rect=0, bool mustCalculateGeometry=true)
Paints a chart with the specified parameters on the specified painter which should use a TQPrinter as...
Definition KDChart.cpp:354