kchart

KDChart.h

Go to the documentation of this file.
00001 /* -*- Mode: C++ -*-
00002    KDChart - a multi-platform charting engine
00003    */
00004 
00005 /****************************************************************************
00006  ** Copyright (C) 2001-2003 Klarälvdalens Datakonsult AB.  All rights reserved.
00007  **
00008  ** This file is part of the KDChart library.
00009  **
00010  ** This file may be distributed and/or modified under the terms of the
00011  ** GNU General Public License version 2 as published by the Free Software
00012  ** Foundation and appearing in the file LICENSE.GPL included in the
00013  ** packaging of this file.
00014  **
00015  ** Licensees holding valid commercial KDChart licenses may use this file in
00016  ** accordance with the KDChart Commercial License Agreement provided with
00017  ** the Software.
00018  **
00019  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00020  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00021  **
00022  ** See http://www.klaralvdalens-datakonsult.se/?page=products for
00023  **   information about KDChart Commercial License Agreements.
00024  **
00025  ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
00026  ** licensing are not clear to you.
00027  **
00028  **********************************************************************/
00029 #ifndef __KDCHART_H__
00030 #define __KDCHART_H__
00031 
00032 #ifdef QSA
00033 #include <qsproject.h>
00034 #endif // QSA
00035 
00036 #include "KDChartGlobal.h"
00037 #include "KDChartTable.h"
00038 #include "KDChartUnknownTypeException.h"
00039 #include "KDChartParams.h"
00040 #include "KDChartDataRegion.h"
00041 
00050 class KDChartPainter;
00051 class QPainter;
00052 class QSInterpreter;
00053 
00054 
00055 class KDCHART_EXPORT KDChart
00056 {
00057     friend void cleanupPainter();
00058 
00059     public:
00060     static bool setupGeometry( QPainter*             painter,
00061                                KDChartParams*        params,
00062                                KDChartTableDataBase* data,
00063                                const QRect&          drawRect );
00064 
00065     static bool painterToDrawRect( QPainter* painter, QRect& drawRect );
00066 
00067     static void paint( QPainter*, KDChartParams*, KDChartTableDataBase*,
00068             KDChartDataRegionList* regions = 0,
00069             const QRect* rect = 0,
00070             bool mustCalculateGeometry = true );
00071 
00072     static void print( QPainter*, KDChartParams*, KDChartTableDataBase*,
00073             KDChartDataRegionList* regions = 0,
00074             const QRect* rect = 0,
00075             bool mustCalculateGeometry = true );
00076 
00077 #ifdef QSA
00078     static void initInterpreter( QSInterpreter* );
00079     static void initProject( QSProject* );
00080 #endif
00081 
00082     private:
00083     KDChart(); // prevent instantiations
00084 
00085     static KDChartParams* oldParams;
00086     static KDChartPainter* cpainter;
00087     static KDChartPainter* cpainter2;
00088     static KDChartParams::ChartType cpainterType;
00089     static KDChartParams::ChartType cpainterType2;
00090 
00091 #ifdef QSA
00092     static QString globals();
00093     static void privateInitInterpreter( QSInterpreter* interpreter );
00094 #endif
00095 };
00096 
00097 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys