libkdegames/highscore
KExtHighscore::MultiplayerScores Class Reference
#include <kexthighscore_item.h>
Detailed Description
This class is used to store and show scores for multiplayer games.Example of use: Initialize the class:
KExtHighscore::MultiScore ms(2); ms.setPlayerName(0, "player 1"); ms.setPlayerName(1, "player 2");At the end of each game, add the score of each players:
KExtHighscore::Score score(KExtHighscore::Won); score.setScore(100); ms.addScore(0, score); score.setType(KExtHighscore::Lost); score.setScore(20); ms.addScore(1, score);
Definition at line 271 of file kexthighscore_item.h.
Public Member Functions | |
| void | addScore (uint player, const Score &score) |
| void | clear () |
| MultiplayerScores () | |
| void | setName (uint player, const QString &name) |
| void | setPlayerCount (uint nb) |
| void | show (QWidget *parent) |
| ~MultiplayerScores () | |
Friends | |
| KDEGAMES_EXPORT QDataStream & | operator<< (QDataStream &stream, const MultiplayerScores &score) |
| KDEGAMES_EXPORT QDataStream & | operator>> (QDataStream &stream, MultiplayerScores &score) |
Constructor & Destructor Documentation
| KExtHighscore::MultiplayerScores::MultiplayerScores | ( | ) |
Definition at line 200 of file kexthighscore_item.cpp.
| KExtHighscore::MultiplayerScores::~MultiplayerScores | ( | ) |
Definition at line 203 of file kexthighscore_item.cpp.
Member Function Documentation
| void KExtHighscore::MultiplayerScores::addScore | ( | uint | player, | |
| const Score & | score | |||
| ) |
| void KExtHighscore::MultiplayerScores::clear | ( | ) |
| void KExtHighscore::MultiplayerScores::setName | ( | uint | player, | |
| const QString & | name | |||
| ) |
| void KExtHighscore::MultiplayerScores::setPlayerCount | ( | uint | nb | ) |
Set the number of players and clear the scores.
Definition at line 219 of file kexthighscore_item.cpp.
| void KExtHighscore::MultiplayerScores::show | ( | QWidget * | parent | ) |
Friends And Related Function Documentation
| KDEGAMES_EXPORT QDataStream& operator<< | ( | QDataStream & | stream, | |
| const MultiplayerScores & | score | |||
| ) | [friend] |
Definition at line 307 of file kexthighscore_item.cpp.
| KDEGAMES_EXPORT QDataStream& operator>> | ( | QDataStream & | stream, | |
| MultiplayerScores & | score | |||
| ) | [friend] |
Definition at line 314 of file kexthighscore_item.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference