KD Chart API Documentation  3.1
KDChartPolarDiagram.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** This file is part of the KD Chart library.
4 **
5 ** SPDX-FileCopyrightText: 2001 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: MIT
8 **
9 ****************************************************************************/
10 
11 #ifndef KDCHARTPOLARDIAGRAM_H
12 #define KDCHARTPOLARDIAGRAM_H
13 
15 #include "KDChartPosition.h"
16 
17 QT_BEGIN_NAMESPACE
18 class QPolygonF;
19 QT_END_NAMESPACE
20 
21 namespace KDChart {
22 
26 class KDCHART_EXPORT PolarDiagram : public AbstractPolarDiagram
27 {
28  Q_OBJECT
29 
30  Q_DISABLE_COPY(PolarDiagram)
32 
33 public:
34  explicit PolarDiagram(
35  QWidget *parent = nullptr, PolarCoordinatePlane *plane = nullptr);
36  ~PolarDiagram() override;
37 
38 protected:
39  // Implement AbstractDiagram
41  void paint(PaintContext *paintContext) override;
42 
43 public:
45  void resize(const QSizeF &area) override;
46 
47  // Implement AbstractPolarDiagram
49  qreal valueTotals() const override;
51  qreal numberOfValuesPerDataset() const override;
53  qreal numberOfGridRings() const override;
54 
55  virtual PolarDiagram *clone() const;
56 
58  Q_DECL_DEPRECATED void setZeroDegreePosition(int degrees);
60  Q_DECL_DEPRECATED int zeroDegreePosition() const;
61 
62  void setRotateCircularLabels(bool rotateCircularLabels);
63  bool rotateCircularLabels() const;
64 
68  void setCloseDatasets(bool closeDatasets);
69  bool closeDatasets() const;
70 
71  void setShowDelimitersAtPosition(Position position,
72  bool showDelimiters);
73  void setShowLabelsAtPosition(Position position,
74  bool showLabels);
75 
76  bool showDelimitersAtPosition(Position position) const;
77 
78  bool showLabelsAtPosition(Position position) const;
79 
80  virtual void paint(PaintContext *paintContext,
81  bool calculateListAndReturnScale,
82  qreal &newZoomX, qreal &newZoomY); // KDChart 3: references -> pointers
83 
84 protected:
86  const QPair<QPointF, QPointF> calculateDataBoundaries() const override;
87  void paintEvent(QPaintEvent *) override;
88  void resizeEvent(QResizeEvent *) override;
89  virtual void paintPolarMarkers(PaintContext *ctx, const QPolygonF &polygon);
90 
91 }; // End of class PolarDiagram
92 }
93 
94 #endif // KDCHARTPOLARDIAGRAM_H
#define KDCHART_DECLARE_DERIVED_DIAGRAM(X, PLANE)
Base class for diagrams based on a polar coordinate system.
Stores information about painting diagrams.
PolarDiagram defines a common polar diagram.
Defines a position, using compass terminology.

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated by doxygen 1.9.1