granatier
bombitem.cpp
Go to the documentation of this file.
82 QRectF shapeRect = QRectF( rect.x()+rect.width()/8, rect.y()+rect.height()/8, rect.width()*3.0/4.0, rect.height()*3.0/4.0 );
214 transform.translate(-m_itemSizeReal.width() * (1-m_fallingAnimationCounter*0.02) / 2.0, -m_itemSizeReal.height() * (1-m_fallingAnimationCounter*0.02) / 2.0);
246 void BombItem::updateMortar(int nMortarState, int nMortarRampEnd, int nMortarPeak, int nMortarGround)
306 transform.translate(-m_itemSizeReal.width() * mortarScale / 2.0, -m_itemSizeReal.height() * mortarScale / 2.0);
void addEllipse(const QRectF &boundingRectangle)
void setInterval(int msec)
int width() const
qreal x() const
qreal y() const
const T & at(int i) const
void animationFrameChanged(BombItem *bombItem, int nFrame)
signals next animation frame
QTransform & translate(qreal dx, qreal dy)
qreal x() const
qreal y() const
void append(const T &value)
virtual void update(qreal p_x, qreal p_y)
Updates the BombItem coordinates.
Definition: bombitem.cpp:113
bool m_dudBomb
Flag to stop the animation if the bomb is fallin in a hole or TODO: a dud bomb.
Definition: bombitem.h:54
Element * m_model
The instance of Element the ElementItem will represent.
Definition: elementitem.h:40
This class describes the common characteristics and behaviour of the bomb item.
Definition: bomb.h:30
QPainterPath shape() const
Overrides the default shape function to make it a small circle This function is used to determinate c...
Definition: bombitem.cpp:75
BombItem(Bomb *p_model, KGameRenderer *renderer)
Creates a new BombItem instance.
Definition: bombitem.cpp:30
This class is the graphical representation of a game Element.
Definition: elementitem.h:30
void stop()
qreal width() const
int height() const
void start(int msec)
qreal height() const
virtual void updateGraphics(qreal svgScaleFactor)
Updates the graphics after a resize.
Definition: elementitem.cpp:65
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
void setSingleShot(bool singleShot)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:10 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:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.