KD Chart 2  [rev.2.6]
KDChartAbstractTernaryDiagram.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (C) 2001-2019 Klaralvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Chart library.
5 **
6 ** Licensees holding valid commercial KD Chart licenses may use this file in
7 ** accordance with the KD Chart Commercial License Agreement provided with
8 ** the Software.
9 **
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU General Public License version 2 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
20 **
21 **********************************************************************/
22 
24 #include "KDChartAbstractTernaryDiagram_p.h"
25 
27 
28 using namespace KDChart;
29 
30 AbstractTernaryDiagram::Private::Private()
31  : AbstractDiagram::Private()
32 {
33 }
34 
35 void AbstractTernaryDiagram::init()
36 {
37 }
38 
39 #define d d_func()
40 
41 AbstractTernaryDiagram::AbstractTernaryDiagram( QWidget* parent,
42  TernaryCoordinatePlane* plane )
43  : AbstractDiagram( parent, plane )
44 {
45 }
46 
47 AbstractTernaryDiagram::~AbstractTernaryDiagram()
48 {
49  while ( ! d->axesList.isEmpty() ) {
50  TernaryAxis* axis = d->axesList.takeFirst();
51  delete axis;
52  }
53 }
54 
55 void AbstractTernaryDiagram::addAxis( TernaryAxis* axis )
56 {
57  d->axesList.append( axis );
58  // FIXME update
59 }
60 
61 void AbstractTernaryDiagram::takeAxis( TernaryAxis* axis )
62 {
63 
64  int index = d->axesList.indexOf( axis );
65  if ( index != -1 )
66  d->axesList.removeAt( index );
67  // FIXME update
68 }
69 
70 TernaryAxisList AbstractTernaryDiagram::axes() const
71 {
72  return d->axesList;
73 }
74 
75 void AbstractTernaryDiagram::paint (PaintContext *paintContext)
76 {
77  d->paint( paintContext );
78 }
79 
AbstractDiagram defines the interface for diagram classes.
The class for ternary axes.
QModelIndex parent(const QModelIndex &index) const
Stores information about painting diagrams.
Class only listed here to document inheritance of some KDChart classes.

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
https://www.kdab.com/
https://www.kdab.com/products/kd-chart/