• 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
characteritem.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 CHARACTERITEM_H
20 #define CHARACTERITEM_H
21 
22 #include "elementitem.h"
23 
24 class Character;
25 class KGameRenderer;
26 
30 class CharacterItem : public ElementItem {
31 
32 Q_OBJECT
33 
34 protected:
36  KGameRenderer* m_renderer;
37 
38 public:
39 
45  CharacterItem(Character* p_model, KGameRenderer* renderer);
46 
50  ~CharacterItem();
51 
57  QPainterPath shape() const;
58 
59 public slots:
60 
66  virtual void update(qreal p_x, qreal p_y);
67 
71  virtual void setDead();
72 };
73 
74 #endif
75 
CharacterItem::update
virtual void update(qreal p_x, qreal p_y)
Updates the CharacterItem coordinates.
Definition: characteritem.cpp:46
CharacterItem::setDead
virtual void setDead()
Sets the character dead.
Definition: characteritem.cpp:55
Character
This class describes the common characteristics and behaviour of the game characters (Players)...
Definition: character.h:31
CharacterItem::shape
QPainterPath shape() const
Overrides the default shape function to make it a small circle This function is used to determinate c...
Definition: characteritem.cpp:34
CharacterItem
This class is the graphical representation of a Character.
Definition: characteritem.h:30
ElementItem
This class is the graphical representation of a game Element.
Definition: elementitem.h:30
CharacterItem::~CharacterItem
~CharacterItem()
Deletes the CharacterItem instance.
Definition: characteritem.cpp:30
CharacterItem::m_renderer
KGameRenderer * m_renderer
Shared renderer for the player frames.
Definition: characteritem.h:36
QPainterPath
CharacterItem::CharacterItem
CharacterItem(Character *p_model, KGameRenderer *renderer)
Creates a new CharacterItem instance.
Definition: characteritem.cpp:24
elementitem.h
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