KChart

KChartAbstractPieDiagram.h
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 #ifndef KCHARTABSTRACTPIEDIAGRAM_H
21 #define KCHARTABSTRACTPIEDIAGRAM_H
22 
23 #include "KChartAbstractPolarDiagram.h"
24 
25 namespace KChart {
26  class PieAttributes;
27  class ThreeDPieAttributes;
28 
32 class KCHART_EXPORT AbstractPieDiagram : public AbstractPolarDiagram
33 {
34  Q_OBJECT
35 
36  Q_DISABLE_COPY( AbstractPieDiagram )
37  KCHART_DECLARE_DERIVED_DIAGRAM( AbstractPieDiagram, PolarCoordinatePlane )
38 
39 public:
40  explicit AbstractPieDiagram(
41  QWidget* parent = nullptr, PolarCoordinatePlane* plane = nullptr );
42  virtual ~AbstractPieDiagram();
43 
47  bool compare( const AbstractPieDiagram* other ) const;
48 
54  void setGranularity( qreal value );
55 
57  qreal granularity() const;
58 
60  void setStartPosition( int degrees );
62  int startPosition() const;
63 
67  void setAutoRotateLabels( bool autoRotate );
70  bool autoRotateLabels() const;
71 
72  void setPieAttributes( const PieAttributes & a );
73  void setPieAttributes( int column,
74  const PieAttributes & a );
75  void setPieAttributes( const QModelIndex & index,
76  const PieAttributes & a );
77  PieAttributes pieAttributes() const;
78  PieAttributes pieAttributes( int column ) const;
79  PieAttributes pieAttributes( const QModelIndex & index ) const;
80 
81  void setThreeDPieAttributes( const ThreeDPieAttributes & a );
82  void setThreeDPieAttributes( int column,
83  const ThreeDPieAttributes & a );
84  void setThreeDPieAttributes( const QModelIndex & index,
85  const ThreeDPieAttributes & a );
86  ThreeDPieAttributes threeDPieAttributes() const;
87  ThreeDPieAttributes threeDPieAttributes( int column ) const;
88  ThreeDPieAttributes threeDPieAttributes( const QModelIndex & index ) const;
89 }; // End of class KChartAbstractPieDiagram
90 
91 }
92 
93 #endif // KCHARTABSTACTPIEDIAGRAM_H
Class only listed here to document inheritance of some KChart classes.
A set of attributes controlling the appearance of pie charts.
A set of 3D pie attributes.
Base class for any diagram type.
Base class for diagrams based on a polar coordinate system.
Global namespace.
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.