#include <display_two.h>
Inheritance diagram for DisplayTwo:


Public Slots | |
| void | convertMousePress (QPoint mouse, int &playerNumber, int &cardNumber) |
| Convert the position of a mouse click to a logical game position, that is position (up/down) and a card number (0-7). | |
| void | updatePlayer (Player *player) |
| Connect a player with the score widget by setting the player properties to the score board. | |
Public Member Functions | |
| DisplayTwo (Deck *deck, QGraphicsScene *scene, ThemeManager *theme, int advancePeriod, QGraphicsView *parent) | |
| Constructor for the engine. | |
| void | start () |
| Start the display. | |
| virtual void | changeTheme () |
| Main theme function. | |
| void | deal (Player *player, int position) |
| void | play (int cardNumber, int playerNumber, int phase) |
| Play a card on the display. | |
| void | turn (int cardNumber) |
| Turn a card on the display. | |
| void | remove (int winnerPosition, int cardNumber, int delta) |
| Remove the given card from the display. | |
| int | shuffleTime () |
| Returns the time in milliseconds used for shuffling the initial cards. | |
| void | showScore (int position, int score) |
| Display the score on the game board. | |
| void | showText (QString text) |
| Display a text on the game board. | |
| void | showMove (int no=-1) |
| Show the move icon for the given player. | |
Protected Member Functions | |
| void | calcXYFromNumber (int cardNumber, int &x, int &y) |
| Calculate the x,y position values from a card number. | |
| CardSprite * | getCardSprite (int cardValue) |
| Get a card sprite for a card value. | |
Definition at line 45 of file display_two.h.
|
||||||||||||||||||||||||
|
Constructor for the engine.
Definition at line 47 of file display_two.cpp. References AbstractDisplay::mAdvancePeriod, AbstractDisplay::mSprites, AbstractDisplay::mTheme, AbstractDisplay::scene(), and ThemeManager::updateTheme(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Calculate the x,y position values from a card number.
Definition at line 281 of file display_two.cpp. |
|
|
Main theme function. Called by the theme manager. Redraw and resize display. Implements Themable. Definition at line 107 of file display_two.cpp. References ThemeManager::config(), ThemeManager::getPixmap(), AbstractDisplay::mView, AbstractDisplay::scene(), and Themable::thememanager(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Convert the position of a mouse click to a logical game position, that is position (up/down) and a card number (0-7).
Implements AbstractDisplay. Definition at line 230 of file display_two.cpp. References ThemeManager::config(), ThemeManager::getScale(), and Themable::thememanager(). |
|
||||||||||||
|
Definition at line 159 of file display_two.cpp. References ThemeManager::config(), Player::getCard(), AbstractDisplay::mCards, CardSprite::setPosition(), CardSprite::setShuffleMove(), Themable::thememanager(), and TIME_DELAY_SHUFFLE. Referenced by EngineTwo::startGame(). Here is the call graph for this function: ![]() |
|
|
Get a card sprite for a card value.
Definition at line 289 of file display_two.cpp. References AbstractDisplay::mCards. |
|
||||||||||||||||
|
Play a card on the display. The card is moved from its current position to the card deposit.
Implements AbstractDisplay. Definition at line 304 of file display_two.cpp. References ThemeManager::config(), getCardSprite(), CardSprite::setMove(), and Themable::thememanager(). Referenced by EngineTwo::playerInput(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Remove the given card from the display.
Implements AbstractDisplay. Definition at line 335 of file display_two.cpp. References ThemeManager::config(), getCardSprite(), CardSprite::setRemove(), and Themable::thememanager(). Referenced by EngineTwo::gameLoopFinish(). Here is the call graph for this function: ![]() |
|
|
Show the move icon for the given player.
Definition at line 381 of file display_two.cpp. Referenced by EngineTwo::gameLoopFinish(). |
|
||||||||||||
|
Display the score on the game board.
Definition at line 369 of file display_two.cpp. References TextSprite::setText(). Referenced by EngineTwo::evaluateGame(). Here is the call graph for this function: ![]() |
|
|
Display a text on the game board.
Definition at line 361 of file display_two.cpp. References TextSprite::setText(). Referenced by EngineTwo::evaluateGame(). Here is the call graph for this function: ![]() |
|
|
Returns the time in milliseconds used for shuffling the initial cards.
Definition at line 223 of file display_two.cpp. References TIME_DELAY_AFTER_SHUFFLE, and TIME_DELAY_SHUFFLE. |
|
|
Start the display.
Implements AbstractDisplay. Definition at line 121 of file display_two.cpp. References AbstractDisplay::mCards. |
|
|
Turn a card on the display. The card is flipped backside to frontside.
Implements AbstractDisplay. Definition at line 327 of file display_two.cpp. References getCardSprite(), and CardSprite::setTurning(). Referenced by EngineTwo::playerInput(). Here is the call graph for this function: ![]() |
|
|
Connect a player with the score widget by setting the player properties to the score board.
Definition at line 146 of file display_two.cpp. References Player::games(), Player::id(), Player::input(), Player::name(), Player::points(), Player::score(), ScoreSprite::setGames(), ScoreSprite::setInput(), ScoreSprite::setPlayerName(), ScoreSprite::setPoints(), ScoreSprite::setScore(), ScoreSprite::setTrump(), Player::trump(), AbstractInput::type(), and Player::wonGames(). |
1.4.6