#include <kexthighscore_item.h>
Public Member Functions | |
| MultiplayerScores () | |
| ~MultiplayerScores () | |
| void | setPlayerCount (uint nb) |
| Set the number of players and clear the scores. | |
| void | setName (uint player, const QString &name) |
| Set the name of player. | |
| void | addScore (uint player, const Score &score) |
| Add the score of player. | |
| void | clear () |
| Clear all scores. | |
| void | show (QWidget *parent) |
| Show scores. | |
Friends | |
| QDataStream & | operator<< (QDataStream &stream, const MultiplayerScores &score) |
| QDataStream & | operator>> (QDataStream &stream, MultiplayerScores &score) |
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 267 of file kexthighscore_item.h.
|
|
Definition at line 196 of file kexthighscore_item.cpp. |
|
|
Definition at line 199 of file kexthighscore_item.cpp. |
|
||||||||||||
|
Add the score of player.
Definition at line 227 of file kexthighscore_item.cpp. References KExtHighscore::Score::score(), KExtHighscore::Score::type(), and KExtHighscore::Won. Here is the call graph for this function: ![]() |
|
|
Clear all scores.
Definition at line 202 of file kexthighscore_item.cpp. Referenced by setPlayerCount(). |
|
||||||||||||
|
Set the name of player.
Definition at line 222 of file kexthighscore_item.cpp. |
|
|
Set the number of players and clear the scores.
Definition at line 215 of file kexthighscore_item.cpp. References clear(). Here is the call graph for this function: ![]() |
|
|
Show scores.
Definition at line 241 of file kexthighscore_item.cpp. |
|
||||||||||||
|
Definition at line 298 of file kexthighscore_item.cpp. |
|
||||||||||||
|
Definition at line 305 of file kexthighscore_item.cpp. |
1.4.6