libkdegames/libkdegamesprivate
#include <KGameCanvas>
Public Types | |
enum | HPos { HStart, HLeft, HRight, HCenter } |
enum | VPos { VBaseline, VTop, VBottom, VCenter } |
Detailed Description
A KGameCanvasText is a text that can be put in the canvas.
- Deprecated:
- For new applications, use Qt's Graphics View framework or Qt Quick.
Definition at line 487 of file kgamecanvas.h.
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.
Enumerator | |
---|---|
HStart | |
HLeft | |
HRight | |
HCenter |
Definition at line 493 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.
Enumerator | |
---|---|
VBaseline | |
VTop | |
VBottom | |
VCenter |
Definition at line 503 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 827 of file kgamecanvas.cpp.
KGameCanvasText::KGameCanvasText | ( | KGameCanvasAbstract * | canvas = NULL | ) |
Constructor, creating with an empty text.
Definition at line 839 of file kgamecanvas.cpp.
|
virtual |
Definition at line 849 of file kgamecanvas.cpp.
Member Function Documentation
|
inline |
Returns the color.
Definition at line 539 of file kgamecanvas.h.
|
inline |
Returns the font.
Definition at line 545 of file kgamecanvas.h.
|
inline |
Returns the horizontal positioning style.
Definition at line 551 of file kgamecanvas.h.
|
inlinevirtual |
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 561 of file kgamecanvas.h.
|
virtual |
Override this function to draw the item with the painter.
Implements KGameCanvasItem.
Definition at line 927 of file kgamecanvas.cpp.
|
virtual |
Override this function to return the rect the item will be drawn into.
Implements KGameCanvasItem.
Definition at line 933 of file kgamecanvas.cpp.
void KGameCanvasText::setColor | ( | const QColor & | color | ) |
Sets the color.
Definition at line 872 of file kgamecanvas.cpp.
void KGameCanvasText::setFont | ( | const QFont & | font | ) |
Sets the font.
Definition at line 876 of file kgamecanvas.cpp.
Sets the positioning style.
Definition at line 884 of file kgamecanvas.cpp.
void KGameCanvasText::setText | ( | const QString & | text | ) |
Sets the text.
Definition at line 862 of file kgamecanvas.cpp.
|
inline |
Returns the text.
Definition at line 533 of file kgamecanvas.h.
|
inline |
Returns the vertical positioning style.
Definition at line 554 of file kgamecanvas.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.