#include <kwin4view.h>
Inheritance diagram for KWin4View:


Public Slots | |
| void | updateAndAdvance () |
| The update and advance for the canvas. | |
| void | mouseInput (KGameIO *input, QDataStream &stream, QMouseEvent *mouse, bool *eatevent) |
| Handle mouse inputs for the KGame framework. | |
| void | keyInput (KGameIO *input, QDataStream &stream, QKeyEvent *key, bool *eatevent) |
| Handle key inputs for the KGame framework. | |
| void | moveDone (QGraphicsItem *item, int mode) |
| Animation of a sprite is finised. | |
Signals | |
| void | signalMoveDone (int mode) |
| Emit this signal if a sprite animation move is finished. | |
Public Member Functions | |
| KWin4View (QSize size, int advancePeriod, QGraphicsScene *scene, ThemeManager *theme, QWidget *parent=0) | |
| Constructor for the canvas view. | |
| ~KWin4View () | |
| Desstructor. | |
| void | initGame (Score *scoreData) |
| Initial setup of the game view. | |
| void | endGame () |
| Finalize (end) game. | |
| void | displayMove (int x, int y, int color, int xarrow, int colorarrow, int no, bool animation) |
| Displays a move on the game board. | |
| void | displayStar (int x, int y, int no) |
| Displays a star on the game board to indicate victorious pieces. | |
| void | displayHint (int x, int y) |
| Displays a hint on the game board to indicate a good move. | |
Protected Member Functions | |
| void | resizeEvent (QResizeEvent *e) |
| Will be called when the widgets contents are resized. | |
Definition at line 72 of file kwin4view.h.
|
||||||||||||||||||||||||
|
Constructor for the canvas view.
Definition at line 54 of file kwin4view.cpp. References ThemeManager::rescale(), DisplayIntro::start(), and updateAndAdvance(). Here is the call graph for this function: ![]() |
|
|
Desstructor.
Definition at line 99 of file kwin4view.cpp. |
|
||||||||||||
|
Displays a hint on the game board to indicate a good move.
Definition at line 252 of file kwin4view.cpp. References DisplayGame::displayHint(). Referenced by KWin4Doc::processAIHintCommand(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||||||||||
|
Displays a move on the game board. This means a piece of the given number is moved to the given position, the move indicator arrow is switched on and any hints are disabed. The move can be performed animated or not.
Definition at line 229 of file kwin4view.cpp. References DisplayGame::displayArrow(), DisplayGame::displayHint(), DisplayGame::displayPiece(), and moveDone(). Referenced by KWin4Doc::makeMove(), and KWin4Doc::undoMove(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Displays a star on the game board to indicate victorious pieces.
Definition at line 246 of file kwin4view.cpp. References DisplayGame::displayStar(). Here is the call graph for this function: ![]() |
|
|
Finalize (end) game.
Definition at line 134 of file kwin4view.cpp. References DisplayGame::displayEnd(). Referenced by KWin4Doc::endGame(). Here is the call graph for this function: ![]() |
|
|
Initial setup of the game view.
Definition at line 116 of file kwin4view.cpp. References DisplayGame::score(), Score::setDisplay(), and DisplayGame::start(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
Handle key inputs for the KGame framework.
Definition at line 197 of file kwin4view.cpp. |
|
||||||||||||||||||||
|
Handle mouse inputs for the KGame framework.
Definition at line 164 of file kwin4view.cpp. |
|
||||||||||||
|
Animation of a sprite is finised.
Definition at line 258 of file kwin4view.cpp. References signalMoveDone(). Referenced by displayMove(). |
|
|
Will be called when the widgets contents are resized. Resized and rescale game.
Definition at line 142 of file kwin4view.cpp. References ThemeManager::rescale(), and VIEW_ASPECT_RATIO. Here is the call graph for this function: ![]() |
|
|
Emit this signal if a sprite animation move is finished.
Referenced by moveDone(). |
|
|
The update and advance for the canvas. This is called by a timer at regular intervals. Definition at line 107 of file kwin4view.cpp. Referenced by KWin4View(). |
1.4.6