KChart

KChartLeveyJenningsCoordinatePlane.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 "KChartLeveyJenningsCoordinatePlane.h"
10#include "KChartLeveyJenningsCoordinatePlane_p.h"
11
12#include <QtDebug>
13#include <QPainter>
14
15#include "KChartPaintContext.h"
16#include "KChartPainterSaver_p.h"
17#include "KChartCartesianAxis.h"
18#include "KChartLeveyJenningsDiagram.h"
19
20using namespace KChart;
21
22#define d d_func()
23
24LeveyJenningsCoordinatePlane::Private::Private()
25 : CartesianCoordinatePlane::Private()
26{
27}
28
29LeveyJenningsCoordinatePlane::LeveyJenningsCoordinatePlane( Chart* parent )
30 : CartesianCoordinatePlane( new Private(), parent )
31{
32}
33
34LeveyJenningsCoordinatePlane::~LeveyJenningsCoordinatePlane()
35{
36}
37
38void LeveyJenningsCoordinatePlane::init()
39{
40}
41
43{
44 Q_ASSERT_X ( dynamic_cast<LeveyJenningsDiagram*>( diagram ),
45 "LeveyJenningsCoordinatePlane::addDiagram", "Only Levey Jennings "
46 "diagrams can be added to a ternary coordinate plane!" );
48}
49
50LeveyJenningsGrid* LeveyJenningsCoordinatePlane::grid() const
51{
52 LeveyJenningsGrid* leveyJenningsGrid = static_cast<LeveyJenningsGrid*>( d->grid );
53 Q_ASSERT( dynamic_cast<LeveyJenningsGrid*>( d->grid ) );
54 return leveyJenningsGrid;
55}
56
57LeveyJenningsGridAttributes LeveyJenningsCoordinatePlane::gridAttributes() const
58{
59 return d->gridAttributes;
60}
61
62void LeveyJenningsCoordinatePlane::setGridAttributes( const LeveyJenningsGridAttributes& attr )
63{
64 d->gridAttributes = attr;
65}
66
67const QPointF LeveyJenningsCoordinatePlane::translateBack( const QPointF& screenPoint ) const
68{
69 return CartesianCoordinatePlane::translateBack( screenPoint );
70}
71
72#undef d
AbstractDiagram defines the interface for diagram classes.
void addDiagram(AbstractDiagram *diagram) override
Adds a diagram to this coordinate plane.
void addDiagram(AbstractDiagram *diagram) override
Adds a diagram to this coordinate plane.
LeveyDiagram defines a Levey Jennings chart.
A set of attributes controlling the appearance of grids.
Class for the grid in a Levey Jennings plane.
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.