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 setLevel (int level, int no)
 Store the level of the AI.
void setPlayerName (QString s, int no)
 Store the player name.
void setWon (QString s, int no)
 Store the amounts of wins for a player.
void setDraw (QString s, int no)
 Store the amounts of draws for a player.
void setLoss (QString s, int no)
 Store the amounts of losses for a player.
void setBreak (QString s, int no)
 Store the amounts of aborted games for a player.
void setTurn (int no)
 Define who's turn it is next.
void setInput (int device, int no)
 Store input device for a player.

Detailed Description

The sprite for a score board on the canvas.

Definition at line 37 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 37 of file scoresprite.cpp.

References PixmapSprite::PixmapSprite().

Here is the call graph for this function:

ScoreSprite::~ScoreSprite  ) 
 

Destructor.

Definition at line 64 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 162 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 80 of file scoresprite.cpp.

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

Here is the call graph for this function:

void ScoreSprite::setBreak QString  s,
int  no
 

Store the amounts of aborted games for a player.

Parameters:
s The amount of aborted games
no The player number [0,1]

Definition at line 213 of file scoresprite.cpp.

Referenced by Score::update().

void ScoreSprite::setDraw QString  s,
int  no
 

Store the amounts of draws for a player.

Parameters:
s The amount of draws
no The player number [0,1]

Definition at line 197 of file scoresprite.cpp.

Referenced by Score::update().

void ScoreSprite::setInput int  device,
int  no
 

Store input device for a player.

Parameters:
device The device number [0-3]
no The player number [0,1]

Definition at line 222 of file scoresprite.cpp.

References PixmapSprite::setFrame().

Referenced by Score::update().

Here is the call graph for this function:

void ScoreSprite::setLevel int  level,
int  no
 

Store the level of the AI.

Parameters:
level The level
no The player number [0,1]

Definition at line 170 of file scoresprite.cpp.

Referenced by Score::update().

void ScoreSprite::setLoss QString  s,
int  no
 

Store the amounts of losses for a player.

Parameters:
s The amount of losses
no The player number [0,1]

Definition at line 205 of file scoresprite.cpp.

Referenced by Score::update().

void ScoreSprite::setPlayerName QString  s,
int  no
 

Store the player name.

Parameters:
s The name
no The player number [0,1]

Definition at line 181 of file scoresprite.cpp.

Referenced by Score::update().

void ScoreSprite::setTurn int  no  ) 
 

Define who's turn it is next.

Parameters:
no The next player number [0,1]

Definition at line 240 of file scoresprite.cpp.

References ThemeManager::config(), and Themable::thememanager().

Referenced by Score::update().

Here is the call graph for this function:

void ScoreSprite::setWon QString  s,
int  no
 

Store the amounts of wins for a player.

Parameters:
s The amount of wins
no The player number [0,1]

Definition at line 189 of file scoresprite.cpp.

Referenced by Score::update().

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 62 of file scoresprite.h.


The documentation for this class was generated from the following files:
Generated on Sun Mar 4 10:56:43 2007 for KWin4 by  doxygen 1.4.6