PieSector

class PieSector: public DataElement

Implements a pie sector data element.  A pie sector is a grouping of several pie slice data elements and a common label.

Inherits from DataElement.

Summary
PieSectorImplements a pie sector data element.
Functions
PieSectorInitializes the object.
~PieSectorReleases all allocated resources.
DrawDraws the pie sector.
DrawLabelsDraws the label assigned to the pie sector.
ChangePositionUnused function.
ScaleUnused function.
ChangeAlphaUnused function.
GetDataGroupReturns the data group connected to the pie sector.
GetSlicesReturns a vector containing all pie slices of the pie sector.

Functions

PieSector

PieSector(DataGroup *pDataGroup,
float fBeginValue,
float fValueScaleFactor,
int iMoveSlice)

Initializes the object.

Parameters

pDataGroupPointer to the data group object that shall be represented by the pie sector.
fBeginValueAccumulated data entry values of predecessor pie sectors.
fValueScaleFactorScale factor for all pie slices to scale the sum of all sectors to 100 percent.
iMoveSliceIndex of the slice regarding all slices with a value smaller than PIE_CHART_LABEL_OFFSET_VALUE.

~PieSector

~PieSector()

Releases all allocated resources.

Draw

void Draw(QPainter *pPainter)

Draws the pie sector.  Inherited from AlterableObject.

Parameters

pPainterThe QPainter object that shall be used for painting.

DrawLabels

void DrawLabels(QPainter *pPainter)

Draws the label assigned to the pie sector.  Inherited from AlterableObject.

Parameters

pPainterThe QPainter object that shall be used for painting.

ChangePosition

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

Unused function.  Inherited from AlterableObject.

Parameters

fDeltaLeftUnused parameter.
fDeltaTopUnused parameter.
fDeltaBottomUnused parameter.

Scale

void Scale(float fDeltaWidth,
float fDeltaHeight)

Unused function.  Inherited from DataElement.

Parameters

fDeltaWidthUnused parameter.
fDeltaHeightUnused parameter.

ChangeAlpha

void ChangeAlpha(float fDeltaAlpha)

Unused function.  Inherited from AlterableObject.

Parameters

fDeltaAlphaUnused parameter.

GetDataGroup

DataGroup* GetDataGroup()

Returns the data group connected to the pie sector.

Returns

The data group connected to the pie sector.

GetSlices

std::vector<PieSlice*> GetSlices()

Returns a vector containing all pie slices of the pie sector.

Returns

A vector containing all pie slices of the pie sector.

class PieSector: public DataElement
Implements a pie sector data element.
PieSector(DataGroup *pDataGroup,
float fBeginValue,
float fValueScaleFactor,
int iMoveSlice)
Initializes the object.
~PieSector()
Releases all allocated resources.
void Draw(QPainter *pPainter)
Draws the pie sector.
void DrawLabels(QPainter *pPainter)
Draws the label assigned to the pie sector.
void ChangePosition(float fDeltaLeft,
float fDeltaTop,
float fDeltaBottom)
Unused function.
void Scale(float fDeltaWidth,
float fDeltaHeight)
Unused function.
void ChangeAlpha(float fDeltaAlpha)
Unused function.
DataGroup* GetDataGroup()
Returns the data group connected to the pie sector.
std::vector<PieSlice*> GetSlices()
Returns a vector containing all pie slices of the pie sector.
class DataElement: public AlterableObject
Abstract class that implements the skeleton of a data element.
Maximum data value for a data element where a label offset is added to avoid occlusion.
class AlterableObject
Abstract class that implements the skeleton of an alterable object, i.e.
Close