StackedBar

class StackedBar: public DataElement

Implements a stacked bar data element.  A stacked bar is a grouping of several bar data elements and a common label.

Inherits from DataElement.

Summary
StackedBarImplements a stacked bar data element.
Functions
StackedBarInitializes the object.
~StackedBarReleases all allocated resources.
DrawDraws the stacked bar.
DrawLabelsDraws the label assigned to the stacked bar.
ChangePositionChanges the position of the stacked bar.
ScaleScales the object.
ChangeAlphaUnused function.
GetDataGroupReturns the data group connected to the stacked bar.
GetBarsReturns a vector containing all bars of the stacked bar.

Functions

StackedBar

StackedBar(DataGroup *pDataGroup,
float fLeft,
float fWidth,
double dHighestGridValue)

Initializes the object.

Parameters

pDataGroupPointer to the data group object that shall be represented by the stacked bar.
fLeftThe x value of the bars.
fWidthThe width of the bars.
dHighestGridValueHighest grid value indicating how much the bars have to be scaled to fit.

~StackedBar

~StackedBar()

Releases all allocated resources.

Draw

void Draw(QPainter *pPainter)

Draws the stacked bar.  Inherited from AlterableObject.

Parameters

pPainterThe QPainter object that shall be used for painting.

DrawLabels

void DrawLabels(QPainter *pPainter)

Draws the label assigned to the stacked bar.  Inherited from AlterableObject.

Parameters

pPainterThe QPainter object that shall be used for painting.

ChangePosition

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

Changes the position of the stacked bar.  Inherited from AlterableObject.

Parameters

fDeltaLeftTotal horizontal distance.
fDeltaTopUnused parameter.
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)

Unused function.  Inherited from AlterableObject.

Parameters

fDeltaAlphaUnused parameter.

GetDataGroup

DataGroup* GetDataGroup()

Returns the data group connected to the stacked bar.

Returns

The data group connected to the stacked bar.

GetBars

std::vector<Bar*> GetBars()

Returns a vector containing all bars of the stacked bar.

Returns

A vector containing all bars of the stacked bar.

class StackedBar: public DataElement
Implements a stacked bar data element.
StackedBar(DataGroup *pDataGroup,
float fLeft,
float fWidth,
double dHighestGridValue)
Initializes the object.
~StackedBar()
Releases all allocated resources.
void Draw(QPainter *pPainter)
Draws the stacked bar.
void DrawLabels(QPainter *pPainter)
Draws the label assigned to the stacked bar.
void ChangePosition(float fDeltaLeft,
float fDeltaTop,
float fDeltaBottom)
Changes the position of the stacked bar.
void Scale(float fDeltaWidth,
float fDeltaHeight)
Scales the object.
void ChangeAlpha(float fDeltaAlpha)
Unused function.
DataGroup* GetDataGroup()
Returns the data group connected to the stacked bar.
std::vector<Bar*> GetBars()
Returns a vector containing all bars of the stacked bar.
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