KD Chart API Documentation  3.1
KDChartLeveyJenningsCoordinatePlane.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 
12 #include "KDChartLeveyJenningsCoordinatePlane_p.h"
13 
14 #include <QPainter>
15 #include <QtDebug>
16 
17 #include "KDChartCartesianAxis.h"
19 #include "KDChartPaintContext.h"
20 #include "KDChartPainterSaver_p.h"
21 
22 using namespace KDChart;
23 
24 #define d d_func()
25 
26 LeveyJenningsCoordinatePlane::Private::Private()
27  : CartesianCoordinatePlane::Private()
28 {
29 }
30 
31 LeveyJenningsCoordinatePlane::LeveyJenningsCoordinatePlane(Chart *parent)
32  : CartesianCoordinatePlane(new Private(), parent)
33 {
34 }
35 
37 {
38 }
39 
40 void LeveyJenningsCoordinatePlane::init()
41 {
42 }
43 
45 {
46  Q_ASSERT_X(dynamic_cast<LeveyJenningsDiagram *>(diagram),
47  "LeveyJenningsCoordinatePlane::addDiagram", "Only Levey Jennings "
48  "diagrams can be added to a ternary coordinate plane!");
50 }
51 
52 LeveyJenningsGrid *LeveyJenningsCoordinatePlane::grid() const
53 {
54  auto *leveyJenningsGrid = static_cast<LeveyJenningsGrid *>(d->grid);
55  Q_ASSERT(dynamic_cast<LeveyJenningsGrid *>(d->grid));
56  return leveyJenningsGrid;
57 }
58 
60 {
61  return d->gridAttributes;
62 }
63 
65 {
66  d->gridAttributes = attr;
67 }
68 
69 const QPointF LeveyJenningsCoordinatePlane::translateBack(const QPointF &screenPoint) const
70 {
71  return CartesianCoordinatePlane::translateBack(screenPoint);
72 }
73 
74 #undef d
AbstractDiagram defines the interface for diagram classes.
void addDiagram(AbstractDiagram *diagram) override
const QPointF translateBack(const QPointF &screenPoint) const
A chart with one or more diagrams.
Definition: KDChartChart.h:84
void addDiagram(AbstractDiagram *diagram) override
void setGridAttributes(const LeveyJenningsGridAttributes &attr)
const QPointF translateBack(const QPointF &screenPoint) const
LeveyDiagram defines a Levey Jennings chart.
A set of attributes controlling the appearance of grids.

© 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