KExtHighscore::Item Class Reference
This class defines how to convert and how to display a highscore element (such as the score, the date, ...) or a player info (such as the player name, the best score, ...). More...
#include <kexthighscore_item.h>
Public Types | |
enum | Format { NoFormat, OneDecimal, Percentage, MinuteTime, DateTime } |
enum | Special { NoSpecial, ZeroNotDefined, NegativeNotDefined, DefaultNotDefined, Anonymous } |
Public Member Functions | |
Item (const QVariant &def=QVariant::Invalid, const QString &label=QString::null, int alignment=Qt::AlignRight) | |
void | setPrettyFormat (Format format) |
void | setPrettySpecial (Special special) |
bool | isVisible () const |
void | setLabel (const QString &label) |
QString | label () const |
int | alignment () const |
void | setDefaultValue (const QVariant &value) |
const QVariant & | defaultValue () const |
virtual QVariant | read (uint i, const QVariant &value) const |
virtual QString | pretty (uint i, const QVariant &value) const |
Detailed Description
This class defines how to convert and how to display a highscore element (such as the score, the date, ...) or a player info (such as the player name, the best score, ...).
Definition at line 40 of file kexthighscore_item.h.
Member Enumeration Documentation
|
Possible display format.
Definition at line 55 of file kexthighscore_item.h. |
|
Possible special value for display format.
Definition at line 72 of file kexthighscore_item.h. |
Constructor & Destructor Documentation
|
Constructor.
Definition at line 36 of file kexthighscore_item.cpp. |
Member Function Documentation
|
Set the display format.
Definition at line 49 of file kexthighscore_item.cpp. References QVariant::type(). Referenced by KExtHighscore::Manager::createItem(), and KExtHighscore::Manager::setScoreType(). |
|
Set the special value for display.
Definition at line 73 of file kexthighscore_item.cpp. References QVariant::type(). Referenced by KExtHighscore::Manager::createItem(). |
|
Definition at line 104 of file kexthighscore_item.h. References QString::isEmpty(). |
|
Set the label.
Definition at line 109 of file kexthighscore_item.h. |
|
Definition at line 114 of file kexthighscore_item.h. |
|
Definition at line 119 of file kexthighscore_item.h. |
|
Set default value.
Definition at line 124 of file kexthighscore_item.h. Referenced by KExtHighscore::Manager::setPlayerItem(), and KExtHighscore::Manager::setScoreItem(). |
|
Definition at line 129 of file kexthighscore_item.h. Referenced by KExtHighscore::Manager::setPlayerItem(). |
|
Definition at line 44 of file kexthighscore_item.cpp. |
|
Definition at line 106 of file kexthighscore_item.cpp. References QString::number(), QVariant::toDateTime(), QVariant::toDouble(), QVariant::toInt(), QVariant::toString(), and QVariant::toUInt(). |
The documentation for this class was generated from the following files: