kapman
elementitem.cpp
Go to the documentation of this file.
23 setPos(p_model->getX() - boundingRect().width() / 2, p_model->getY() - boundingRect().height() / 2);
void addEllipse(const QRectF &boundingRectangle)
qreal x() const
qreal y() const
virtual void update(qreal p_x, qreal p_y)
Updates the ElementItem coordinates.
Definition: elementitem.cpp:45
Element * m_model
The instance of Element the ElementItem will represent.
Definition: elementitem.h:39
virtual QRectF boundingRect() const
void setPos(const QPointF &pos)
This class describes the common characteristics and behaviour of any game Element (character or item)...
Definition: element.h:30
qreal width() const
void setCacheMode(CacheMode mode, const QSize &logicalCacheSize)
QPainterPath shape() const
Reimplement QGraphicsItem::shape() to return an ellipse to improve collisions.
Definition: elementitem.cpp:39
qreal height() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setMaximumCacheSize(const QSize &size)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.