KChart

KChartPaintContext.cpp
1 /*
2  * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3  *
4  * This file is part of the KD Chart library.
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #include "KChartPaintContext.h"
10 #include "KChartAbstractCoordinatePlane.h"
11 
12 #include "KChartMath_p.h"
13 
14 #include <QRectF>
15 #include <QPainter>
16 
17 using namespace KChart;
18 
19 #define d (d_func())
20 
21 class Q_DECL_HIDDEN PaintContext::Private {
22 
23 public:
24  QPainter* painter;
25  QRectF rect;
27 
28  Private()
29  : painter( nullptr )
30  , plane ( nullptr )
31  {}
32 };
33 
34 PaintContext::PaintContext()
35  : _d ( new Private() )
36 {
37 }
38 
39 PaintContext::~PaintContext()
40 {
41  delete _d;
42 }
43 
44 const QRectF PaintContext::rectangle() const
45 {
46  return d->rect;
47 }
48 
49 void PaintContext::setRectangle ( const QRectF& rect )
50 {
51  d->rect = rect;
52 }
53 
54 QPainter* PaintContext::painter() const
55 {
56  return d->painter;
57 }
58 
59 void PaintContext::setPainter( QPainter* painter )
60 {
61  d->painter = painter;
62 }
63 
64 AbstractCoordinatePlane* PaintContext::coordinatePlane() const
65 {
66  return d->plane;
67 }
68 
69 void PaintContext::setCoordinatePlane( AbstractCoordinatePlane* plane)
70 {
71  d->plane = plane;
72 }
Stores information about painting diagrams.
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane, TernaryCoordinatePlane.
Global namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Oct 26 2021 22:37:33 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.