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 #ifndef KCHARTRINGDIAGRAM_P_H
0010 #define KCHARTRINGDIAGRAM_P_H
0011 
0012 //
0013 //  W A R N I N G
0014 //  -------------
0015 //
0016 // This file is not part of the KD Chart API.  It exists purely as an
0017 // implementation detail.  This header file may change from version to
0018 // version without notice, or even be removed.
0019 //
0020 // We mean it.
0021 //
0022 
0023 #include "KChartRingDiagram.h"
0024 #include "KChartAbstractPieDiagram_p.h"
0025 #include "KChartMath_p.h"
0026 
0027 
0028 namespace KChart {
0029 
0030 /**
0031  * \internal
0032  */
0033 class Q_DECL_HIDDEN RingDiagram::Private : public AbstractPieDiagram::Private
0034 {
0035     friend class RingDiagram;
0036 public:
0037     Private();
0038     ~Private() override;
0039 
0040     Private( const Private& rhs ) :
0041         AbstractPieDiagram::Private( rhs ),
0042         startAngles(),
0043         angleLens(),
0044         position(),
0045         size( 0 ),
0046         polygonsToRender()
0047         {
0048             relativeThickness = rhs.relativeThickness;
0049             expandWhenExploded = rhs.expandWhenExploded;
0050         }
0051 
0052 protected:
0053     // this information needed temporarily at drawing time
0054     QVector< QVector < qreal > > startAngles;
0055     QVector< QVector < qreal > > angleLens;
0056     QRectF position;
0057     qreal size;
0058     bool relativeThickness;
0059     bool expandWhenExploded;
0060     // polygons associated to their 3d depth
0061     QMap<qreal, QPolygon> polygonsToRender;
0062 };
0063 
0064 KCHART_IMPL_DERIVED_DIAGRAM( RingDiagram, AbstractPieDiagram, PolarCoordinatePlane )
0065 
0066 }
0067 
0068 #endif /* KCHARTRINGDIAGRAM_P_H */