#include <level.h>
Public Methods | |
Level (Map const &map, QStringList const &authors, QStringList const &emails, QString const &homepage, QString const ©right, QString const &name, QString const &info, int difficulty) | |
Level (QStringList &lines, QStringList const &authors, QStringList const &emails, QString const &homepage, QString const ©right, QString const &info, int difficulty) | |
Level (QDataStream &stream, int version) | |
Map const & | map () const |
void | setMap (Map const &map) |
CompressedMap const & | compressedMap () const |
QStringList const & | authors () const |
QString | authorLine () const |
QString | authorEmailLine () const |
void | setAuthors (QStringList const &authors) |
void | setAuthorEmailLine (QString author_email_line) |
QStringList const & | emails () const |
void | setEmails (QStringList const &emails) |
QString const & | homepage () const |
void | setHomepage (QString const &homepage) |
QString const & | copyright () const |
void | setCopyright (QString const ©right) |
QString const & | name () const |
void | setName (QString const &name) |
QString const & | info () const |
void | setInfo (QString const &info) |
int | difficulty () const |
void | setDifficulty (int difficulty) |
void | writeToStream (QDataStream &stream) const |
QString | toText (QStringList const &authors, QStringList const &emails, QString const &homepage, QString const ©right, QString const &info, int difficulty) const |
Static Private Methods | |
void | getInfo (QStringList &lines, QStringList &authors, QStringList &emails, QString &homepage, QString ©right, QString &name, QString &info, int &difficulty) |
void | parseAuthorEmailLine (QString const &author_email_line, QStringList &authors, QStringList &emails) |
QString | createAuthorEmailLine (QStringList const &authors, QStringList const &emails) |
Private Attributes | |
CompressedMap | m_compressed_map |
Map | m_map |
QStringList | m_authors |
QStringList | m_emails |
QString | m_homepage |
QString | m_copyright |
QString | m_name |
QString | m_info |
int | m_difficulty |
Friends | |
class | Collection |
|
Creates the level.
|
|
Constructs the map from a list of lines in xsb format. The constructor removes all lines in the string list, which were before the actual map and the lines of the actual map itself and all lines up to another map (in these lines we also look for additional info like author etc.). Be sure to call map.isValid() afterwards. Note that you have to supply default values for all author etc, which will only be overwritten, if there exist other information for the level.
|
|
Creates a level from a QDataStream.
|
|
Returns the authors and emails in one line, separated by ", ".
|
|
Returns the authors in one line, separated by ", ".
|
|
Returns the authors of the level.
|
|
Returns the compressed map of the level.
|
|
Returns the copyright the the level.
|
|
Creates the author-email-line.
|
|
Returns the difficulty of the level.
|
|
Returns the email adresses of the authors.
|
|
Read author etc. information of a list of lines, unitl a sokoban map is found. The constructor removes all lines in the string list, which were before the actual map. Note that you have to supply default values for all author etc, which will only be overwritten, if there exist other information.
|
|
Returns the homepage of the level.
|
|
Returns the additional info for this level.
|
|
Returns the map of the level.
|
|
Returns the name of the level.
|
|
Creates authors and emails from an author-email-line.
|
|
Sets the authors and emails created from the line.
|
|
Sets the authors of the level.
|
|
Sets the copyright of the level.
|
|
Sets the difficulty of the level.
|
|
Sets the email adddresses of the authors.
|
|
Sets the homepage of the level.
|
|
Sets the info of the level.
|
|
Sets the map of the level.
|
|
Sets the name of the level.
|
|
Returns the map of the level collection plus additional info in xsb format. Note that only these informations are added, which differ from the ones in the collection.
|
|
Writes the level to a QDataStream.
|
|
To let collection use the information routines (maybe this should be refactored).
|
|
The authors.
|
|
The compressed map.
|
|
The copyright.
|
|
The difficulty.
|
|
The email adresses of the authors.
|
|
The homepage.
|
|
The additional level info.
|
|
The map.
|
|
The name.
|