17 #ifndef LEVELPROGRESSION_H
18 #define LEVELPROGRESSION_H
21 #include <QQmlListProperty>
120 return mAchievementToUnlockOnPerfection;
181 bool* wasLastLevel)
const;
215 bool mMultiplayer =
false;
218 QString mAchievementToUnlockOnPerfection;
222 #endif // LEVELPROGRESSION_H
int numLevels
Total number of levels that comprise this LevelProgression.
Definition: LevelProgression.h:53
Q_INVOKABLE LevelInfo * getLevelInfoByName(const QString &levelName) const
Returns child LevelInfo identified by levelName, or null if not found.
int getNumLevels() const
Returns numLevels.
Q_INVOKABLE LevelInfo * getNextLevelInfo(const QString ¤tLevelName, bool *wasLastLevel) const
Returns the child LevelInfo representing the next level in the progression after the level identified...
Q_INVOKABLE int compareLevels(const QString &levelNameA, const QString &levelNameB) const
Compares the specified levels in terms of how far in the progression they are.
bool multiplayer
Whether or not the LevelProgression is for multiple players.
Definition: LevelProgression.h:44
QString screenshotFileName
Name of image asset file for the LevelProgression screenshot / thumbnail.
Definition: LevelProgression.h:58
QList< Environment * > & getEnvironments()
Returns environments as a QList.
Definition: LevelProgression.h:98
const QString & getScreenshotFileName() const
Returns screenshotFileName.
Definition: LevelProgression.h:110
Metadata for a Level.
Definition: LevelInfo.h:31
Q_INVOKABLE Environment * getEnvironmentFromLevelName(const QString &levelName) const
Returns child Environment containing a LevelInfo identified by levelName, or null if not found...
const QList< Environment * > & getEnvironments() const
Returns environments as a const QList.
Definition: LevelProgression.h:102
Grouping of related Environments together into a logical, ordered list.
Definition: LevelProgression.h:34
Q_INVOKABLE bool isSinglePlayer() const
Returns whether or not the LevelProgression is for only one player.
Definition: LevelProgression.h:131
QQmlListProperty< Environment > environments
QML mutable list of Envrionments that compose this progression.
Definition: LevelProgression.h:49
void achievementToUnlockOnPerfectionChanged()
Emitted when achievementToUnlockOnPerfection changes.
void environmentsChanged()
Emitted when environments changes.
void setName(const QString &value)
Sets name.
QString achievementToUnlockOnPerfection
Name of the achievement to unlock upon "perfecting" the progression, which is defined as earning all ...
Definition: LevelProgression.h:64
Q_INVOKABLE int getIndexOfEnvironment(const QString &environmentName) const
Returns the index of the child Environment identified by environmentName, or -1 if not found...
bool isMultiplayer() const
Returns multiplayer.
Definition: LevelProgression.h:85
Q_INVOKABLE int getIndexOfEnvironmentFromLevelName(const QString &levelName) const
Returns index of child Environment containing a LevelInfo identified by levelName, or -1 if not found.
QString name
Human-readable name of the LevelProgression.
Definition: LevelProgression.h:40
void setAchievementToUnlockOnPerfection(const QString &value)
Sets achievementToUnlockOnPerfection.
void nameChanged()
Emitted when name changes.
void setScreenshotFileName(const QString &value)
Sets screenshotFileName.
const QString & getName() const
Returns name.
Definition: LevelProgression.h:76
Q_INVOKABLE bool hasLevel(const QString &levelName) const
Returns whether or not the LevelProgression contains a LevelInfo named levelName. ...
Q_INVOKABLE Environment * getEnvironmentByName(const QString &environmentName) const
Returns child Environment identified by environmentName, or null if not found.
Q_INVOKABLE LevelInfo * getStartingLevelInfo() const
Returns child LevelInfo representing the first level in the progression.
void multiplayerChanged()
Emitted when multiplayer changes.
void screenshotFileNameChanged()
Emitted when screenshotFileName changes.
QQmlListProperty< Environment > getEnvironmentsListProperty()
Returns environments.
Grouping of related LevelInfos together into an logical, ordered list.
Definition: Environment.h:37
void setMultiplayer(bool value)
Sets multiplayer.
const QString & getAchievementToUnlockOnPerfection() const
Returns achievementToUnlockOnPerfection.
Definition: LevelProgression.h:119