List of all members.
Public Member Functions |
| Qt2DDisplay (QWidget *parent=NULL) |
void | notify (const Move< ChessBoard::Coords > &move) |
| notification of a new move played
|
void | displayPiece (const ChessBoard::Coords &position) |
| create the piece corresponding to the position
|
void | setBoard (const ChessBoard *pBoard) |
void | setRules (const ChessRules *pRules) |
| Set the rules to play with.
|
Q_SLOT void | displayHelper (QPointF pos, int color) |
| Displays helpers Helpers show which moves are available :
- Green is for possible moves
- Blue if for a move eating a piece
- Red is for piece attacking you.
|
Q_SLOT void | stopHelper () |
| Stop to display helpers Removes all helpers.
|
Protected Member Functions |
void | resizeEvent (QResizeEvent *event) |
Constructor & Destructor Documentation
Qt2DDisplay::Qt2DDisplay |
( |
QWidget * |
parent = NULL |
) |
[explicit] |
Member Function Documentation
void Qt2DDisplay::displayHelper |
( |
QPointF |
pos, |
|
|
int |
color | |
|
) |
| | |
Displays helpers Helpers show which moves are available :
- Green is for possible moves
- Blue if for a move eating a piece
- Red is for piece attacking you.
- Parameters:
-
| position | where the click was |
| color | the color of the piece clicked |
void Qt2DDisplay::setBoard |
( |
const ChessBoard * |
pBoard |
) |
|
Defines the board to display Can be changed and the fly.
- Parameters:
-
Reimplemented from Renderer< ChessBoard >.
void Qt2DDisplay::setRules |
( |
const ChessRules * |
pRules |
) |
[inline] |
Set the rules to play with.
- Parameters:
-
The documentation for this class was generated from the following files: