granatier
#include <elementitem.h>
Public Slots | |
virtual void | update (qreal p_x, qreal p_y) |
virtual void | updateGraphics (qreal svgScaleFactor) |
Public Member Functions | |
ElementItem (Element *p_model, KGameRenderer *renderer) | |
~ElementItem () | |
Element * | getModel () const |
QPainterPath | shape () const |
Protected Member Functions | |
virtual void | updateGraphicsInternal (qreal svgScaleFactor) |
Protected Attributes | |
QSize | m_itemSizeReal |
QSize | m_itemSizeSet |
Element * | m_model |
QSize | m_renderSize |
Detailed Description
This class is the graphical representation of a game Element.
Definition at line 30 of file elementitem.h.
Constructor & Destructor Documentation
ElementItem::ElementItem | ( | Element * | p_model, |
KGameRenderer * | renderer | ||
) |
Creates a new ElementItem instance.
- Parameters
-
p_model the Element model renderer the KGameRenderer
Definition at line 26 of file elementitem.cpp.
ElementItem::~ElementItem | ( | ) |
Deletes the ElementItem instance.
Definition at line 39 of file elementitem.cpp.
Member Function Documentation
Element * ElementItem::getModel | ( | ) | const |
QPainterPath ElementItem::shape | ( | ) | const |
Reimplement QGraphicsItem::shape() to return an ellipse to improve collisions.
Definition at line 48 of file elementitem.cpp.
|
virtualslot |
Updates the ElementItem coordinates.
- Parameters
-
p_x the new x-coordinate p_y the new y-coordinate
Definition at line 55 of file elementitem.cpp.
|
virtualslot |
Updates the graphics after a resize.
- Parameters
-
svgScaleFactor the scaling factor between svg and rendered pixmap
Definition at line 65 of file elementitem.cpp.
|
protectedvirtual |
Definition at line 70 of file elementitem.cpp.
Member Data Documentation
|
protected |
Definition at line 45 of file elementitem.h.
|
protected |
Definition at line 44 of file elementitem.h.
|
protected |
The instance of Element the ElementItem will represent.
Definition at line 40 of file elementitem.h.
|
protected |
Definition at line 42 of file elementitem.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:43:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.