KDChartPaintContext.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB.  All rights reserved.
00003 **
00004 ** This file is part of the KD Chart library.
00005 **
00006 ** Licensees holding valid commercial KD Chart licenses may use this file in
00007 ** accordance with the KD Chart Commercial License Agreement provided with
00008 ** the Software.
00009 **
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 and version 3 as published by the
00013 ** Free Software Foundation and appearing in the file LICENSE.GPL included.
00014 **
00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 **
00018 ** Contact info@kdab.com if any conditions of this licensing are not
00019 ** clear to you.
00020 **
00021 **********************************************************************/
00022 
00023 #ifndef PAINTCONTEXT_H
00024 #define PAINTCONTEXT_H
00025 
00026 class QPainter;
00027 
00028 #include <QRectF>
00029 #include "KDChartGlobal.h"
00030 
00031 namespace KDChart {
00032 
00033     class AbstractCoordinatePlane;
00034 
00039     class KDCHART_EXPORT PaintContext
00040     {
00041     public:
00042         PaintContext();
00043         ~PaintContext();
00044 
00045         const QRectF rectangle () const;
00046         void setRectangle( const QRectF& rect );
00047 
00048         QPainter* painter() const;
00049         void setPainter( QPainter* painter );
00050 
00051         AbstractCoordinatePlane* coordinatePlane() const;
00052         void setCoordinatePlane( AbstractCoordinatePlane* plane );
00053 
00054     private:
00055         class Private;
00056         Private * _d;
00057         Private * d_func() { return _d; }
00058         const Private * d_func() const { return _d; }
00059     };
00060 
00061 }
00062 
00063 #endif /* PAINTCONTEXT_H */
00064