ScoreSprite Class Reference

The sprite for a score board on the canvas. More...

#include <scoresprite.h>

Inheritance diagram for ScoreSprite:

Inheritance graph
[legend]
Collaboration diagram for ScoreSprite:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ScoreSprite (QString id, ThemeManager *theme, int advancePeriod, int no, QGraphicsScene *scene)
 Constructor for the score sprite.
 ~ScoreSprite ()
 Destructor.
virtual void advance (int phase)
 Standard QGI advance function.
virtual int type () const
 Retrieve the type of QGI.
virtual void changeTheme ()
 Main theme change function.
void setPlayerName (QString s)
 Store the player name.
void setPoints (int points)
 Store the amounts of points for a player.
void setScore (int score)
 Store the score for a player.
void setGames (int won, int all)
 Store the amounts of games.
void setInput (int device)
 Store input device for a player.
void setTrump (int suite)
 Store trump icon for a player.

Detailed Description

The sprite for a score board on the canvas.

Definition at line 38 of file scoresprite.h.


Constructor & Destructor Documentation

ScoreSprite::ScoreSprite QString  id,
ThemeManager theme,
int  advancePeriod,
int  no,
QGraphicsScene *  scene
 

Constructor for the score sprite.

Parameters:
id The theme id
theme The theme manager
advancePeriod The canvas advance period [ms]
no A used defined number (unused)
scene The graphics scene

Definition at line 38 of file scoresprite.cpp.

References PixmapSprite::PixmapSprite(), and ThemeManager::updateTheme().

Here is the call graph for this function:

ScoreSprite::~ScoreSprite  ) 
 

Destructor.

Definition at line 63 of file scoresprite.cpp.


Member Function Documentation

void ScoreSprite::advance int  phase  )  [virtual]
 

Standard QGI advance function.

Parameters:
phase The advance phase

Reimplemented from PixmapSprite.

Definition at line 142 of file scoresprite.cpp.

References PixmapSprite::advance().

Here is the call graph for this function:

void ScoreSprite::changeTheme  )  [virtual]
 

Main theme change function.

On call of this the item needs to redraw and resize.

Reimplemented from PixmapSprite.

Definition at line 77 of file scoresprite.cpp.

References PixmapSprite::changeTheme(), ThemeManager::config(), PixmapSprite::setFrame(), and Themable::thememanager().

Here is the call graph for this function:

void ScoreSprite::setGames int  won,
int  all
 

Store the amounts of games.

Parameters:
won The amount of won games
all The amount of all games

Definition at line 176 of file scoresprite.cpp.

Referenced by DisplayTwo::updatePlayer().

void ScoreSprite::setInput int  device  ) 
 

Store input device for a player.

Parameters:
device The device number [0-2]

Definition at line 185 of file scoresprite.cpp.

References PixmapSprite::setFrame().

Referenced by DisplayTwo::updatePlayer().

Here is the call graph for this function:

void ScoreSprite::setPlayerName QString  s  ) 
 

Store the player name.

Parameters:
s The name

Definition at line 150 of file scoresprite.cpp.

Referenced by DisplayTwo::updatePlayer().

void ScoreSprite::setPoints int  points  ) 
 

Store the amounts of points for a player.

Parameters:
points The amount of current points.

Definition at line 158 of file scoresprite.cpp.

Referenced by DisplayTwo::updatePlayer().

void ScoreSprite::setScore int  score  ) 
 

Store the score for a player.

Parameters:
score The score

Definition at line 167 of file scoresprite.cpp.

Referenced by DisplayTwo::updatePlayer().

void ScoreSprite::setTrump int  suite  ) 
 

Store trump icon for a player.

Parameters:
suite The trump suite

Definition at line 195 of file scoresprite.cpp.

References PixmapSprite::setFrame().

Referenced by DisplayTwo::updatePlayer().

Here is the call graph for this function:

virtual int ScoreSprite::type  )  const [inline, virtual]
 

Retrieve the type of QGI.

This item is UserType+10

Returns:
The type of item.

Reimplemented from PixmapSprite.

Definition at line 63 of file scoresprite.h.


The documentation for this class was generated from the following files:
Generated on Tue May 1 09:34:40 2007 for LSkat by  doxygen 1.4.6