• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

libkdegames

KExtHighscore::Score

KExtHighscore::Score Class Reference

This class contains data for a score. More...

#include <kexthighscore_item.h>

List of all members.


Public Member Functions

 Score (ScoreType type=Won)
ScoreType type () const
void setType (ScoreType type)
const TQVariant & data (const TQString &name) const
void setData (const TQString &name, const TQVariant &value)
uint score () const
void setScore (uint score)
bool isTheWorst () const
bool operator< (const Score &score)

Friends

class MultiplayerScores
TQDataStream & operator<< (TQDataStream &stream, const Score &score)
TQDataStream & operator>> (TQDataStream &stream, Score &score)

Detailed Description

This class contains data for a score.

You should not inherit from this class but reimplement the methods in Highscores.

Definition at line 175 of file kexthighscore_item.h.


Member Function Documentation

ScoreType KExtHighscore::Score::type (  )  const [inline]

Returns:
the game type.

Definition at line 185 of file kexthighscore_item.h.

void KExtHighscore::Score::setType ( ScoreType  type  )  [inline]

Set the game type.

Definition at line 190 of file kexthighscore_item.h.

const TQVariant & KExtHighscore::Score::data ( const TQString &  name  )  const

Returns:
the data associated with the named Item.

Definition at line 155 of file kexthighscore_item.cpp.

void KExtHighscore::Score::setData ( const TQString &  name,
const TQVariant &  value 
)

Set the data associated with the named Item.

Note that the value should have the type of the default value of the Item.

Definition at line 161 of file kexthighscore_item.cpp.

uint KExtHighscore::Score::score (  )  const [inline]

Returns:
the score value.
Equivalent to
data("score").toUInt()
.

Definition at line 209 of file kexthighscore_item.h.

void KExtHighscore::Score::setScore ( uint  score  )  [inline]

Set the score value.

Equivalent to

setData("score", score)
.

Definition at line 216 of file kexthighscore_item.h.

bool KExtHighscore::Score::isTheWorst (  )  const

Returns:
true if this is the worst possible score (ie the default argument of ScoreItem).

Definition at line 168 of file kexthighscore_item.cpp.

bool KExtHighscore::Score::operator< ( const Score &  score  ) 

Comparison operator.

See also:
Manager::isStrictlyLess

Definition at line 174 of file kexthighscore_item.cpp.


The documentation for this class was generated from the following files:
  • kexthighscore_item.h
  • kexthighscore_item.cpp

libkdegames

Skip menu "libkdegames"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

@topname@

Skip menu "@topname@"
  • libkdegames
Generated for @topname@ by doxygen 1.5.6
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal