kmahjongg
BoardWidget Class Reference
#include <boardwidget.h>
List of all members.
Detailed Description
Where all the funn happens.
- See also:
- BoardLayout
- Author:
- Mathias Mueller
Definition at line 50 of file boardwidget.h.
|
Public Slots |
| void | loadSettings () |
| void | saveSettings () |
| void | resizeTileset (const QSize &wsize) |
| void | animatingMoveListForward () |
| void | animatingMoveListBackwards () |
| void | shuffle () |
| void | angleSwitchCW () |
| void | angleSwitchCCW () |
| void | helpMove () |
| void | helpMoveTimeout () |
| void | helpMoveStop () |
| void | demoMoveTimeout () |
| void | matchAnimationTimeout () |
| void | setDisplayedWidth () |
| bool | loadTileset (const QString &) |
| bool | loadBoardLayout (const QString &) |
| bool | loadBoard () |
| void | drawBoard (bool showTiles=true) |
| void | updateSpriteMap () |
| void | populateSpriteMap () |
| bool | loadBackground (const QString &, bool bShowError=true) |
Signals |
| void | statusTextChanged (const QString &, long) |
| void | tileNumberChanged (int iMaximum, int iCurrent, int iLeft) |
| void | demoModeChanged (bool bActive) |
| void | gameCalculated () |
| void | gameOver (unsigned short removed, unsigned short cheats) |
Public Member Functions |
| | BoardWidget (QWidget *parent=0) |
| | ~BoardWidget () |
| void | calculateNewGame (int num=-1) |
| int | undoMove () |
| void | redoMove () |
| void | startDemoMode () |
| void | stopDemoMode () |
| void | pause () |
| void | gameLoaded () |
| void | animateMoveList () |
| void | setShowMatch (bool show) |
| long | getGameNum () |
| QString & | getBoardName () |
| QString | getLayoutName () |
Public Attributes |
| QHash< TileCoord, TileSprite * > | spriteMap |
| TileViewAngle | m_angle |
| GameData * | Game |
| KMahjonggTileset | theTiles |
| KMahjonggBackground | theBackground |
| KMahjonggLayout | theBoardLayout |
Protected Types |
| enum | STATES {
Stop,
Demo,
Help,
Animation,
Match
} |
Protected Member Functions |
| virtual void | resizeEvent (QResizeEvent *event) |
| void | getFileOrDefault (const QString &filename, const QString &type, QString &res) |
| void | mousePressEvent (QMouseEvent *) |
| void | setStatusText (const QString &) |
| void | cancelUserSelectedTiles () |
| void | drawTileNumber () |
| void | hilightTile (POSITION &, bool on=true, bool refresh=true) |
| void | putTileInBoard (POSITION &, bool refresh=true) |
| void | removeTile (POSITION &, bool refresh=true) |
| void | transformPointToPosition (const QPoint &point, POSITION &MouseClickPos) |
| void | stopEndAnimation () |
| void | stopMatchAnimation () |
| int | requiredWidth () |
| int | requiredHeight () |
| int | requiredHorizontalCells () |
| int | requiredVerticalCells () |
Protected Attributes |
| POSITION | MouseClickPos1 |
| POSITION | MouseClickPos2 |
| POSITION | TimerPos1 |
| POSITION | TimerPos2 |
| enum BoardWidget::STATES | TimerState |
| int | iTimerStep |
| short | matchCount |
| bool | showMatch |
| bool | showHelp |
| QTimer * | timer |
| QTimer * | animateForwardTimer |
| QTimer * | animateBackwardsTimer |
| bool | gamePaused |
| unsigned short | cheatsUsed |
| long | gameGenerationNum |
Member Enumeration Documentation
Describe the enum.
- Enumerator:
-
| Stop |
Description. |
| Demo |
Description. |
| Help |
Description. |
| Animation |
Description. |
| Match |
Description. |
Definition at line 300 of file boardwidget.h.
Constructor & Destructor Documentation
| BoardWidget::BoardWidget |
( |
QWidget * |
parent = 0 |
) |
[explicit] |
Class Constructor.
Constructor.
- Parameters:
-
Loads tileset and background bitmaps.
Definition at line 38 of file boardwidget.cpp.
| BoardWidget::~BoardWidget |
( |
|
) |
|
Member Function Documentation
| void BoardWidget::calculateNewGame |
( |
int |
num = -1 |
) |
|
| int BoardWidget::undoMove |
( |
|
) |
|
| void BoardWidget::redoMove |
( |
|
) |
|
| void BoardWidget::startDemoMode |
( |
|
) |
|
| void BoardWidget::stopDemoMode |
( |
|
) |
|
| void BoardWidget::pause |
( |
|
) |
|
| void BoardWidget::gameLoaded |
( |
|
) |
|
| void BoardWidget::animateMoveList |
( |
|
) |
|
| void BoardWidget::setShowMatch |
( |
bool |
show |
) |
|
| long BoardWidget::getGameNum |
( |
|
) |
[inline] |
| QString& BoardWidget::getBoardName |
( |
|
) |
[inline] |
| QString BoardWidget::getLayoutName |
( |
|
) |
|
| void BoardWidget::loadSettings |
( |
|
) |
[slot] |
| void BoardWidget::saveSettings |
( |
|
) |
[slot] |
| void BoardWidget::resizeTileset |
( |
const QSize & |
wsize |
) |
[slot] |
| void BoardWidget::animatingMoveListForward |
( |
|
) |
[slot] |
| void BoardWidget::animatingMoveListBackwards |
( |
|
) |
[slot] |
| void BoardWidget::shuffle |
( |
|
) |
[slot] |
| void BoardWidget::angleSwitchCW |
( |
|
) |
[slot] |
| void BoardWidget::angleSwitchCCW |
( |
|
) |
[slot] |
| void BoardWidget::helpMove |
( |
|
) |
[slot] |
| void BoardWidget::helpMoveTimeout |
( |
|
) |
[slot] |
| void BoardWidget::helpMoveStop |
( |
|
) |
[slot] |
| void BoardWidget::demoMoveTimeout |
( |
|
) |
[slot] |
| void BoardWidget::matchAnimationTimeout |
( |
|
) |
[slot] |
| void BoardWidget::setDisplayedWidth |
( |
|
) |
[slot] |
| bool BoardWidget::loadTileset |
( |
const QString & |
path |
) |
[slot] |
Slot Description.
- Returns:
true if ...
false if ...
Definition at line 990 of file boardwidget.cpp.
| bool BoardWidget::loadBoardLayout |
( |
const QString & |
file |
) |
[slot] |
Slot Description.
- Returns:
true if ...
false if ...
Definition at line 1007 of file boardwidget.cpp.
| bool BoardWidget::loadBoard |
( |
|
) |
[slot] |
Slot Description.
- Returns:
true if ...
false if ...
Definition at line 941 of file boardwidget.cpp.
| void BoardWidget::drawBoard |
( |
bool |
showTiles = true |
) |
[slot] |
| void BoardWidget::updateSpriteMap |
( |
|
) |
[slot] |
| void BoardWidget::populateSpriteMap |
( |
|
) |
[slot] |
| bool BoardWidget::loadBackground |
( |
const QString & |
pszFileName, |
|
|
bool |
bShowError = true | |
|
) |
| | [slot] |
Slot Description.
- Returns:
true if ...
false if ...
Definition at line 955 of file boardwidget.cpp.
| void BoardWidget::statusTextChanged |
( |
const QString & |
, |
|
|
long |
| |
|
) |
| | [signal] |
| void BoardWidget::tileNumberChanged |
( |
int |
iMaximum, |
|
|
int |
iCurrent, |
|
|
int |
iLeft | |
|
) |
| | [signal] |
| void BoardWidget::demoModeChanged |
( |
bool |
bActive |
) |
[signal] |
Signal Description.
- Parameters:
-
| void BoardWidget::gameCalculated |
( |
|
) |
[signal] |
| void BoardWidget::gameOver |
( |
unsigned short |
removed, |
|
|
unsigned short |
cheats | |
|
) |
| | [signal] |
| void BoardWidget::resizeEvent |
( |
QResizeEvent * |
event |
) |
[protected, virtual] |
| void BoardWidget::getFileOrDefault |
( |
const QString & |
filename, |
|
|
const QString & |
type, |
|
|
QString & |
res | |
|
) |
| | [protected] |
| void BoardWidget::mousePressEvent |
( |
QMouseEvent * |
event |
) |
[protected] |
| void BoardWidget::setStatusText |
( |
const QString & |
pszText |
) |
[protected] |
| void BoardWidget::cancelUserSelectedTiles |
( |
|
) |
[protected] |
| void BoardWidget::drawTileNumber |
( |
|
) |
[protected] |
| void BoardWidget::hilightTile |
( |
POSITION & |
Pos, |
|
|
bool |
on = true, |
|
|
bool |
refresh = true | |
|
) |
| | [protected] |
| void BoardWidget::putTileInBoard |
( |
POSITION & |
Pos, |
|
|
bool |
refresh = true | |
|
) |
| | [protected] |
| void BoardWidget::removeTile |
( |
POSITION & |
Pos, |
|
|
bool |
refresh = true | |
|
) |
| | [protected] |
| void BoardWidget::transformPointToPosition |
( |
const QPoint & |
point, |
|
|
POSITION & |
MouseClickPos | |
|
) |
| | [protected] |
Transform window point to board position.
- Parameters:
-
| point | Input: Point in window coordinates |
| MouseClickPos | Output: Position in game board |
Definition at line 879 of file boardwidget.cpp.
| void BoardWidget::stopEndAnimation |
( |
|
) |
[protected] |
| void BoardWidget::stopMatchAnimation |
( |
|
) |
[protected] |
| int BoardWidget::requiredWidth |
( |
|
) |
[protected] |
| int BoardWidget::requiredHeight |
( |
|
) |
[protected] |
| int BoardWidget::requiredHorizontalCells |
( |
|
) |
[protected] |
| int BoardWidget::requiredVerticalCells |
( |
|
) |
[protected] |
Member Data Documentation
seed for the random number generator used for this game
Definition at line 321 of file boardwidget.h.
Member Description.
- See also:
- KMahjonggTileset
Definition at line 325 of file boardwidget.h.
Member Description.
- See also:
- KMahjonggBackground
Definition at line 326 of file boardwidget.h.
The documentation for this class was generated from the following files: