KGameDifficultyLevel Class
Represents a game's difficulty level. More...
| Header: | #include <KGameDifficultyLevel> |
| Inherits: | QObject |
Public Types
| enum | StandardLevel { Custom, RidiculouslyEasy, VeryEasy, Easy, Medium, …, Impossible } |
Properties
|
Public Functions
| KGameDifficultyLevel(int hardness, const QByteArray &key, const QString &title, bool isDefault = false) | |
| int | hardness() const |
| bool | isDefault() const |
| QByteArray | key() const |
| KGameDifficultyLevel::StandardLevel | standardLevel() const |
| QString | title() const |
Detailed Description
This class represents a game's difficulty level.
See also KGameDifficulty.
Member Type Documentation
enum KGameDifficultyLevel::StandardLevel
| Constant | Value | Description |
|---|---|---|
KGameDifficultyLevel::Custom | -1 | standardLevel() returns this for custom levels. |
KGameDifficultyLevel::RidiculouslyEasy | 10 | |
KGameDifficultyLevel::VeryEasy | 20 | |
KGameDifficultyLevel::Easy | 30 | |
KGameDifficultyLevel::Medium | 40 | |
KGameDifficultyLevel::Hard | 50 | |
KGameDifficultyLevel::VeryHard | 60 | |
KGameDifficultyLevel::ExtremelyHard | 70 | |
KGameDifficultyLevel::Impossible | 80 |
Property Documentation
[read-only] default : bool
This property holds whether this level is the default level when no selection has been stored (for example on first startup).
Access functions:
| bool | isDefault() const |
[read-only] hardness : int
This property holds a numeric key 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.
Access functions:
| int | hardness() const |
[read-only] key : QByteArray
This property holds a non-localized key for this level.
Access functions:
| QByteArray | key() const |
[read-only] standardLevel : StandardLevel
This property holds the standard level which was used to create this level, or KGameDifficultyLevel::Custom for custom levels.
Access functions:
| KGameDifficultyLevel::StandardLevel | standardLevel() const |
[read-only] title : QString
This property holds a localized title for this level.
Access functions:
| QString | title() const |