File indexing completed on 2024-12-15 04:02:36
0001 /* 0002 * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved. 0003 * 0004 * This file is part of the KD Chart library. 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #include "KChartAbstractTernaryDiagram.h" 0010 #include "KChartAbstractTernaryDiagram_p.h" 0011 0012 #include "KChartTernaryCoordinatePlane.h" 0013 0014 using namespace KChart; 0015 0016 AbstractTernaryDiagram::Private::Private() 0017 : AbstractDiagram::Private() 0018 { 0019 } 0020 0021 void AbstractTernaryDiagram::init() 0022 { 0023 } 0024 0025 #define d d_func() 0026 0027 AbstractTernaryDiagram::AbstractTernaryDiagram( QWidget* parent, 0028 TernaryCoordinatePlane* plane ) 0029 : AbstractDiagram( parent, plane ) 0030 { 0031 } 0032 0033 AbstractTernaryDiagram::~AbstractTernaryDiagram() 0034 { 0035 while ( ! d->axesList.isEmpty() ) { 0036 TernaryAxis* axis = d->axesList.takeFirst(); 0037 delete axis; 0038 } 0039 } 0040 0041 void AbstractTernaryDiagram::addAxis( TernaryAxis* axis ) 0042 { 0043 d->axesList.append( axis ); 0044 // FIXME update 0045 } 0046 0047 void AbstractTernaryDiagram::takeAxis( TernaryAxis* axis ) 0048 { 0049 0050 int index = d->axesList.indexOf( axis ); 0051 if ( index != -1 ) 0052 d->axesList.removeAt( index ); 0053 // FIXME update 0054 } 0055 0056 TernaryAxisList AbstractTernaryDiagram::axes() const 0057 { 0058 return d->axesList; 0059 } 0060 0061 void AbstractTernaryDiagram::paint (PaintContext *paintContext) 0062 { 0063 d->paint( paintContext ); 0064 } 0065