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

kapman

  • sources
  • kde-4.14
  • kdegames
  • kapman
characteritem.h
Go to the documentation of this file.
1 /*
2  * Copyright 2007-2008 Thomas Gallinari <tg8187@yahoo.fr>
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of
7  * the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CHARACTERITEM_H
19 #define CHARACTERITEM_H
20 
21 #include "elementitem.h"
22 #include "character.h"
23 
24 #include <QTimer>
25 
29 class CharacterItem : public ElementItem {
30 
31  Q_OBJECT
32 
33  protected:
34 
36  QTimer* m_blinkTimer;
37 
39  int m_nbBlinks;
40 
41  public:
42 
47  CharacterItem(Character* p_model);
48 
52  ~CharacterItem();
53 
59  QPainterPath shape() const;
60 
61  public slots:
62 
68  virtual void update(qreal p_x, qreal p_y);
69 
73  virtual void startBlinking();
74 
78  virtual void blink();
79 };
80 
81 #endif
82 
character.h
CharacterItem::update
virtual void update(qreal p_x, qreal p_y)
Updates the CharacterItem coordinates.
Definition: characteritem.cpp:40
Character
This class describes the common characteristics and behaviour of the game characters (Kapman and the ...
Definition: character.h:27
CharacterItem::startBlinking
virtual void startBlinking()
Starts the character blinking.
Definition: characteritem.cpp:48
CharacterItem::m_blinkTimer
QTimer * m_blinkTimer
Timer used to make the character blink.
Definition: characteritem.h:36
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:28
CharacterItem
This class is the graphical representation of a Character.
Definition: characteritem.h:29
QTimer
CharacterItem::CharacterItem
CharacterItem(Character *p_model)
Creates a new CharacterItem instance.
Definition: characteritem.cpp:20
ElementItem
This class is the graphical representation of a game Element.
Definition: elementitem.h:28
CharacterItem::~CharacterItem
~CharacterItem()
Deletes the CharacterItem instance.
Definition: characteritem.cpp:24
CharacterItem::blink
virtual void blink()
Makes the character blink.
Definition: characteritem.cpp:53
QPainterPath
elementitem.h
CharacterItem::m_nbBlinks
int m_nbBlinks
Number of ticks of the blink timer.
Definition: characteritem.h:39
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

KDE's Doxygen guidelines are available online.

kapman

Skip menu "kapman"
  • Main Page
  • 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