File indexing completed on 2024-05-12 04:20:36

0001 /*
0002  * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
0003  *
0004  * This file is part of the KD Chart library.
0005  *
0006  * SPDX-License-Identifier: GPL-2.0-or-later
0007  */
0008 
0009 #ifndef PAINTCONTEXT_H
0010 #define PAINTCONTEXT_H
0011 
0012 #include <QRectF>
0013 #include "KChartGlobal.h"
0014 
0015 QT_BEGIN_NAMESPACE
0016 class QPainter;
0017 QT_END_NAMESPACE
0018 
0019 namespace KChart {
0020 
0021     class AbstractCoordinatePlane;
0022 
0023     /**
0024       * @brief Stores information about painting diagrams
0025       * \internal
0026       */
0027     class KCHART_EXPORT PaintContext
0028     {
0029     public:
0030         PaintContext();
0031         ~PaintContext();
0032 
0033         const QRectF rectangle () const;
0034         void setRectangle( const QRectF& rect );
0035 
0036         QPainter* painter() const;
0037         void setPainter( QPainter* painter );
0038 
0039         AbstractCoordinatePlane* coordinatePlane() const;
0040         void setCoordinatePlane( AbstractCoordinatePlane* plane );
0041 
0042     private:
0043         class Private;
0044         Private * _d;
0045         Private * d_func() { return _d; }
0046         const Private * d_func() const { return _d; }
0047     };
0048 
0049 }
0050 
0051 #endif /* PAINTCONTEXT_H */
0052