#include <cardsprite.h>
Inheritance diagram for CardSprite:
Public Types | |
| enum | AnimationState { Idle, Turning, Moving, Removing, ShuffleMove } |
| Possible animation states of the sprite. More... | |
Public Member Functions | |
| CardSprite (const Suite suite, const CardType type, ThemeManager *theme, int advancePeriod, QGraphicsScene *scene) | |
| Constructor for the sprite. | |
| virtual void | changeTheme () |
| Main theme manager function. | |
| void | setFrontside () |
| Display the card front pixmap image. | |
| void | setBackside () |
| Display the card back pixmap image. | |
| virtual void | advance (int phase) |
| Standard advance method. | |
| void | stop () |
| Stop all movment and animation. | |
| void | setTurning (bool front) |
| Turn the card to frontside or backside. | |
| void | setMove (QPointF pos, double time) |
| Move the sprite slowly to the target area. | |
| void | setPosition (QPointF pos) |
| Set the position of the sprite. | |
| void | setRemove (QPointF pos, double time) |
| Move the sprite slowly to the target area. | |
| void | setShuffleMove (QPointF pos, double delay, bool front) |
| Delay before moving, then move the sprite fast to the target area. | |
| void | setFrame (int no, bool force=false) |
| Set the current frame. | |
| int | count () |
| Retrieve the maximum frame number. | |
| int | cardid () |
| Retreive the card id, a combination of suite and card type. | |
| int | frame () |
| Retrieve the current frame number. | |
Protected Member Functions | |
| void | calcFrame (int no) |
| Calculate a sprite frame (for turning sprites). | |
| QPixmap | createCard (const QPixmap front, const QPixmap back, int curNo, int count) |
| Create the pixmap for one frame of the frame turning animation. | |
| void | calcTargetAndSpeed (QPointF pos, double time) |
| Set target position and calculate moving speed. | |
| bool | deltaMove () |
| Perform a move by a delta given by the sprites velocity. | |
Definition at line 38 of file cardsprite.h.
|
|
Possible animation states of the sprite.
Definition at line 52 of file cardsprite.h. |
|
||||||||||||||||||||||||
|
Constructor for the sprite.
Definition at line 45 of file cardsprite.cpp. References Idle. |
|
|
Standard advance method.
Definition at line 281 of file cardsprite.cpp. References ANIM_CNT_TURNING, deltaMove(), frame(), Idle, Moving, Removing, setFrame(), setTurning(), ShuffleMove, and Turning. Here is the call graph for this function: |
|
|
Calculate a sprite frame (for turning sprites). Called when the frame is asked for.
Definition at line 223 of file cardsprite.cpp. References ThemeManager::getCard(), ThemeManager::getCardback(), and Themable::thememanager(). Referenced by setFrame(). Here is the call graph for this function: |
|
||||||||||||
|
Set target position and calculate moving speed.
Definition at line 120 of file cardsprite.cpp. References Themable::getScale(). Referenced by setMove(), setRemove(), and setShuffleMove(). Here is the call graph for this function: |
|
|
Retreive the card id, a combination of suite and card type.
Definition at line 125 of file cardsprite.h. |
|
|
Main theme manager function. Called when any theme change like a new theme or a theme size change occurs. This object needs to resiez and redraw then. Implements Themable. Definition at line 61 of file cardsprite.cpp. References ThemeManager::config(), ThemeManager::getScale(), Themable::getScale(), Themable::setScale(), and Themable::thememanager(). Here is the call graph for this function: |
|
|
Retrieve the maximum frame number.
Definition at line 192 of file cardsprite.cpp. |
|
||||||||||||||||||||
|
Create the pixmap for one frame of the frame turning animation.
Definition at line 359 of file cardsprite.cpp. |
|
|
Perform a move by a delta given by the sprites velocity.
Definition at line 258 of file cardsprite.cpp. References Themable::getScale(), and setPosition(). Referenced by advance(). Here is the call graph for this function: |
|
|
Retrieve the current frame number.
Definition at line 130 of file cardsprite.h. Referenced by advance(). |
|
|
Display the card back pixmap image.
Definition at line 185 of file cardsprite.cpp. References setFrame(). Referenced by AbstractDisplay::createCardSprites(), DisplayIntro::loop(), and stop(). Here is the call graph for this function: |
|
||||||||||||
|
Set the current frame.
Definition at line 200 of file cardsprite.cpp. References calcFrame(). Referenced by advance(), setBackside(), and setFrontside(). Here is the call graph for this function: |
|
|
Display the card front pixmap image.
Definition at line 177 of file cardsprite.cpp. References setFrame(). Here is the call graph for this function: |
|
||||||||||||
|
Move the sprite slowly to the target area. Stop movement if it arrived there.
Definition at line 147 of file cardsprite.cpp. References calcTargetAndSpeed(), and Moving. Referenced by DisplayTwo::play(). Here is the call graph for this function: |
|
|
Set the position of the sprite.
Definition at line 138 of file cardsprite.cpp. References Themable::getScale(). Referenced by DisplayTwo::deal(), deltaMove(), and DisplayIntro::loop(). Here is the call graph for this function: |
|
||||||||||||
|
Move the sprite slowly to the target area. Stop movement and hide sprite if it arrived there.
Definition at line 157 of file cardsprite.cpp. References calcTargetAndSpeed(), and Removing. Referenced by DisplayTwo::remove(). Here is the call graph for this function: |
|
||||||||||||||||
|
Delay before moving, then move the sprite fast to the target area. Stop movement and depending on the last argument turn backside/frontside sprite if it arrived there.
Definition at line 167 of file cardsprite.cpp. References calcTargetAndSpeed(), ShuffleMove, and SHUFFLEMOVE_TIME. Referenced by DisplayTwo::deal(). Here is the call graph for this function: |
|
|
Turn the card to frontside or backside.
Definition at line 111 of file cardsprite.cpp. References Turning. Referenced by advance(), DisplayIntro::loop(), and DisplayTwo::turn(). |
|
|
Stop all movment and animation.
Definition at line 102 of file cardsprite.cpp. References Idle, and setBackside(). Here is the call graph for this function: |
1.4.6