PieChart

class PieChart: public Chart

Implements a pie chart.  A pie chart contains a set of pie sector data elements and a headline label.

Inherits from Chart.

Summary
PieChartImplements a pie chart.
Functions
PieChartInitializes the object.
~PieChartReleases all allocated resources.
DrawDraws the chart.
DrawLabelsDraws the label assigned to the chart.
ChangePositionUnused function.
ChangeAlphaUnused function.
GetConnectedDataElementByDataGroupReturns the pie sector which represents the given data group.
GetConnectedSliceReturns the pie slice data element which represents the given data entry.
GetAllSlicesReturns a vector containing all visible (not filtered) pie slices of all pie sectors of the chart sorted by value.
GetAllSlicesGroupSortedReturns a vector containing all visible (not filtered) pie slices of all pie sectors of the chart, sorted first by pie sector, then by value.
GetValueScaleFactorReturns the value scale factor of the chart.
GetVisibleDataGroupsReturns a vector containing all visible data groups of the given data groups, i.e.
ContainsDataEntryLookup function which checks the existence of a given data entry pointer in a given vector.

Functions

PieChart

PieChart(DataSet *pDataSet)

Initializes the object.

Parameters

pDataSetPointer to the data set object that shall be represented by the chart.

~PieChart

~PieChart()

Releases all allocated resources.

Draw

void Draw(QPainter *pPainter)

Draws the chart.  Inherited from AlterableObject.

Parameters

pPainterThe QPainter object that shall be used for painting.

DrawLabels

void DrawLabels(QPainter *pPainter)

Draws the label assigned to the chart.  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.

ChangeAlpha

void ChangeAlpha(float fDeltaAlpha)

Unused function.  Inherited from AlterableObject.

Parameters

fDeltaAlphaUnused parameter.

GetConnectedDataElementByDataGroup

DataElement* GetConnectedDataElementByDataGroup(DataGroup *pDataGroup)

Returns the pie sector which represents the given data group.  If no such pie sector exists, NULL is returned.

Parameters

pDataGroupPointer to the data group to be searched.

Returns

The pie sector which represents the given data group if present, else NULL.

GetConnectedSlice

PieSlice* GetConnectedSlice(DataEntry *pDataEntry)

Returns the pie slice data element which represents the given data entry.  If no such pie slice exists among all pie sectors, NULL is returned.

Parameters

pDataEntryPointer to the data entry to be searched.

Returns

The pie slice data element which represents the given data entry if present, else NULL.

GetAllSlices

std::vector<PieSlice*> GetAllSlices()

Returns a vector containing all visible (not filtered) pie slices of all pie sectors of the chart sorted by value.

Returns

A vector containing all visible pie slices of all pie sectors of the chart sorted by value.

GetAllSlicesGroupSorted

std::vector<PieSlice*> GetAllSlicesGroupSorted()

Returns a vector containing all visible (not filtered) pie slices of all pie sectors of the chart, sorted first by pie sector, then by value.

Returns

A vector containing all visible pie slices of all pie sectors of the chart sorted by pie sector, then by value.

GetValueScaleFactor

float GetValueScaleFactor()

Returns the value scale factor of the chart.

Returns

The value scale factor of the pie slice.

GetVisibleDataGroups

std::vector<DataGroup*> GetVisibleDataGroups(
   std::vector<DataGroup*> vAllDataGroups
)

Returns a vector containing all visible data groups of the given data groups, i.e. all data groups with at least one unfiltered data entry.

Parameters

vAllDataGroupsA vector containing all data groups of a data set.

Returns

A vector containing all visible data groups of the given data groups.

ContainsDataEntry

bool ContainsDataEntry(std::vector<DataEntry*> vDataEntries,
DataEntry *pDataEntry)

Lookup function which checks the existence of a given data entry pointer in a given vector.

Parameters

vDataEntriesA vector of data entry pointers.
pDataEntryA data entry pointer to be searched.

Returns

A boolean value indicating if the vector contains the data entry.

class PieChart: public Chart
Implements a pie chart.
PieChart(DataSet *pDataSet)
Initializes the object.
~PieChart()
Releases all allocated resources.
void Draw(QPainter *pPainter)
Draws the chart.
void DrawLabels(QPainter *pPainter)
Draws the label assigned to the chart.
void ChangePosition(float fDeltaLeft,
float fDeltaTop,
float fDeltaBottom)
Unused function.
void ChangeAlpha(float fDeltaAlpha)
Unused function.
DataElement* GetConnectedDataElementByDataGroup(DataGroup *pDataGroup)
Returns the pie sector which represents the given data group.
PieSlice* GetConnectedSlice(DataEntry *pDataEntry)
Returns the pie slice data element which represents the given data entry.
std::vector<PieSlice*> GetAllSlices()
Returns a vector containing all visible (not filtered) pie slices of all pie sectors of the chart sorted by value.
std::vector<PieSlice*> GetAllSlicesGroupSorted()
Returns a vector containing all visible (not filtered) pie slices of all pie sectors of the chart, sorted first by pie sector, then by value.
float GetValueScaleFactor()
Returns the value scale factor of the chart.
std::vector<DataGroup*> GetVisibleDataGroups(
   std::vector<DataGroup*> vAllDataGroups
)
Returns a vector containing all visible data groups of the given data groups, i.e.
bool ContainsDataEntry(std::vector<DataEntry*> vDataEntries,
DataEntry *pDataEntry)
Lookup function which checks the existence of a given data entry pointer in a given vector.
class Chart: public AlterableObject
Abstract class that implements the skeleton of a chart.
class AlterableObject
Abstract class that implements the skeleton of an alterable object, i.e.
Close