KChart

KChartRadarDiagram.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 KCHARTRADARDIAGRAM_H
21 #define KCHARTRADARDIAGRAM_H
22 
23 
24 #include "KChartPosition.h"
25 #include "KChartPolarDiagram.h"
26 #include "KChartRadarCoordinatePlane.h"
27 
28 QT_BEGIN_NAMESPACE
29 class QPolygonF;
30 QT_END_NAMESPACE
31 
32 namespace KChart {
33 
37 class KCHART_EXPORT RadarDiagram : public AbstractPolarDiagram
38 {
39  Q_OBJECT
40 
41  Q_DISABLE_COPY( RadarDiagram )
42  KCHART_DECLARE_DERIVED_DIAGRAM( RadarDiagram, RadarCoordinatePlane )
43 
44 public:
45  explicit RadarDiagram(
46  QWidget* parent = nullptr, RadarCoordinatePlane* plane = nullptr );
47  virtual ~RadarDiagram();
48 
49  virtual void paint ( PaintContext* paintContext,
50  bool calculateListAndReturnScale,
51  qreal& newZoomX, qreal& newZoomY );
53  void resize ( const QSizeF& area ) override;
54 
56  qreal valueTotals () const override;
58  qreal numberOfValuesPerDataset() const override;
60  qreal numberOfGridRings() const override;
61 
65  void setReverseData( bool val );
66  bool reverseData();
67 
71  virtual RadarDiagram * clone() const;
72 
77  void setCloseDatasets( bool closeDatasets );
78  bool closeDatasets() const;
79 
87  qreal fillAlpha() const;
88  void setFillAlpha(qreal alphaF);
89 
90 protected:
92  const QPair<QPointF, QPointF> calculateDataBoundaries() const override;
93  void paintEvent ( QPaintEvent* ) override;
94  void resizeEvent ( QResizeEvent* ) override;
95  void paint ( PaintContext* paintContext ) override;
96 
97 }; // End of class RadarDiagram
98 
99 }
100 
101 #endif // KCHARTRADARDIAGRAM_H
Class only listed here to document inheritance of some KChart classes.
Stores information about painting diagrams.
RadarDiagram defines a common radar diagram.
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 Tue Sep 22 2020 22:36:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.