granatier
#include <gameview.h>
Signals | |
void | keyPressed (QKeyEvent *p_event) |
void | keyReleased (QKeyEvent *p_event) |
Public Member Functions | |
GameView (GameScene *p_scene, Game *p_game) | |
~GameView () | |
void | resizeEvent (QResizeEvent *p_event) |
Protected Member Functions | |
void | focusOutEvent (QFocusEvent *p_event) |
void | keyPressEvent (QKeyEvent *p_event) |
void | keyReleaseEvent (QKeyEvent *p_event) |
Detailed Description
This class manages the drawing of each element of the Game instance.
It creates a GameScene instance associated to the given Game instance in order to manage the elements to be drawn at each moment of the game.
Definition at line 32 of file gameview.h.
Constructor & Destructor Documentation
Creates a new GameView instance.
- Parameters
-
p_game the Game instance whose elements have to be drawn
Definition at line 26 of file gameview.cpp.
GameView::~GameView | ( | ) |
Deletes the GameView instance.
Definition at line 38 of file gameview.cpp.
Member Function Documentation
|
protected |
Pauses the game on focus lost.
- Parameters
-
p_event the focus event
Definition at line 48 of file gameview.cpp.
|
signal |
Emitted on key press event for the Game instance.
- Parameters
-
p_event the key press event
|
protected |
Manages the player actions by hanlding the key press events.
- Parameters
-
p_event the key press event
Definition at line 57 of file gameview.cpp.
|
signal |
Emitted on key release event for the Game instance.
- Parameters
-
p_event the key release event
|
protected |
Manages the player actions by hanlding the key release events.
- Parameters
-
p_event the key release event
Definition at line 66 of file gameview.cpp.
void GameView::resizeEvent | ( | QResizeEvent * | p_event | ) |
Resizes the items when the view is resized.
- Parameters
-
p_event the resize event
Definition at line 43 of file gameview.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:43:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.