#include <displaygame.h>
Inheritance diagram for DisplayGame:


Public Member Functions | |
| DisplayGame (int advancePeriod, QGraphicsScene *scene, ThemeManager *theme, QGraphicsView *parent=0) | |
| Constructor for the game display. | |
| ~DisplayGame () | |
| Destructor. | |
| void | start () |
| Start the display (setup and initialzation). | |
| virtual void | changeTheme () |
| Main theme function. | |
| SpriteNotify * | displayPiece (int x, int y, int color, int no, bool animation) |
| Set a game piece to a certain position on the game board. | |
| void | displayArrow (int x, int color) |
| Sets the movement indicator arrow to the given position. | |
| void | displayHint (int x, int y, bool show) |
| Sets the hint indicator on the game board. | |
| void | displayStar (int x, int y, int no) |
| Sets on of the winning move indicator sprites on the game board. | |
| int | mapMouseToMove (QPoint pos) |
| Transform the mouse coordinates to a game board movement coordinate. | |
| void | displayEnd () |
| Shows the game over sprite. | |
| ScoreSprite * | score () |
| Retrieve the score status sprite. | |
Protected Slots | |
| void | advance () |
| Run the main game animation (if existent). | |
Definition at line 44 of file displaygame.h.
|
||||||||||||||||||||
|
Constructor for the game display.
Definition at line 47 of file displaygame.cpp. |
|
|
Destructor.
Definition at line 138 of file displaygame.cpp. |
|
|
Run the main game animation (if existent). This is done via a periodic timer. Definition at line 221 of file displaygame.cpp. |
|
|
Main theme function. Called by the theme manager. Redraw and resize display. Implements Themable. Definition at line 150 of file displaygame.cpp. References ThemeManager::config(), ThemeManager::getPixmap(), and Themable::thememanager(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Sets the movement indicator arrow to the given position.
Definition at line 236 of file displaygame.cpp. Referenced by KWin4View::displayMove(). |
|
|
Shows the game over sprite.
Definition at line 228 of file displaygame.cpp. Referenced by KWin4View::endGame(). |
|
||||||||||||||||
|
Sets the hint indicator on the game board. This is a little symbol to suggest where the next move is recommended to go.
Definition at line 257 of file displaygame.cpp. References ThemeManager::config(), PixmapSprite::setPosition(), and Themable::thememanager(). Referenced by KWin4View::displayHint(), and KWin4View::displayMove(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||
|
Set a game piece to a certain position on the game board. If an animation is requested the piece 'falls' to this position.
Definition at line 282 of file displaygame.cpp. References ThemeManager::config(), Nobody, PieceSprite::notify(), PixmapSprite::setFrame(), PixmapSprite::setPosition(), PieceSprite::startLinear(), Themable::thememanager(), and Yellow. Referenced by KWin4View::displayMove(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Sets on of the winning move indicator sprites on the game board. They should be set on top of the winning pieces to show them.
Definition at line 362 of file displaygame.cpp. References ThemeManager::config(), PixmapSprite::setAnimation(), PixmapSprite::setPosition(), and Themable::thememanager(). Referenced by KWin4View::displayStar(). Here is the call graph for this function: ![]() |
|
|
Transform the mouse coordinates to a game board movement coordinate. That is a coordinate [0-6] corresponding to a move on the board.
Definition at line 335 of file displaygame.cpp. |
|
|
Retrieve the score status sprite.
Definition at line 384 of file displaygame.cpp. Referenced by KWin4View::initGame(). |
|
|
Start the display (setup and initialzation).
Definition at line 165 of file displaygame.cpp. References ThemeManager::config(), and Themable::thememanager(). Referenced by KWin4View::initGame(). Here is the call graph for this function: ![]() |
1.4.6