23 #ifndef KDCHARTPIEDIAGRAM_H
24 #define KDCHARTPIEDIAGRAM_H
30 class LabelPaintCache;
59 LineFromSliceDecoration = 2
61 Q_DECLARE_FLAGS( LabelDecorations, LabelDecoration )
63 void setLabelDecorations( LabelDecorations decorations );
65 LabelDecorations labelDecorations() const;
68 void setLabelCollisionAvoidanceEnabled(
bool enabled );
70 bool isLabelCollisionAvoidanceEnabled() const;
73 virtual
void resize ( const QSizeF& area );
77 virtual qreal valueTotals () const;
79 virtual qreal numberOfValuesPerDataset() const;
81 virtual qreal numberOfGridRings() const;
87 virtual const
QPair<QPointF, QPointF> calculateDataBoundaries() const;
88 void paintEvent( QPaintEvent* );
89 void resizeEvent( QResizeEvent* );
95 void shuffleLabels( QRectF* textBoundingRect );
97 void drawSlice( QPainter* painter, const QRectF& drawPosition, uint slice );
98 void drawSliceSurface( QPainter* painter, const QRectF& drawPosition, uint slice );
99 void addSliceLabel( LabelPaintCache* lpc, const QRectF& drawPosition, uint slice );
100 void draw3DEffect( QPainter* painter, const QRectF& drawPosition, uint slice );
101 void draw3dCutSurface( QPainter* painter,
105 void draw3dOuterRim( QPainter* painter,
110 void calcSliceAngles();
111 void calcPieSize( const QRectF &contentsRect );
112 QRectF twoDPieRect( const QRectF &contentsRect, const
ThreeDPieAttributes& threeDAttrs ) const;
113 QRectF explodedDrawPosition( const QRectF& drawPosition, uint slice ) const;
114 uint findSliceAt( qreal angle,
int columnCount );
115 uint findLeftSlice( uint slice,
int columnCount );
116 uint findRightSlice( uint slice,
int columnCount );
117 QPointF pointOnEllipse( const QRectF& boundingBox, qreal angle );
120 Q_DECLARE_OPERATORS_FOR_FLAGS(
PieDiagram::LabelDecorations )
123 #endif // KDCHARTPIEDIAGRAM_H