KChart

KChartAbstractTernaryDiagram.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 "KChartAbstractTernaryDiagram.h"
10#include "KChartAbstractTernaryDiagram_p.h"
11
12#include "KChartTernaryCoordinatePlane.h"
13
14using namespace KChart;
15
16AbstractTernaryDiagram::Private::Private()
17 : AbstractDiagram::Private()
18{
19}
20
21void AbstractTernaryDiagram::init()
22{
23}
24
25#define d d_func()
26
27AbstractTernaryDiagram::AbstractTernaryDiagram( QWidget* parent,
29 : AbstractDiagram( parent, plane )
30{
31}
32
33AbstractTernaryDiagram::~AbstractTernaryDiagram()
34{
35 while ( ! d->axesList.isEmpty() ) {
36 TernaryAxis* axis = d->axesList.takeFirst();
37 delete axis;
38 }
39}
40
41void AbstractTernaryDiagram::addAxis( TernaryAxis* axis )
42{
43 d->axesList.append( axis );
44 // FIXME update
45}
46
47void AbstractTernaryDiagram::takeAxis( TernaryAxis* axis )
48{
49
50 int index = d->axesList.indexOf( axis );
51 if ( index != -1 )
52 d->axesList.removeAt( index );
53 // FIXME update
54}
55
56TernaryAxisList AbstractTernaryDiagram::axes() const
57{
58 return d->axesList;
59}
60
61void AbstractTernaryDiagram::paint (PaintContext *paintContext)
62{
63 d->paint( paintContext );
64}
65
AbstractDiagram defines the interface for diagram classes.
Stores information about painting diagrams.
The class for ternary axes.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:18:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.