KD Chart API Documentation  3.1
KDChartPaintContext.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** This file is part of the KD Chart library.
4 **
5 ** SPDX-FileCopyrightText: 2001 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: MIT
8 **
9 ****************************************************************************/
10 
11 #include "KDChartPaintContext.h"
13 
14 #include <QPainter>
15 #include <QRectF>
16 
17 #include <KDABLibFakes>
18 
19 using namespace KDChart;
20 
21 #define d (d_func())
22 
23 class PaintContext::Private
24 {
25 public:
26  QPainter *painter = nullptr;
27  QRectF rect;
28  AbstractCoordinatePlane *plane = nullptr;
29 
30  Private()
31  {
32  }
33 };
34 
36  : _d(new Private())
37 {
38 }
39 
41 {
42  delete _d;
43 }
44 
45 const QRectF PaintContext::rectangle() const
46 {
47  return d->rect;
48 }
49 
50 void PaintContext::setRectangle(const QRectF &rect)
51 {
52  d->rect = rect;
53 }
54 
55 QPainter *PaintContext::painter() const
56 {
57  return d->painter;
58 }
59 
60 void PaintContext::setPainter(QPainter *painter)
61 {
62  d->painter = painter;
63 }
64 
66 {
67  return d->plane;
68 }
69 
71 {
72  d->plane = plane;
73 }
#define d
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane,...
void setPainter(QPainter *painter)
void setCoordinatePlane(AbstractCoordinatePlane *plane)
void setRectangle(const QRectF &rect)
const QRectF rectangle() const
AbstractCoordinatePlane * coordinatePlane() const
QPainter * painter() const

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated by doxygen 1.9.1