KDChartPieDiagram.cpp File Reference

#include <QDebug>
#include <QPainter>
#include <QStack>
#include "KDChartPieDiagram.h"
#include "KDChartPieDiagram_p.h"
#include "KDChartAttributesModel.h"
#include "KDChartPaintContext.h"
#include "KDChartPieAttributes.h"
#include "KDChartThreeDPieAttributes.h"
#include "KDChartPainterSaver_p.h"
#include "KDChartDataValueAttributes.h"
#include "KDChartNullPaintDevice.h"
#include <KDABLibFakes>

Include dependency graph for KDChartPieDiagram.cpp:

Go to the source code of this file.

Defines

#define d   d_func()

Functions

static QRectF buildReferenceRect (const PolarCoordinatePlane *plane)


Define Documentation

#define d   d_func()

Definition at line 52 of file KDChartPieDiagram.cpp.


Function Documentation

static QRectF buildReferenceRect ( const PolarCoordinatePlane plane  )  [static]

Definition at line 118 of file KDChartPieDiagram.cpp.

References KDChart::PolarCoordinatePlane::translate().

Referenced by KDChart::RingDiagram::paint(), and KDChart::PieDiagram::paintInternal().

00119 {
00120     QRectF contentsRect;
00121 //qDebug() << "..........................................";
00122     QPointF referencePointAtTop = plane->translate( QPointF( 1, 0 ) );
00123     QPointF temp = plane->translate( QPointF( 0, 0 ) ) - referencePointAtTop;
00124     const double offset = temp.y();
00125     referencePointAtTop.setX( referencePointAtTop.x() - offset );
00126     contentsRect.setTopLeft( referencePointAtTop );
00127     contentsRect.setBottomRight( referencePointAtTop + QPointF( 2*offset, 2*offset) );
00128 //qDebug() << contentsRect;
00129     return contentsRect;
00130 }


Generated on Thu Mar 4 23:22:13 2010 for KD Chart 2 by  doxygen 1.5.4