#include <kgamecanvas.h>


Public Types | |
| enum | HPos { HStart, HLeft, HRight, HCenter } |
| Specifies the meaning of the x coordinate of the item. More... | |
| enum | VPos { VBaseline, VTop, VBottom, VCenter } |
| Specifies the meaning of the y coordinate of the item. More... | |
Public Member Functions | |
| 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. | |
| KGameCanvasText (KGameCanvasAbstract *canvas=NULL) | |
| Constructor, creating with an empty text. | |
| virtual | ~KGameCanvasText () |
| QString | text () const |
| Returns the text. | |
| void | setText (const QString &text) |
| Sets the text. | |
| QColor | color () const |
| Returns the color. | |
| void | setColor (const QColor &color) |
| Sets the color. | |
| QFont | font () const |
| Returns the font. | |
| void | setFont (const QFont &font) |
| Sets the font. | |
| HPos | hPositioning () const |
| Returns the horizontal positioning style. | |
| VPos | vPositioning () const |
| Returns the vertical positioning style. | |
| void | setPositioning (HPos hp, VPos vp) |
| Sets the positioning style. | |
| virtual void | paint (QPainter *p) |
| Override this function to draw the item with the painter. | |
| virtual QRect | rect () const |
| Override this function to return the rect the item will be drawn into. | |
| virtual bool | layered () const |
| Override this function to specify if the painting operations will paint over each other. | |
A KGameCanvasText is a text that can be put in the canvas.
Definition at line 450 of file kgamecanvas.h.
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.
| 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.
| QString KGameCanvasText::text | ( | ) | const [inline] |
| void KGameCanvasText::setText | ( | const QString & | text | ) |
Sets the text.
Definition at line 852 of file kgamecanvas.cpp.
References KGameCanvasItem::canvas(), KGameCanvasItem::changed(), and KGameCanvasItem::visible().

| QColor KGameCanvasText::color | ( | ) | const [inline] |
| void KGameCanvasText::setColor | ( | const QColor & | color | ) |
| QFont KGameCanvasText::font | ( | ) | const [inline] |
| void KGameCanvasText::setFont | ( | const QFont & | font | ) |
Sets the font.
Definition at line 866 of file kgamecanvas.cpp.
References KGameCanvasItem::canvas(), KGameCanvasItem::changed(), and KGameCanvasItem::visible().

| HPos KGameCanvasText::hPositioning | ( | ) | const [inline] |
| VPos KGameCanvasText::vPositioning | ( | ) | const [inline] |
Sets the positioning style.
Definition at line 874 of file kgamecanvas.cpp.
References KGameCanvasItem::pos().

| 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.
References KGameCanvasItem::pos().

| 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.
References KGameCanvasItem::pos().

| 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.
1.5.3