• 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
kapmanitem.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 KAPMANITEM_H
19 #define KAPMANITEM_H
20 
21 #include "characteritem.h"
22 #include "kapman.h"
23 
24 #include <QTimeLine>
25 
29 class KapmanItem : public CharacterItem {
30 
31  Q_OBJECT
32 
33  private:
34 
36  static const int NB_FRAMES;
37 
39  static const int ANIM_LOW_SPEED;
40  static const int ANIM_MEDIUM_SPEED;
41  static const int ANIM_HIGH_SPEED;
42 
44  QTimeLine * m_animationTimer;
45 
47  bool m_rotationFlag;
48 
49  public:
50 
55  KapmanItem(Kapman* p_model);
56 
60  ~KapmanItem();
61 
62  public slots:
63 
67  void updateDirection();
68 
72  void manageCollision();
73 
79  void update(qreal p_x, qreal p_y);
80 
84  void startAnim();
85 
89  void pauseAnim();
90 
94  void resumeAnim();
95 
99  void stopAnim();
100 
105  void setFrame(const int p_frame);
106 
110  void startBlinking();
111 
115  void blink();
116 
121  void setRotationFlag(bool rotate) { m_rotationFlag=rotate; }
122 
123 };
124 
125 #endif
126 
KapmanItem
This class manage the display of the Kapman.
Definition: kapmanitem.h:29
KapmanItem::pauseAnim
void pauseAnim()
Pauses the KapmanItem animation.
Definition: kapmanitem.cpp:129
KapmanItem::~KapmanItem
~KapmanItem()
Deletes the KapmanItem instance.
Definition: kapmanitem.cpp:64
KapmanItem::stopAnim
void stopAnim()
Stops the KapmanItem animation.
Definition: kapmanitem.cpp:139
KapmanItem::update
void update(qreal p_x, qreal p_y)
Updates the KapmanItem coordinates.
Definition: kapmanitem.cpp:113
CharacterItem
This class is the graphical representation of a Character.
Definition: characteritem.h:29
KapmanItem::setRotationFlag
void setRotationFlag(bool rotate)
Set if the KapmanItem should be rotated (set by theme flag RotateKapman).
Definition: kapmanitem.h:121
KapmanItem::startAnim
void startAnim()
Starts the KapmanItem animation.
Definition: kapmanitem.cpp:122
characteritem.h
KapmanItem::startBlinking
void startBlinking()
Implements the CharacterItem method.
Definition: kapmanitem.cpp:149
kapman.h
KapmanItem::KapmanItem
KapmanItem(Kapman *p_model)
Creates a new KapmanItem instance.
Definition: kapmanitem.cpp:33
KapmanItem::resumeAnim
void resumeAnim()
Resumes the KapmanItem animation.
Definition: kapmanitem.cpp:134
KapmanItem::setFrame
void setFrame(const int p_frame)
Sets the given frame to the KapmanItem.
Definition: kapmanitem.cpp:145
KapmanItem::updateDirection
void updateDirection()
Rotates the image function of the Kapman direction.
Definition: kapmanitem.cpp:68
KapmanItem::blink
void blink()
Implements the CharacterItem method.
Definition: kapmanitem.cpp:155
QTimeLine
KapmanItem::manageCollision
void manageCollision()
Manages the collisions with any Element.
Definition: kapmanitem.cpp:95
Kapman
This class represents the main character of the game.
Definition: kapman.h:26
QGraphicsItem::rotate
void rotate(qreal angle)
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