libkdegames
KGameCanvasText Class Reference
#include <KGameCanvas>

Detailed Description
KGameCanvasText.A KGameCanvasText is a text that can be put in the canvas.
Definition at line 450 of file kgamecanvas.h.
Public Types | |
| enum | HPos { HStart, HLeft, HRight, HCenter } |
| enum | VPos { VBaseline, VTop, VBottom, VCenter } |
Public Member Functions | |
| QColor | color () const |
| QFont | font () const |
| HPos | hPositioning () const |
| KGameCanvasText (KGameCanvasAbstract *canvas=NULL) | |
| KGameCanvasText (const QString &text, const QColor &color, const QFont &font, HPos hp, VPos vp, KGameCanvasAbstract *canvas=NULL) | |
| virtual bool | layered () const |
| virtual void | paint (QPainter *p) |
| virtual QRect | rect () const |
| void | setColor (const QColor &color) |
| void | setFont (const QFont &font) |
| void | setPositioning (HPos hp, VPos vp) |
| void | setText (const QString &text) |
| QString | text () const |
| VPos | vPositioning () const |
| virtual | ~KGameCanvasText () |
Member Enumeration Documentation
Specifies the meaning of the x coordinate of the item.
It can refer to the start of the text, of the left, center, right of the bounding rectangle.
Definition at line 456 of file kgamecanvas.h.
Specifies the meaning of the y coordinate of the item.
It can refer to the baseline of the text, of the top, center, bottom of the bounding rectangle.
Definition at line 466 of file kgamecanvas.h.
Constructor & Destructor Documentation
| KGameCanvasText::KGameCanvasText | ( | const QString & | text, | |
| const QColor & | color, | |||
| const QFont & | font, | |||
| HPos | hp, | |||
| VPos | vp, | |||
| KGameCanvasAbstract * | canvas = NULL | |||
| ) |
Constructor, specifying the text and the parameters to use.
Definition at line 817 of file kgamecanvas.cpp.
| KGameCanvasText::KGameCanvasText | ( | KGameCanvasAbstract * | canvas = NULL |
) |
| KGameCanvasText::~KGameCanvasText | ( | ) | [virtual] |
Definition at line 839 of file kgamecanvas.cpp.
Member Function Documentation
| QColor KGameCanvasText::color | ( | ) | const [inline] |
| QFont KGameCanvasText::font | ( | ) | const [inline] |
| HPos KGameCanvasText::hPositioning | ( | ) | const [inline] |
| virtual bool KGameCanvasText::layered | ( | ) | const [inline, virtual] |
Override this function to specify if the painting operations will paint over each other.
If not, the item will be drawn more quickly when opacity is != 255, because it does not have to be painted onto a pixmap first. If you don't care about the item's opacity, don't care about this function as well.
Reimplemented from KGameCanvasItem.
Definition at line 524 of file kgamecanvas.h.
| void KGameCanvasText::paint | ( | QPainter * | p | ) | [virtual] |
Override this function to draw the item with the painter.
Implements KGameCanvasItem.
Definition at line 917 of file kgamecanvas.cpp.
| QRect KGameCanvasText::rect | ( | ) | const [virtual] |
Override this function to return the rect the item will be drawn into.
Implements KGameCanvasItem.
Definition at line 923 of file kgamecanvas.cpp.
| void KGameCanvasText::setColor | ( | const QColor & | color | ) |
| void KGameCanvasText::setFont | ( | const QFont & | font | ) |
| void KGameCanvasText::setText | ( | const QString & | text | ) |
| QString KGameCanvasText::text | ( | ) | const [inline] |
| VPos KGameCanvasText::vPositioning | ( | ) | const [inline] |
The documentation for this class was generated from the following files:
KDE 4.1 API Reference