KChart

KChartAbstractTernaryDiagram.cpp
1 /*
2  * Copyright (C) 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3  *
4  * This file is part of the KD Chart library.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 #include "KChartAbstractTernaryDiagram.h"
21 #include "KChartAbstractTernaryDiagram_p.h"
22 
23 #include "KChartTernaryCoordinatePlane.h"
24 
25 using namespace KChart;
26 
27 AbstractTernaryDiagram::Private::Private()
28  : AbstractDiagram::Private()
29 {
30 }
31 
32 void AbstractTernaryDiagram::init()
33 {
34 }
35 
36 #define d d_func()
37 
38 AbstractTernaryDiagram::AbstractTernaryDiagram( QWidget* parent,
39  TernaryCoordinatePlane* plane )
40  : AbstractDiagram( parent, plane )
41 {
42 }
43 
44 AbstractTernaryDiagram::~AbstractTernaryDiagram()
45 {
46  while ( ! d->axesList.isEmpty() ) {
47  TernaryAxis* axis = d->axesList.takeFirst();
48  delete axis;
49  }
50 }
51 
52 void AbstractTernaryDiagram::addAxis( TernaryAxis* axis )
53 {
54  d->axesList.append( axis );
55  // FIXME update
56 }
57 
58 void AbstractTernaryDiagram::takeAxis( TernaryAxis* axis )
59 {
60 
61  int index = d->axesList.indexOf( axis );
62  if ( index != -1 )
63  d->axesList.removeAt( index );
64  // FIXME update
65 }
66 
67 TernaryAxisList AbstractTernaryDiagram::axes() const
68 {
69  return d->axesList;
70 }
71 
72 void AbstractTernaryDiagram::paint (PaintContext *paintContext)
73 {
74  d->paint( paintContext );
75 }
76 
Class only listed here to document inheritance of some KChart classes.
AbstractDiagram defines the interface for diagram classes.
Stores information about painting diagrams.
QModelIndex index(int row, int col, const QModelIndex &index) const override
Global namespace.
QObject * parent() const const
The class for ternary axes.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 22:36:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.