• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

granatier

  • sources
  • kde-4.14
  • kdegames
  • granatier
  • src
bombexplosionitem.h
Go to the documentation of this file.
1 /*
2  * Copyright 2009 Mathias Kraus <k.hias@gmx.de>
3  * Copyright 2007-2008 Thomas Gallinari <tg8187@yahoo.fr>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of
8  * the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef BOMBEXPLOSIONITEM_H
20 #define BOMBEXPLOSIONITEM_H
21 
22 #include "granatierglobals.h"
23 
24 #include <KGameRenderedItem>
25 
26 class Bomb;
27 class BombItem;
28 class KGameRenderer;
29 
33 class BombExplosionItem : public QObject, public KGameRenderedItem
34 {
35 
36 Q_OBJECT
37 
38 public:
39 
40 protected:
41 
43  Granatier::Direction::Type m_direction;
44 
46  int m_bombPower;
47 
49  int m_explosionID;
50 
52  qreal m_svgScaleFactor;
53 
54  QSize m_itemSizeSet;
55  QSize m_itemSizeReal;
56 
57 public:
58 
67  BombExplosionItem(Bomb* p_model, Granatier::Direction::Type direction, int bombPower, KGameRenderer* renderer, qreal svgScaleFactor);
68 
72  ~BombExplosionItem();
73 
79  QPainterPath shape() const;
80 
84  int explosionID();
85 
91  virtual void setPosition(qreal p_x, qreal p_y);
92 
97  void updateAnimationn(int nFrame);
98 
99 public slots:
100 
105  virtual void updateGraphics(qreal svgScaleFactor);
106 };
107 
108 #endif
109 
BombExplosionItem::~BombExplosionItem
~BombExplosionItem()
Deletes the BombExplosionItem instance.
Definition: bombexplosionitem.cpp:76
BombExplosionItem::m_bombPower
int m_bombPower
The bomb power.
Definition: bombexplosionitem.h:46
BombItem
This class is the graphical representation of a Bomb.
Definition: bombitem.h:31
Granatier::Direction::Type
Type
Definition: granatierglobals.h:124
BombExplosionItem::BombExplosionItem
BombExplosionItem(Bomb *p_model, Granatier::Direction::Type direction, int bombPower, KGameRenderer *renderer, qreal svgScaleFactor)
Creates a new BombExplosionItem instance.
Definition: bombexplosionitem.cpp:25
BombExplosionItem::updateGraphics
virtual void updateGraphics(qreal svgScaleFactor)
Updates the graphics after a resize.
Definition: bombexplosionitem.cpp:147
BombExplosionItem::m_svgScaleFactor
qreal m_svgScaleFactor
The scale factor from the svg for the pixmap.
Definition: bombexplosionitem.h:52
BombExplosionItem
This class is the graphical representation of a Bomb explosion.
Definition: bombexplosionitem.h:33
QObject
BombExplosionItem::shape
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
Bomb
This class describes the common characteristics and behaviour of the bomb item.
Definition: bomb.h:30
granatierglobals.h
BombExplosionItem::m_itemSizeSet
QSize m_itemSizeSet
Definition: bombexplosionitem.h:54
QSize
BombExplosionItem::m_explosionID
int m_explosionID
The ID of the Bomb that causes the explosion.
Definition: bombexplosionitem.h:49
QPainterPath
BombExplosionItem::setPosition
virtual void setPosition(qreal p_x, qreal p_y)
Updates the BombExplosionItem coordinates.
Definition: bombexplosionitem.cpp:97
BombExplosionItem::m_direction
Granatier::Direction::Type m_direction
The direction of the blast.
Definition: bombexplosionitem.h:43
KGameRenderedItem
BombExplosionItem::explosionID
int explosionID()
Definition: bombexplosionitem.cpp:92
BombExplosionItem::updateAnimationn
void updateAnimationn(int nFrame)
updates the animation
Definition: bombexplosionitem.cpp:127
BombExplosionItem::m_itemSizeReal
QSize m_itemSizeReal
Definition: bombexplosionitem.h:55
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

KDE's Doxygen guidelines are available online.

granatier

Skip menu "granatier"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal