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 <QPainter>
15
16using namespace KChart;
17
18#define d (d_func())
19
20class Q_DECL_HIDDEN PaintContext::Private {
21
22public:
23 QPainter* painter;
24 QRectF rect;
26
27 Private()
28 : painter( nullptr )
29 , plane ( nullptr )
30 {}
31};
32
33PaintContext::PaintContext()
34 : _d ( new Private() )
35{
36}
37
38PaintContext::~PaintContext()
39{
40 delete _d;
41}
42
43const QRectF PaintContext::rectangle() const
44{
45 return d->rect;
46}
47
48void PaintContext::setRectangle ( const QRectF& rect )
49{
50 d->rect = rect;
51}
52
53QPainter* PaintContext::painter() const
54{
55 return d->painter;
56}
57
58void PaintContext::setPainter( QPainter* painter )
59{
60 d->painter = painter;
61}
62
63AbstractCoordinatePlane* PaintContext::coordinatePlane() const
64{
65 return d->plane;
66}
67
68void PaintContext::setCoordinatePlane( AbstractCoordinatePlane* plane)
69{
70 d->plane = plane;
71}
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane,...
Stores information about painting diagrams.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.