KExtHighscore Namespace Reference


Classes

class  Manager
 This class manages highscores and players entries (several players can share the same highscores list if the libkdegame library is built to support a common highscores file; NOTE that to correctly implement such feature we probably need a locking mechanism in KHighscore). More...
class  ShowItem
class  ScoresList
class  HighscoresList
class  HighscoresWidget
class  HighscoresDialog
class  LastMultipleScoresList
class  TotalMultipleScoresList
class  ConfigDialog
class  AskNameDialog
class  ScoreNameItem
class  RankItem
class  NameItem
class  DateItem
class  SuccessPercentageItem
class  ItemContainer
class  ItemArray
 Manage a bunch of Item which are saved under the same group in KHighscores config file. More...
class  ScoreInfos
class  ConfigGroup
class  PlayerInfos
class  ManagerPrivate
class  Item
 This class defines how to convert and how to display a highscore element (such as the score, the date, . More...
class  Score
 This class contains data for a score. More...
class  MultiplayerScores
 This class is used to store and show scores for multiplayer games. More...
class  PlayersCombo
class  AdditionalTab
class  StatisticsTab
class  HistogramTab

Enumerations

enum  ScoreType { Won = 0, Lost = -1, Draw = -2 }
 Possible score type. More...

Functions

uint gameType ()
 Get the current game type.
void setGameType (uint gameType)
 Set the current game type.
bool configure (QWidget *parent)
 Configure the highscores.
void show (QWidget *parent, int rank)
void submitScore (const Score &score, QWidget *widget)
 Submit a score.
void show (QWidget *parent)
 Show the highscores lists.
Score lastScore ()
Score firstScore ()
QDataStream & operator<< (QDataStream &s, const Score &score)
QDataStream & operator>> (QDataStream &s, Score &score)
QDataStream & operator<< (QDataStream &s, const MultiplayerScores &score)
QDataStream & operator>> (QDataStream &s, MultiplayerScores &score)

Variables

ManagerPrivateinternal = 0
ManagerPrivateinternal
const char * HS_ID = "player id"
const char * HS_REGISTERED_NAME = "registered name"
const char * HS_KEY = "player key"
const char * HS_WW_ENABLED = "ww hs enabled"
const char * DUMMY_STRINGS []
const char * UNABLE_TO_CONTACT


Enumeration Type Documentation

enum KExtHighscore::ScoreType
 

Possible score type.

Won the game has been won. Lost the game has been lost or has been aborted. Draw the game is a draw.

Enumerator:
Won 
Lost 
Draw 

Definition at line 169 of file kexthighscore_item.h.


Function Documentation

KDE_EXPORT bool KExtHighscore::configure QWidget *  parent  ) 
 

Configure the highscores.

Returns:
true if the configuration has been modified and saved

Definition at line 47 of file kexthighscore.cpp.

References KExtHighscore::ManagerPrivate::checkFirst(), KExtHighscore::ConfigDialog::hasBeenSaved(), and internal.

Here is the call graph for this function:

KDE_EXPORT Score KExtHighscore::firstScore  ) 
 

Returns:
the first score in the local list of highscores (the worst possible score if there is no entry).

Definition at line 98 of file kexthighscore.cpp.

References KExtHighscore::ManagerPrivate::checkFirst(), KExtHighscore::ManagerPrivate::hsConfig(), internal, KHighscore::readCurrentConfig(), and KExtHighscore::ManagerPrivate::readScore().

Here is the call graph for this function:

KDE_EXPORT uint KExtHighscore::gameType  ) 
 

Get the current game type.

Definition at line 36 of file kexthighscore.cpp.

References KExtHighscore::ManagerPrivate::checkFirst(), KExtHighscore::ManagerPrivate::gameType(), and internal.

Here is the call graph for this function:

KDE_EXPORT Score KExtHighscore::lastScore  ) 
 

Returns:
the last score in the local list of highscores. The worst possible score if there are less items than the maximum number.

Definition at line 90 of file kexthighscore.cpp.

References KExtHighscore::ManagerPrivate::checkFirst(), KExtHighscore::ManagerPrivate::hsConfig(), internal, KExtHighscore::ScoreInfos::maxNbEntries(), KHighscore::readCurrentConfig(), KExtHighscore::ManagerPrivate::readScore(), and KExtHighscore::ManagerPrivate::scoreInfos().

Here is the call graph for this function:

KDE_EXPORT QDataStream & KExtHighscore::operator<< QDataStream &  s,
const MultiplayerScores &  score
 

Definition at line 298 of file kexthighscore_item.cpp.

References KExtHighscore::MultiplayerScores::_nbGames, and KExtHighscore::MultiplayerScores::_scores.

KDE_EXPORT QDataStream & KExtHighscore::operator<< QDataStream &  s,
const Score &  score
 

Definition at line 179 of file kexthighscore_item.cpp.

References KExtHighscore::Score::_data, and KExtHighscore::Score::type().

Here is the call graph for this function:

KDE_EXPORT QDataStream & KExtHighscore::operator>> QDataStream &  s,
MultiplayerScores &  score
 

Definition at line 305 of file kexthighscore_item.cpp.

References KExtHighscore::MultiplayerScores::_nbGames, and KExtHighscore::MultiplayerScores::_scores.

KDE_EXPORT QDataStream & KExtHighscore::operator>> QDataStream &  s,
Score &  score
 

Definition at line 186 of file kexthighscore_item.cpp.

References KExtHighscore::Score::_data, and KExtHighscore::Score::_type.

KDE_EXPORT void KExtHighscore::setGameType uint  type  ) 
 

Set the current game type.

Definition at line 42 of file kexthighscore.cpp.

References internal, and KExtHighscore::ManagerPrivate::setGameType().

Here is the call graph for this function:

KDE_EXPORT void KExtHighscore::show QWidget *  widget  ) 
 

Show the highscores lists.

Definition at line 84 of file kexthighscore.cpp.

References KExtHighscore::ManagerPrivate::checkFirst(), internal, and show().

Here is the call graph for this function:

void KExtHighscore::show QWidget *  parent,
int  rank
 

Definition at line 57 of file kexthighscore.cpp.

Referenced by KGameDialogChatConfig::setKGame(), KGameDialogChatConfig::setOwner(), KScoreDialog::show(), show(), and submitScore().

KDE_EXPORT void KExtHighscore::submitScore const Score &  score,
QWidget *  widget
 

Submit a score.

See Manager for usage example.

Parameters:
widget a widget used as parent for error message box.

Definition at line 64 of file kexthighscore.cpp.

References KExtHighscore::Manager::AlwaysShow, internal, KExtHighscore::Manager::NeverShow, show(), KExtHighscore::Manager::ShowForHigherScore, KExtHighscore::Manager::ShowForHighestScore, KExtHighscore::ManagerPrivate::showMode, and KExtHighscore::ManagerPrivate::submitScore().

Here is the call graph for this function:


Variable Documentation

const char* KExtHighscore::DUMMY_STRINGS[]
 

Initial value:

 {
    I18N_NOOP("Undefined error."),
    I18N_NOOP("Missing argument(s)."),
    I18N_NOOP("Invalid argument(s)."),

    I18N_NOOP("Unable to connect to MySQL server."),
    I18N_NOOP("Unable to select database."),
    I18N_NOOP("Error on database query."),
    I18N_NOOP("Error on database insert."),

    I18N_NOOP("Nickname already registered."),
    I18N_NOOP("Nickname not registered."),
    I18N_NOOP("Invalid key."),
    I18N_NOOP("Invalid submit key."),

    I18N_NOOP("Invalid level."),

}

Definition at line 582 of file kexthighscore_internal.cpp.

const char* KExtHighscore::HS_ID = "player id"
 

Definition at line 254 of file kexthighscore_internal.cpp.

const char* KExtHighscore::HS_KEY = "player key"
 

Definition at line 256 of file kexthighscore_internal.cpp.

const char* KExtHighscore::HS_REGISTERED_NAME = "registered name"
 

Definition at line 255 of file kexthighscore_internal.cpp.

const char* KExtHighscore::HS_WW_ENABLED = "ww hs enabled"
 

Definition at line 257 of file kexthighscore_internal.cpp.

ManagerPrivate* KExtHighscore::internal
 

Definition at line 34 of file kexthighscore.cpp.

Referenced by KExtHighscore::Manager::addScoreItem(), KExtHighscore::AskNameDialog::AskNameDialog(), KExtHighscore::ConfigDialog::ConfigDialog(), configure(), firstScore(), gameType(), KExtHighscore::HighscoresDialog::HighscoresDialog(), KExtHighscore::HighscoresWidget::HighscoresWidget(), KExtHighscore::HistogramTab::HistogramTab(), KExtHighscore::AdditionalTab::init(), KExtHighscore::LastMultipleScoresList::LastMultipleScoresList(), lastScore(), KExtHighscore::HighscoresWidget::load(), KExtHighscore::PlayersCombo::load(), KExtHighscore::StatisticsTab::load(), KExtHighscore::HistogramTab::load(), KExtHighscore::Manager::Manager(), KExtHighscore::PlayerInfos::nbEntries(), KExtHighscore::Score::operator<(), KExtHighscore::PlayerInfos::PlayerInfos(), KExtHighscore::PlayersCombo::PlayersCombo(), KExtHighscore::ItemContainer::read(), KExtHighscore::Score::Score(), setGameType(), KExtHighscore::Manager::setPlayerItem(), KExtHighscore::Manager::setScoreHistogram(), KExtHighscore::Manager::setScoreItem(), KExtHighscore::Manager::setShowDrawGamesStatistic(), KExtHighscore::Manager::setShowMode(), KExtHighscore::Manager::setShowStatistics(), KExtHighscore::Manager::setTrackDrawGames(), KExtHighscore::Manager::setTrackLostGames(), KExtHighscore::Manager::setWWHighscores(), show(), KExtHighscore::Manager::showStatistics(), KExtHighscore::StatisticsTab::StatisticsTab(), KExtHighscore::Manager::submitLegacyScore(), submitScore(), KExtHighscore::TotalMultipleScoresList::TotalMultipleScoresList(), KExtHighscore::ItemContainer::write(), and KExtHighscore::Manager::~Manager().

ManagerPrivate* KExtHighscore::internal = 0
 

Definition at line 34 of file kexthighscore.cpp.

Referenced by KExtHighscore::Manager::addScoreItem(), KExtHighscore::AskNameDialog::AskNameDialog(), KExtHighscore::ConfigDialog::ConfigDialog(), configure(), firstScore(), gameType(), KExtHighscore::HighscoresDialog::HighscoresDialog(), KExtHighscore::HighscoresWidget::HighscoresWidget(), KExtHighscore::HistogramTab::HistogramTab(), KExtHighscore::AdditionalTab::init(), KExtHighscore::LastMultipleScoresList::LastMultipleScoresList(), lastScore(), KExtHighscore::HistogramTab::load(), KExtHighscore::StatisticsTab::load(), KExtHighscore::PlayersCombo::load(), KExtHighscore::HighscoresWidget::load(), KExtHighscore::Manager::Manager(), KExtHighscore::PlayerInfos::nbEntries(), KExtHighscore::Score::operator<(), KExtHighscore::PlayerInfos::PlayerInfos(), KExtHighscore::PlayersCombo::PlayersCombo(), KExtHighscore::ItemContainer::read(), KExtHighscore::Score::Score(), setGameType(), KExtHighscore::Manager::setPlayerItem(), KExtHighscore::Manager::setScoreHistogram(), KExtHighscore::Manager::setScoreItem(), KExtHighscore::Manager::setShowDrawGamesStatistic(), KExtHighscore::Manager::setShowMode(), KExtHighscore::Manager::setShowStatistics(), KExtHighscore::Manager::setTrackDrawGames(), KExtHighscore::Manager::setTrackLostGames(), KExtHighscore::Manager::setWWHighscores(), show(), KExtHighscore::Manager::showStatistics(), KExtHighscore::StatisticsTab::StatisticsTab(), KExtHighscore::Manager::submitLegacyScore(), submitScore(), KExtHighscore::TotalMultipleScoresList::TotalMultipleScoresList(), KExtHighscore::ItemContainer::write(), and KExtHighscore::Manager::~Manager().

const char* KExtHighscore::UNABLE_TO_CONTACT
 

Initial value:

    I18N_NOOP("Unable to contact world-wide highscore server")

Definition at line 601 of file kexthighscore_internal.cpp.


Generated on Wed Aug 23 18:06:10 2006 for libkdegames by  doxygen 1.4.6