granatier
bombexplosionitem.cpp
Go to the documentation of this file.
25 BombExplosionItem::BombExplosionItem(Bomb* p_model, Granatier::Direction::Type direction, int bombPower, KGameRenderer* renderer, qreal svgScaleFactor) : KGameRenderedItem(renderer, "")
156 QPoint viewBottomRight = scene()->views().first()->mapFromScene(m_itemSizeSet.width(), m_itemSizeSet.height());
161 //for better alignment, if the item size is different from the cell size, make the difference between the cell size and item size always even
162 if(m_itemSizeSet.width() != Granatier::CellSize || m_itemSizeSet.height() != Granatier::CellSize)
164 viewBottomRight = scene()->views().first()->mapFromScene(Granatier::CellSize, Granatier::CellSize);
void addEllipse(const QRectF &boundingRectangle)
int width() const
qreal x() const
qreal y() const
BombExplosionItem(Bomb *p_model, Granatier::Direction::Type direction, int bombPower, KGameRenderer *renderer, qreal svgScaleFactor)
Creates a new BombExplosionItem instance.
Definition: bombexplosionitem.cpp:25
int x() const
int y() const
virtual void updateGraphics(qreal svgScaleFactor)
Updates the graphics after a resize.
Definition: bombexplosionitem.cpp:147
QTransform & translate(qreal dx, qreal dy)
qreal x() const
qreal y() const
qreal m_svgScaleFactor
The scale factor from the svg for the pixmap.
Definition: bombexplosionitem.h:52
Definition: granatierglobals.h:129
QPainterPath shape() const
Overrides the default shape function to make it a small circle This function is used to determinate c...
Definition: bombexplosionitem.cpp:80
This class describes the common characteristics and behaviour of the bomb item.
Definition: bomb.h:30
qreal width() const
virtual void setPosition(qreal p_x, qreal p_y)
Updates the BombExplosionItem coordinates.
Definition: bombexplosionitem.cpp:97
int height() const
Granatier::Direction::Type m_direction
The direction of the blast.
Definition: bombexplosionitem.h:43
Definition: granatierglobals.h:128
qreal height() const
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.