Changeset View
Changeset View
Standalone View
Standalone View
src/KChart/Polar/KChartPolarCoordinatePlane.h
Show All 38 Lines | 25 | namespace KChart { | |||
---|---|---|---|---|---|
39 | 39 | | |||
40 | public: | 40 | public: | ||
41 | struct CoordinateTransformation; | 41 | struct CoordinateTransformation; | ||
42 | typedef QList<CoordinateTransformation> CoordinateTransformationList; | 42 | typedef QList<CoordinateTransformation> CoordinateTransformationList; | ||
43 | 43 | | |||
44 | explicit PolarCoordinatePlane ( Chart* parent = nullptr ); | 44 | explicit PolarCoordinatePlane ( Chart* parent = nullptr ); | ||
45 | ~PolarCoordinatePlane(); | 45 | ~PolarCoordinatePlane(); | ||
46 | 46 | | |||
47 | void addDiagram ( AbstractDiagram* diagram ) Q_DECL_OVERRIDE; | 47 | void addDiagram ( AbstractDiagram* diagram ) override; | ||
48 | 48 | | |||
49 | const QPointF translate ( const QPointF& diagramPoint ) const Q_DECL_OVERRIDE; | 49 | const QPointF translate ( const QPointF& diagramPoint ) const override; | ||
50 | const QPointF translatePolar ( const QPointF& diagramPoint ) const; | 50 | const QPointF translatePolar ( const QPointF& diagramPoint ) const; | ||
51 | 51 | | |||
52 | /** \brief Specify the rotation of the coordinate plane. | 52 | /** \brief Specify the rotation of the coordinate plane. | ||
53 | * | 53 | * | ||
54 | * In a pie diagram this indicates the position where the first pie starts, | 54 | * In a pie diagram this indicates the position where the first pie starts, | ||
55 | * in a polar diagram it specifies the Zero position of the circular axis: | 55 | * in a polar diagram it specifies the Zero position of the circular axis: | ||
56 | * | 56 | * | ||
57 | * \image html polar-plane-start-position.png "Illustration of \"start position\" property" | 57 | * \image html polar-plane-start-position.png "Illustration of \"start position\" property" | ||
58 | * | 58 | * | ||
59 | * \sa startPosition | 59 | * \sa startPosition | ||
60 | */ | 60 | */ | ||
61 | void setStartPosition( qreal degrees ); | 61 | void setStartPosition( qreal degrees ); | ||
62 | /** Retrieve the rotation of the coordinate plane. | 62 | /** Retrieve the rotation of the coordinate plane. | ||
63 | * \sa setStartPosition | 63 | * \sa setStartPosition | ||
64 | */ | 64 | */ | ||
65 | qreal startPosition() const; | 65 | qreal startPosition() const; | ||
66 | 66 | | |||
67 | qreal zoomFactorX() const Q_DECL_OVERRIDE; | 67 | qreal zoomFactorX() const override; | ||
68 | qreal zoomFactorY() const Q_DECL_OVERRIDE; | 68 | qreal zoomFactorY() const override; | ||
69 | 69 | | |||
70 | void setZoomFactors( qreal factorX, qreal factorY ) Q_DECL_OVERRIDE; | 70 | void setZoomFactors( qreal factorX, qreal factorY ) override; | ||
71 | void setZoomFactorX( qreal factor ) Q_DECL_OVERRIDE; | 71 | void setZoomFactorX( qreal factor ) override; | ||
72 | void setZoomFactorY( qreal factor ) Q_DECL_OVERRIDE; | 72 | void setZoomFactorY( qreal factor ) override; | ||
73 | 73 | | |||
74 | QPointF zoomCenter() const Q_DECL_OVERRIDE; | 74 | QPointF zoomCenter() const override; | ||
75 | 75 | | |||
76 | void setZoomCenter( const QPointF& center ) Q_DECL_OVERRIDE; | 76 | void setZoomCenter( const QPointF& center ) override; | ||
77 | 77 | | |||
78 | /** | 78 | /** | ||
79 | * Set the attributes to be used for grid lines drawn in circular | 79 | * Set the attributes to be used for grid lines drawn in circular | ||
80 | * direction (or in sagittal direction, resp.). | 80 | * direction (or in sagittal direction, resp.). | ||
81 | * | 81 | * | ||
82 | * To disable circular grid painting, for example, your code should like this: | 82 | * To disable circular grid painting, for example, your code should like this: | ||
83 | * \code | 83 | * \code | ||
84 | * GridAttributes ga = plane->gridAttributes( bool ); | 84 | * GridAttributes ga = plane->gridAttributes( bool ); | ||
▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | |||||
138 | * \sa AbstractCoordinatePlane::globalGridAttributes | 138 | * \sa AbstractCoordinatePlane::globalGridAttributes | ||
139 | */ | 139 | */ | ||
140 | bool hasOwnGridAttributes( bool circular ) const; | 140 | bool hasOwnGridAttributes( bool circular ) const; | ||
141 | 141 | | |||
142 | qreal angleUnit() const; | 142 | qreal angleUnit() const; | ||
143 | qreal radiusUnit() const; | 143 | qreal radiusUnit() const; | ||
144 | 144 | | |||
145 | /** reimpl */ | 145 | /** reimpl */ | ||
146 | void paint( QPainter* ) Q_DECL_OVERRIDE; | 146 | void paint( QPainter* ) override; | ||
147 | 147 | | |||
148 | protected: | 148 | protected: | ||
149 | DataDimensionsList getDataDimensionsList() const Q_DECL_OVERRIDE; | 149 | DataDimensionsList getDataDimensionsList() const override; | ||
150 | void paintEvent ( QPaintEvent* ); | 150 | void paintEvent ( QPaintEvent* ); | ||
151 | void resizeEvent ( QResizeEvent* ); | 151 | void resizeEvent ( QResizeEvent* ); | ||
152 | 152 | | |||
153 | void layoutDiagrams() Q_DECL_OVERRIDE; | 153 | void layoutDiagrams() override; | ||
154 | protected Q_SLOTS: | 154 | protected Q_SLOTS: | ||
155 | void slotLayoutChanged( AbstractDiagram* diagram ); | 155 | void slotLayoutChanged( AbstractDiagram* diagram ); | ||
156 | void adjustZoomAndRepaint(); | 156 | void adjustZoomAndRepaint(); | ||
157 | 157 | | |||
158 | private: | 158 | private: | ||
159 | void setHasOwnGridAttributes( bool circular, bool on ); | 159 | void setHasOwnGridAttributes( bool circular, bool on ); | ||
160 | }; | 160 | }; | ||
161 | 161 | | |||
162 | } | 162 | } | ||
163 | 163 | | |||
164 | #endif | 164 | #endif |