#include <abstractdisplay.h>
Inheritance diagram for AbstractDisplay:


Public Slots | |
| virtual void | convertMousePress (QPoint mouse, int &playerNumber, int &cardNumber)=0 |
| Convert the mouse position to a card number for one of the players. | |
| virtual void | createCardSprites () |
| Load all card sprites. | |
Public Member Functions | |
| AbstractDisplay (Deck *deck, QGraphicsScene *scene, ThemeManager *theme, int advancePeriod, QGraphicsView *parent) | |
| Constructor for the engine. | |
| virtual | ~AbstractDisplay () |
| Destructor. | |
| void | setDeck (Deck *deck) |
| Set a new deck object. | |
| virtual void | reset () |
| Reset the display. | |
| virtual void | start ()=0 |
| Start the display. | |
| virtual void | play (int cardNumber, int playerNumber, int phase)=0 |
| Play a card on the display. | |
| virtual void | turn (int cardNumber)=0 |
| Turn a card on the display. | |
| virtual void | remove (int winnerPosition, int cardNumber, int delta)=0 |
| Remove the given card from the display. | |
| QGraphicsScene * | scene () |
| Retrieve the graphics scene of this display. | |
Protected Attributes | |
| Deck * | mDeck |
| The card deck. | |
| QGraphicsScene * | mScene |
| The work canvas. | |
| QGraphicsView * | mView |
| int | mAdvancePeriod |
| Canvas advance period [ms]. | |
| QList< QGraphicsItem * > | mSprites |
| Text sprite list. | |
| ThemeManager * | mTheme |
| Theme manager. | |
Static Protected Attributes | |
| static QHash< int, CardSprite * > | mCards |
| Store the card sprite indexed by the card value. | |
Definition at line 47 of file abstractdisplay.h.
|
||||||||||||||||||||||||
|
Constructor for the engine.
Definition at line 38 of file abstractdisplay.cpp. References createCardSprites(), mAdvancePeriod, mScene, mSprites, mTheme, mView, and setDeck(). Here is the call graph for this function: ![]() |
|
|
Destructor.
Definition at line 61 of file abstractdisplay.cpp. References mSprites. |
|
||||||||||||||||
|
Convert the mouse position to a card number for one of the players.
Implemented in DisplayIntro, and DisplayTwo. |
|
|
Load all card sprites.
Definition at line 88 of file abstractdisplay.cpp. References Deck::cardNumber(), mAdvancePeriod, mCards, mDeck, mScene, mTheme, and CardSprite::setBackside(). Referenced by AbstractDisplay(). |
|
||||||||||||||||
|
Play a card on the display. The card is moved from its current position to the card deposit.
Implemented in DisplayIntro, and DisplayTwo. |
|
||||||||||||||||
|
Remove the given card from the display.
Implemented in DisplayIntro, and DisplayTwo. |
|
|
Reset the display. Clear all sprites etc. Definition at line 81 of file abstractdisplay.cpp. References mCards. |
|
|
Retrieve the graphics scene of this display.
Definition at line 102 of file abstractdisplay.h. References mScene. Referenced by DisplayTwo::changeTheme(), DisplayIntro::changeTheme(), DisplayIntro::DisplayIntro(), DisplayTwo::DisplayTwo(), and DisplayIntro::start(). |
|
|
Set a new deck object.
Definition at line 74 of file abstractdisplay.cpp. References mDeck. Referenced by AbstractDisplay(). |
|
|
Start the display.
Implemented in DisplayIntro, and DisplayTwo. Referenced by Mainwindow::Mainwindow(). |
|
|
Turn a card on the display. The card is flipped backside to frontside.
Implemented in DisplayIntro, and DisplayTwo. |
|
|
Canvas advance period [ms].
Definition at line 126 of file abstractdisplay.h. Referenced by AbstractDisplay(), createCardSprites(), and DisplayTwo::DisplayTwo(). |
|
|
Store the card sprite indexed by the card value.
Definition at line 130 of file abstractdisplay.h. Referenced by createCardSprites(), DisplayTwo::deal(), DisplayTwo::getCardSprite(), DisplayIntro::loop(), reset(), DisplayTwo::start(), and DisplayIntro::start(). |
|
|
The card deck.
Definition at line 120 of file abstractdisplay.h. Referenced by createCardSprites(), and setDeck(). |
|
|
The work canvas.
Definition at line 122 of file abstractdisplay.h. Referenced by AbstractDisplay(), createCardSprites(), and scene(). |
|
|
Text sprite list.
Definition at line 128 of file abstractdisplay.h. Referenced by AbstractDisplay(), DisplayTwo::DisplayTwo(), DisplayIntro::start(), and ~AbstractDisplay(). |
|
|
Theme manager.
Definition at line 132 of file abstractdisplay.h. Referenced by AbstractDisplay(), createCardSprites(), DisplayTwo::DisplayTwo(), and DisplayIntro::start(). |
|
|
Definition at line 124 of file abstractdisplay.h. Referenced by AbstractDisplay(), DisplayTwo::changeTheme(), and DisplayIntro::changeTheme(). |
1.4.6