PieSlice

class PieSlice: public DataElement

Implements a pie slice data element.

Inherits from DataElement.

Summary
PieSliceImplements a pie slice data element.
Functions
PieSliceInitializes the object.
~PieSliceReleases all allocated resources.
DrawDraws the pie slice.
DrawLabelsUnused function.
ChangePositionChanges the position of the pie slice.
ScaleScales the object.
ChangeAlphaChanges the alpha value of the pie slice.
RotateRotates the pie slice.
SetBeginValueSets the begin value of the pie slice.
GetBeginValueReturns the begin value of the pie slice.
SetWidthSets the width of the pie slice.
GetValueScaleFactorReturns the value scale factor of the pie slice.
GetOutterVerticesReturns the number of outter vertices (all vertices minus the center vertex).

Functions

PieSlice

PieSlice(DataEntry *pDataEntry,
float fBeginValue,
float fValueScaleFactor)

Initializes the object.

Parameters

pDataEntryPointer to the data entry object that shall be represented by the pie slice.
fBeginValueAccumulated data entry values of predecessor pie slices.
fValueScaleFactorScale factor for all pie slices to scale the sum of all slices to 100 percent.

~PieSlice

~PieSlice()

Releases all allocated resources.

Draw

void Draw(QPainter *pPainter)

Draws the pie slice.  Inherited from AlterableObject.

Parameters

pPainterThe QPainter object that shall be used for painting.

DrawLabels

void DrawLabels(QPainter *pPainter)

Unused function.  Inherited from AlterableObject.

Parameters

pPainterUnused parameter.

ChangePosition

void ChangePosition(float fDeltaLeft,
float fDeltaTop,
float fDeltaBottom)

Changes the position of the pie slice.  Inherited from AlterableObject.

Parameters

fDeltaLeftTotal horizontal distance.
fDeltaTopTotal vertical distance according to the upper vertices.
fDeltaBottomUnused parameter.

Scale

void Scale(float fDeltaWidth,
float fDeltaHeight)

Scales the object.  Inherited from DataElement.

Parameters

fDeltaWidthTotal horizontal scaling value.
fDeltaHeightUnused parameter.

ChangeAlpha

void ChangeAlpha(float fDeltaAlpha)

Changes the alpha value of the pie slice.  Inherited from AlterableObject.

Parameters

fDeltaAlphaChange of alpha value.

Rotate

void Rotate(float fDeltaValue)

Rotates the pie slice.

Parameters

fDeltaValueTotal rotation value inside a pie chart (100.0f equals 360 degrees).

SetBeginValue

void SetBeginValue(float fBeginValue)

Sets the begin value of the pie slice.  This function equals a rotation by the difference of fBeginValue minus the current begin value.

Parameters

fBeginValueThe new begin value of the slice.

GetBeginValue

float GetBeginValue()

Returns the begin value of the pie slice.

Returns

The begin value of the pie slice.

SetWidth

void SetWidth(float fWidth)

Sets the width of the pie slice.  This function equals a scaling by the difference of fWidth minus the current width.

Parameters

fWidthThe new width of the pie slice.

GetValueScaleFactor

float GetValueScaleFactor()

Returns the value scale factor of the pie slice.  All pie slices of the same pie chart return the same value.

Returns

The value scale factor of the pie slice.

GetOutterVertices

int GetOutterVertices()

Returns the number of outter vertices (all vertices minus the center vertex).

Returns

The number of outter vertices.

class PieSlice: public DataElement
Implements a pie slice data element.
PieSlice(DataEntry *pDataEntry,
float fBeginValue,
float fValueScaleFactor)
Initializes the object.
~PieSlice()
Releases all allocated resources.
void Draw(QPainter *pPainter)
Draws the pie slice.
void DrawLabels(QPainter *pPainter)
Unused function.
void ChangePosition(float fDeltaLeft,
float fDeltaTop,
float fDeltaBottom)
Changes the position of the pie slice.
void Scale(float fDeltaWidth,
float fDeltaHeight)
Scales the object.
void ChangeAlpha(float fDeltaAlpha)
Changes the alpha value of the pie slice.
void Rotate(float fDeltaValue)
Rotates the pie slice.
void SetBeginValue(float fBeginValue)
Sets the begin value of the pie slice.
float GetBeginValue()
Returns the begin value of the pie slice.
void SetWidth(float fWidth)
Sets the width of the pie slice.
float GetValueScaleFactor()
Returns the value scale factor of the pie slice.
int GetOutterVertices()
Returns the number of outter vertices (all vertices minus the center vertex).
class DataElement: public AlterableObject
Abstract class that implements the skeleton of a data element.
class AlterableObject
Abstract class that implements the skeleton of an alterable object, i.e.
Close