Score Class Reference

The score object is a compatibility object to transfer the score between the various players and status information entities and the score widget. More...

#include <score.h>

Collaboration diagram for Score:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Score (QObject *parent=0)
 Construct a score object.
void setLevel (int level, int no)
 Set and update the level of the AI.
void setPlayerName (QString name, int no)
 Set and update the player name.
void setTurn (int no)
 Set and update whose turn it is (which player goes next).
void setWins (int amount, int no)
 Set and update the amount of wins of a player.
void setLosses (int amount, int no)
 Set and update the amount of losses of a player.
void setRemis (int amount, int no)
 Set and update the amount of draws of a player.
void setBreaks (int amount, int no)
 Set and update the amount of aborted games of a player.
void setPlayedBy (int type, int no)
 Set and update the input device of a player.
void setDisplay (ScoreSprite *s)
 Connect the score to a display sprite.

Protected Member Functions

void update ()
 Push all data into the display sprite.

Detailed Description

The score object is a compatibility object to transfer the score between the various players and status information entities and the score widget.

Definition at line 34 of file score.h.


Constructor & Destructor Documentation

Score::Score QObject *  parent = 0  ) 
 

Construct a score object.

Parameters:
parent The parent object

Definition at line 30 of file score.cpp.


Member Function Documentation

void Score::setBreaks int  amount,
int  no
[inline]
 

Set and update the amount of aborted games of a player.

Parameters:
amount The new amount
no The player number [0,1]

Definition at line 83 of file score.h.

References update().

Here is the call graph for this function:

void Score::setDisplay ScoreSprite s  ) 
 

Connect the score to a display sprite.

This sprite will be used for the update of the data.

Parameters:
s The display sprite

Definition at line 38 of file score.cpp.

References update().

Referenced by KWin4View::initGame().

Here is the call graph for this function:

void Score::setLevel int  level,
int  no
[inline]
 

Set and update the level of the AI.

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

Definition at line 48 of file score.h.

References update().

Referenced by KWin4Doc::loadSettings().

Here is the call graph for this function:

void Score::setLosses int  amount,
int  no
[inline]
 

Set and update the amount of losses of a player.

Parameters:
amount The new amount
no The player number [0,1]

Definition at line 71 of file score.h.

References update().

Here is the call graph for this function:

void Score::setPlayedBy int  type,
int  no
[inline]
 

Set and update the input device of a player.

Parameters:
type The new input device [0-3], 2 is AI hardcoded
no The player number [0,1]

Definition at line 89 of file score.h.

References update().

Referenced by KWin4Doc::setPlayedBy().

Here is the call graph for this function:

void Score::setPlayerName QString  name,
int  no
[inline]
 

Set and update the player name.

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

Definition at line 54 of file score.h.

References update().

Referenced by KWin4Doc::playerPropertyChanged(), and KWin4Player::slotPlayerPropertyChanged().

Here is the call graph for this function:

void Score::setRemis int  amount,
int  no
[inline]
 

Set and update the amount of draws of a player.

Parameters:
amount The new amount
no The player number [0,1]

Definition at line 77 of file score.h.

References update().

Here is the call graph for this function:

void Score::setTurn int  no  )  [inline]
 

Set and update whose turn it is (which player goes next).

Parameters:
no The player number [0,1]

Definition at line 59 of file score.h.

References update().

Here is the call graph for this function:

void Score::setWins int  amount,
int  no
[inline]
 

Set and update the amount of wins of a player.

Parameters:
amount The new amount
no The player number [0,1]

Definition at line 65 of file score.h.

References update().

Here is the call graph for this function:

void Score::update  )  [protected]
 

Push all data into the display sprite.

Definition at line 46 of file score.cpp.

References ScoreSprite::setBreak(), ScoreSprite::setDraw(), ScoreSprite::setInput(), ScoreSprite::setLevel(), ScoreSprite::setLoss(), ScoreSprite::setPlayerName(), ScoreSprite::setTurn(), and ScoreSprite::setWon().

Referenced by setBreaks(), setDisplay(), setLevel(), setLosses(), setPlayedBy(), setPlayerName(), setRemis(), setTurn(), and setWins().

Here is the call graph for this function:


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