KChart
KChartRingDiagram.cpp
89 if ( !checkInvariants( true ) ) return QPair<QPointF, QPointF>( QPointF( 0, 0 ), QPointF( 0, 0 ) );
103 const PieAttributes columnAttrs( pieAttributes( model()->index( i, j, rootIndex() ) ) ); // checked
166 const PieAttributes cellAttrs( pieAttributes( model()->index( i, j, rootIndex() ) ) ); // checked
186 qreal x = ( contentsRect.width() == d->size ) ? 0.0 : ( ( contentsRect.width() - d->size ) / 2.0 );
187 qreal y = ( contentsRect.height() == d->size ) ? 0.0 : ( ( contentsRect.height() - d->size ) / 2.0 );
244void RingDiagram::drawPieSurface( QPainter* painter, uint dataset, uint slice, qreal granularity )
302 const PieAttributes cellAttrs( pieAttributes( model()->index( i, j, rootIndex() ) ) ); // checked
320 totalRadialExplode = attrs.explode() ? maxRadialExplode + attrs.explodeFactor() : maxRadialExplode;
323 const QPointF p = pointOnEllipse( drawPosition, dataset, slice, false, actualStartAngle + degree,
330 poly.append( pointOnEllipse( drawPosition, dataset, slice, false, actualStartAngle + actualAngleLen,
359 const QPointF outerCenterPoint( poly[ lastInnerBrinkPoint + int((iPoint - lastInnerBrinkPoint) / 2) ] );
390QPointF RingDiagram::pointOnEllipse( const QRectF& rect, int dataset, int slice, bool outer, qreal angle,
402 const qreal centerOffsetX = rCount > 0 ? totalExplodeFactor * rect.width() / ( ( rCount + 1 ) * 2 ) : 0.0;
403 const qreal centerOffsetY = rCount > 0 ? totalExplodeFactor * rect.height() / ( ( rCount + 1 ) * 2 ) : 0.0;
404 const qreal gapOffsetX = rCount > 0 ? totalGapFactor * rect.width() / ( ( rCount + 1 ) * 2 ) : 0.0;
405 const qreal gapOffsetY = rCount > 0 ? totalGapFactor * rect.height() / ( ( rCount + 1 ) * 2 ) : 0.0;
413 return QPointF( ( offsetX + gapOffsetX ) * cosAngle + centerOffsetX * cosAngleCenter + rect.center().x(),
437 total += qAbs( model()->data( model()->index( dataset, j, rootIndex() ) ).toReal() ); // checked
Declaring the class KChart::DataValueAttributes.
DataValueAttributes dataValueAttributes() const
Retrieve the DataValueAttributes specified globally.
Definition KChartAbstractDiagram.cpp:306
QPen pen() const
Retrieve the pen to be used for painting datapoints globally.
Definition KChartAbstractDiagram.cpp:843
QBrush brush() const
Retrieve the brush to be used for painting datapoints globally.
Definition KChartAbstractDiagram.cpp:884
qreal granularity() const
Definition KChartAbstractPieDiagram.cpp:75
bool autoRotateLabels() const
Definition KChartAbstractPieDiagram.cpp:100
TextAttributes textAttributes() const
Definition KChartDataValueAttributes.cpp:158
A set of attributes controlling the appearance of pie charts.
Definition KChartPieAttributes.h:22
qreal startPosition() const
Retrieve the rotation of the coordinate plane.
Definition KChartPolarCoordinatePlane.cpp:226
bool compare(const RingDiagram *other) const
Returns true if both diagrams have the same settings.
Definition KChartRingDiagram.cpp:54
const QPair< QPointF, QPointF > calculateDataBoundaries() const override
\reimpl
Definition KChartRingDiagram.cpp:87
virtual RingDiagram * clone() const
Creates an exact copy of this diagram.
Definition KChartRingDiagram.cpp:49
QStringView level(QStringView ifopt)
QCA_EXPORT void init()
virtual int columnCount(const QModelIndex &parent) const const=0
virtual int rowCount(const QModelIndex &parent) const const=0
QAbstractItemModel * model() const const
QModelIndex rootIndex() const const
QWidget * viewport() const const
T qobject_cast(QObject *object)
Antialiasing
void drawPolygon(const QPoint *points, int pointCount, Qt::FillRule fillRule)
void rotate(qreal angle)
void setBrush(Qt::BrushStyle style)
void setPen(Qt::PenStyle style)
void setRenderHint(RenderHint hint, bool on)
void translate(const QPoint &offset)
int height() const const
bool isEmpty() const const
int left() const const
int top() const const
int width() const const
QRect contentsRect() const const
height
rect
size
width
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:24 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:24 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.