24 #include "gobchartspieview.h"
25 #include "utils/gobchartscolours.h"
26 #include "utils/globalincludes.h"
28 #include <QGraphicsDropShadowEffect>
29 #include <QGraphicsEllipseItem>
59 qreal fullElipse = 5760;
60 int lastStopAngle = 0;
66 QString cat =
category( activeRows.at( row ) );
67 qreal val =
value( activeRows.at( row ) );
81 QGraphicsEllipseItem *graphSegment =
new QGraphicsEllipseItem( pieRectangle );
88 graphSegment->setBrush( colour );
93 graphSegment->setBrush( colour );
96 graphSegment->setStartAngle( lastStopAngle );
97 graphSegment->setSpanAngle( qRound( dataPercentage * fullElipse ) );
99 QString legendText = QString(
"%1 - %2" ).arg( cat ).arg( val );
104 lastStopAngle += graphSegment->spanAngle();
109 debugLog( tr(
"GobChartsPieView::generateGraphicsItems# No valid items." ) );
124 return QString(
"%1" ).arg( static_cast< int >( PIE ) );