class Label: public AlterableObject
Implements a label object.
Inherits from AlterableObject.
Label | Implements a label object. |
Functions | |
Label | Initializes the object. |
~Label | Releases all allocated resources. |
Draw | Draws the label. |
DrawLabels | Unused function. |
ChangePosition | Changes the position of the label. |
ChangePosition | Calls ChangePosition(int, int). |
ChangeText | Changes the text of the label. |
ChangeAlpha | Changes the alpha value of the label’s font. |
GetRed | Returns the red color value of the label’s font. |
GetGreen | Returns the green color value of the label’s font. |
GetBlue | Returns the blue color value of the label’s font. |
GetAlpha | Returns the alpha color value of the label’s font. |
GetText | Returns the text of the label. |
GetLeft | Returns the X coordinate of the label. |
GetTop | Returns the Y coordinate of the label. |
GetOrientation | Returns the orientation of the label, either ORIENTATION_HORIZONTAL or ORIENTATION_VERTICAL. |
GetAlignment | Returns the alignment of the label, either Qt::AlignCenter, Qt::AlignLeft or Qt::AlignRight. |
GetStyle | Returns the style flags of the label. |
Label( QString sText, int iStyle, int iLeft, int iTop, int iOrientation, int iAlignment )
Initializes the object.
sText | The text for the label. |
iStyle | Style flags for the label. |
iLeft | X value of the label in QPainter coordinates. |
iTop | Y value of the label in QPainter coordinates. |
iOrientation | ORIENTATION_HORIZONTAL or ORIENTATION_VERTICAL. |
iAlignment | Qt::AlignCenter, Qt::AlignLeft or Qt::AlignRight. |
void Draw( QPainter * pPainter )
Draws the label. Inherited from AlterableObject.
pPainter | The QPainter object that shall be used for painting. |
void DrawLabels( QPainter * pPainter )
Unused function. Inherited from AlterableObject.
pPainter | Unused parameter. |
void ChangePosition( float fDeltaLeft, float fDeltaTop, float fDeltaBottom )
Calls ChangePosition(int, int). Inherited from AlterableObject.
fDeltaLeft | Total horizontal distance in pixels. |
fDeltaTop | Total vertical distance according to the upper vertices in pixels. |
fDeltaBottom | Unused parameter. |
int GetOrientation()
Returns the orientation of the label, either ORIENTATION_HORIZONTAL or ORIENTATION_VERTICAL.
The orientation of the label.
Implements a label object.
class Label: public AlterableObject
Initializes the object.
Label( QString sText, int iStyle, int iLeft, int iTop, int iOrientation, int iAlignment )
Releases all allocated resources.
~Label()
Draws the label.
void Draw( QPainter * pPainter )
Unused function.
void DrawLabels( QPainter * pPainter )
Changes the position of the label.
void ChangePosition( int iLeft, int iTop )
Changes the text of the label.
void ChangeText( QString sText )
Changes the alpha value of the label’s font.
void ChangeAlpha( float fDeltaAlpha )
Returns the red color value of the label’s font.
float GetRed()
Returns the green color value of the label’s font.
float GetGreen()
Returns the blue color value of the label’s font.
float GetBlue()
Returns the alpha color value of the label’s font.
float GetAlpha()
Returns the text of the label.
QString GetText()
Returns the X coordinate of the label.
int GetLeft()
Returns the Y coordinate of the label.
int GetTop()
Returns the orientation of the label, either ORIENTATION_HORIZONTAL or ORIENTATION_VERTICAL.
int GetOrientation()
Returns the alignment of the label, either Qt::AlignCenter, Qt::AlignLeft or Qt::AlignRight.
int GetAlignment()
Returns the style flags of the label.
int GetStyle()
Abstract class that implements the skeleton of an alterable object, i.e.
class AlterableObject