KGameDifficultyLevel
#include <KGameDifficultyLevel>
Public Types | |
enum | StandardLevel { Custom = -1 , RidiculouslyEasy = 10 , VeryEasy = 20 , Easy = 30 , Medium = 40 , Hard = 50 , VeryHard = 60 , ExtremelyHard = 70 , Impossible = 80 } |
Properties | |
bool | default |
int | hardness |
QByteArray | key |
StandardLevel | standardLevel |
QString | title |
Properties inherited from QObject | |
objectName | |
Detailed Description
- See also
- KGameDifficulty
Definition at line 24 of file kgamedifficulty.h.
Member Enumeration Documentation
◆ StandardLevel
Enumerator | |
---|---|
Custom | standardLevel() returns this for custom levels. |
Definition at line 35 of file kgamedifficulty.h.
Property Documentation
◆ default
|
read |
Definition at line 28 of file kgamedifficulty.h.
◆ hardness
|
read |
Definition at line 29 of file kgamedifficulty.h.
◆ key
|
read |
Definition at line 30 of file kgamedifficulty.h.
◆ standardLevel
|
read |
Definition at line 32 of file kgamedifficulty.h.
◆ title
|
read |
Definition at line 31 of file kgamedifficulty.h.
Constructor & Destructor Documentation
◆ KGameDifficultyLevel() [1/2]
KGameDifficultyLevel::KGameDifficultyLevel | ( | int | hardness, |
const QByteArray & | key, | ||
const QString & | title, | ||
bool | isDefault = false ) |
Refer to the getters' documentation for details on the params.
Definition at line 46 of file kgamedifficulty.cpp.
◆ KGameDifficultyLevel() [2/2]
|
explicit |
Definition at line 64 of file kgamedifficulty.cpp.
Member Function Documentation
◆ hardness()
int KGameDifficultyLevel::hardness | ( | ) | const |
- Returns
- a numeric key which is used to sort the levels by difficulty (smaller values mean easier levels)
- Note
- For standard levels, this equals the numeric value of the level in the StandardLevel enumeration.
Definition at line 114 of file kgamedifficulty.cpp.
◆ isDefault()
bool KGameDifficultyLevel::isDefault | ( | ) | const |
- Returns
- whether this level is the default level when no selection has been stored (e.g. on first startup)
Definition at line 107 of file kgamedifficulty.cpp.
◆ key()
QByteArray KGameDifficultyLevel::key | ( | ) | const |
- Returns
- a non-localized key for this level
Definition at line 121 of file kgamedifficulty.cpp.
◆ standardLevel()
KGameDifficultyLevel::StandardLevel KGameDifficultyLevel::standardLevel | ( | ) | const |
- Returns
- the standard level which was used to create this level, or KGameDifficultyLevel::Custom for custom levels
Definition at line 135 of file kgamedifficulty.cpp.
◆ title()
QString KGameDifficultyLevel::title | ( | ) | const |
- Returns
- a localized title for this level
Definition at line 128 of file kgamedifficulty.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Apr 27 2024 22:10:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.