Changeset View
Changeset View
Standalone View
Standalone View
src/KChart/Polar/KChartRingDiagram.h
Show All 36 Lines | |||||
37 | public: | 37 | public: | ||
38 | explicit RingDiagram( | 38 | explicit RingDiagram( | ||
39 | QWidget* parent = nullptr, PolarCoordinatePlane* plane = nullptr ); | 39 | QWidget* parent = nullptr, PolarCoordinatePlane* plane = nullptr ); | ||
40 | virtual ~RingDiagram(); | 40 | virtual ~RingDiagram(); | ||
41 | 41 | | |||
42 | protected: | 42 | protected: | ||
43 | // Implement AbstractDiagram | 43 | // Implement AbstractDiagram | ||
44 | /** \reimpl */ | 44 | /** \reimpl */ | ||
45 | void paint( PaintContext* paintContext ) Q_DECL_OVERRIDE; | 45 | void paint( PaintContext* paintContext ) override; | ||
46 | public: | 46 | public: | ||
47 | /** \reimpl */ | 47 | /** \reimpl */ | ||
48 | void resize( const QSizeF& area ) Q_DECL_OVERRIDE; | 48 | void resize( const QSizeF& area ) override; | ||
49 | 49 | | |||
50 | // Implement AbstractPolarDiagram | 50 | // Implement AbstractPolarDiagram | ||
51 | /** \reimpl */ | 51 | /** \reimpl */ | ||
52 | qreal valueTotals() const Q_DECL_OVERRIDE; | 52 | qreal valueTotals() const override; | ||
53 | /** \reimpl */ | 53 | /** \reimpl */ | ||
54 | qreal numberOfValuesPerDataset() const Q_DECL_OVERRIDE; | 54 | qreal numberOfValuesPerDataset() const override; | ||
55 | qreal numberOfDatasets() const Q_DECL_OVERRIDE; | 55 | qreal numberOfDatasets() const override; | ||
56 | /** \reimpl */ | 56 | /** \reimpl */ | ||
57 | qreal numberOfGridRings() const Q_DECL_OVERRIDE; | 57 | qreal numberOfGridRings() const override; | ||
58 | 58 | | |||
59 | qreal valueTotals( int dataset ) const; | 59 | qreal valueTotals( int dataset ) const; | ||
60 | 60 | | |||
61 | virtual RingDiagram * clone() const; | 61 | virtual RingDiagram * clone() const; | ||
62 | 62 | | |||
63 | /** | 63 | /** | ||
64 | * Returns true if both diagrams have the same settings. | 64 | * Returns true if both diagrams have the same settings. | ||
65 | */ | 65 | */ | ||
66 | bool compare( const RingDiagram* other ) const; | 66 | bool compare( const RingDiagram* other ) const; | ||
67 | 67 | | |||
68 | void setRelativeThickness( bool relativeThickness ); | 68 | void setRelativeThickness( bool relativeThickness ); | ||
69 | bool relativeThickness() const; | 69 | bool relativeThickness() const; | ||
70 | 70 | | |||
71 | virtual void setExpandWhenExploded( bool expand ); | 71 | virtual void setExpandWhenExploded( bool expand ); | ||
72 | virtual bool expandWhenExploded() const; | 72 | virtual bool expandWhenExploded() const; | ||
73 | 73 | | |||
74 | protected: | 74 | protected: | ||
75 | /** \reimpl */ | 75 | /** \reimpl */ | ||
76 | const QPair<QPointF, QPointF> calculateDataBoundaries() const Q_DECL_OVERRIDE; | 76 | const QPair<QPointF, QPointF> calculateDataBoundaries() const override; | ||
77 | void paintEvent( QPaintEvent* ) Q_DECL_OVERRIDE; | 77 | void paintEvent( QPaintEvent* ) override; | ||
78 | void resizeEvent( QResizeEvent* ) Q_DECL_OVERRIDE; | 78 | void resizeEvent( QResizeEvent* ) override; | ||
79 | 79 | | |||
80 | private: | 80 | private: | ||
81 | void drawOneSlice( QPainter* painter, uint dataset, uint slice, qreal granularity ); | 81 | void drawOneSlice( QPainter* painter, uint dataset, uint slice, qreal granularity ); | ||
82 | void drawPieSurface( QPainter* painter, uint dataset, uint slice, qreal granularity ); | 82 | void drawPieSurface( QPainter* painter, uint dataset, uint slice, qreal granularity ); | ||
83 | QPointF pointOnEllipse( const QRectF& rect, int dataset, int slice, bool outer, qreal angle, | 83 | QPointF pointOnEllipse( const QRectF& rect, int dataset, int slice, bool outer, qreal angle, | ||
84 | qreal totalGapFactor, qreal totalExplodeFactor ); | 84 | qreal totalGapFactor, qreal totalExplodeFactor ); | ||
85 | }; // End of class RingDiagram | 85 | }; // End of class RingDiagram | ||
86 | 86 | | |||
87 | } | 87 | } | ||
88 | 88 | | |||
89 | #endif // KCHARTRINGDIAGRAM_H | 89 | #endif // KCHARTRINGDIAGRAM_H |