KDEGames
kgamedifficulty.h
49 KGameDifficultyLevel(int hardness, const QByteArray &key, const QString &title, bool isDefault = false);
93 Q_PROPERTY(const KGameDifficultyLevel *currentLevel READ currentLevel WRITE select NOTIFY currentLevelChanged)
94 Q_PROPERTY(const KGameDifficultyLevel *selectedLevel READ currentLevel WRITE select NOTIFY selectedLevelChanged)
123 void addStandardLevelRange(KGameDifficultyLevel::StandardLevel from, KGameDifficultyLevel::StandardLevel to);
127 addStandardLevelRange(KGameDifficultyLevel::StandardLevel from, KGameDifficultyLevel::StandardLevel to, KGameDifficultyLevel::StandardLevel defaultLevel);
Definition kgamedifficulty.h:25
KGameDifficultyLevel(int hardness, const QByteArray &key, const QString &title, bool isDefault=false)
Refer to the getters' documentation for details on the params.
Definition kgamedifficulty.cpp:46
KGameDifficulty manages difficulty levels of a game in a standard way.
Definition kgamedifficulty.h:89
void selectedLevelChanged(const KGameDifficultyLevel *level)
Emitted after every call to select(), even when the user has rejected the change.
void editableChanged(bool editable)
Emitted when the editability changes.
static KGameDifficultyLevel::StandardLevel globalLevel()
A shortcut for KGameDifficulty::global()->currentLevel()->standardLevel().
Definition kgamedifficulty.cpp:338
void gameRunningChanged(bool gameRunning)
Emitted when a running game has been marked or unmarked.
void addStandardLevel(KGameDifficultyLevel::StandardLevel level, bool isDefault=false)
A shortcut for addLevel(new KGameDifficultyLevel(level)).
Definition kgamedifficulty.cpp:201
void select(const KGameDifficultyLevel *level)
Select a new difficulty level.
Definition kgamedifficulty.cpp:305
void setEditable(bool editable)
Set whether the difficulty level selection may be edited.
Definition kgamedifficulty.cpp:276
void setGameRunning(bool running)
KGameDifficulty has optional protection against changing the difficulty level while a game is running...
Definition kgamedifficulty.cpp:294
void addLevel(KGameDifficultyLevel *level)
Adds a difficulty level to this instance.
Definition kgamedifficulty.cpp:181
void addStandardLevelRange(KGameDifficultyLevel::StandardLevel from, KGameDifficultyLevel::StandardLevel to)
This convenience method adds a range of standard levels to this instance (including the boundaries).
Definition kgamedifficulty.cpp:206
QList< const KGameDifficultyLevel * > levels() const
Definition kgamedifficulty.cpp:236
void currentLevelChanged(const KGameDifficultyLevel *level)
Emitted when a new difficulty level has been selected.
The namespace for methods to integrate KGameDifficulty into the UI.
Definition kgamedifficulty.cpp:346
void init(KXmlGuiWindow *window, KGameDifficulty *difficulty=nullptr)
Install standard GUI components for the manipulation of the given KGameDifficulty instance in the giv...
Definition kgamedifficulty.cpp:394
QObject(QObject *parent)
Q_ENUM(...)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:50:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:50:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.