KD Chart API Documentation  3.1
KDChartPolarCoordinatePlane.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 KDCHART_POLAR_COORDINATEPLANE_H
12 #define KDCHART_POLAR_COORDINATEPLANE_H
13 
15 
16 namespace KDChart {
17 
18 class Chart;
19 class PaintContext;
20 
24 class KDCHART_EXPORT PolarCoordinatePlane : public AbstractCoordinatePlane
25 {
26  Q_OBJECT
27 
28  Q_DISABLE_COPY(PolarCoordinatePlane)
30 
31 public:
33  typedef QList<CoordinateTransformation> CoordinateTransformationList;
34 
35  explicit PolarCoordinatePlane(Chart *parent = nullptr);
36  ~PolarCoordinatePlane() override;
37 
38  void addDiagram(AbstractDiagram *diagram) override;
39 
40  const QPointF translate(const QPointF &diagramPoint) const override;
41  const QPointF translatePolar(const QPointF &diagramPoint) const;
42 
52  void setStartPosition(qreal degrees);
56  qreal startPosition() const;
57 
58  qreal zoomFactorX() const override;
59  qreal zoomFactorY() const override;
60 
61  void setZoomFactors(qreal factorX, qreal factorY) override;
62  void setZoomFactorX(qreal factor) override;
63  void setZoomFactorY(qreal factor) override;
64 
65  QPointF zoomCenter() const override;
66 
67  void setZoomCenter(const QPointF &center) override;
68 
89  void setGridAttributes(bool circular, const GridAttributes &);
90 
101  void resetGridAttributes(bool circular);
102 
117  const GridAttributes gridAttributes(bool circular) const;
118 
131  bool hasOwnGridAttributes(bool circular) const;
132 
133  qreal angleUnit() const;
134  qreal radiusUnit() const;
135 
137  void paint(QPainter *) override;
138 
139 protected:
140  DataDimensionsList getDataDimensionsList() const override;
141  void paintEvent(QPaintEvent *);
142  void resizeEvent(QResizeEvent *);
143 
144  void layoutDiagrams() override;
145 protected Q_SLOTS:
146  void slotLayoutChanged(AbstractDiagram *diagram);
147  void adjustZoomAndRepaint();
148 
149 private:
150  void setHasOwnGridAttributes(bool circular, bool on);
151 };
152 }
153 
154 #endif
#define KDCHART_DECLARE_PRIVATE_DERIVED_PARENT(X, ParentType)
Definition: KDChartGlobal.h:50
QPointF translate(const TernaryPoint &point)
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane,...
AbstractDiagram defines the interface for diagram classes.
A chart with one or more diagrams.
Definition: KDChartChart.h:84
A set of attributes controlling the appearance of grids.
QList< CoordinateTransformation > CoordinateTransformationList
void paintEvent(QPaintEvent *)
QList< DataDimension > DataDimensionsList

© 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