#ifndef MAPLIST_H #define MAPLIST_H #include #include class Map; class MapList : public QObject { Q_OBJECT public: MapList(QObject *parent = 0) : QObject(parent) {} bool loadFile(const QString &path); bool loadDir(const QString &path); void clear(); const QList &maps() const {return _maps;} const QString &errorString() const {return _errorString;} static QString formats(); static QStringList filter(); private: bool loadFile(const QString &path, bool *atlas, bool dir); bool loadDirR(const QString &path); Map *loadListEntry(const QByteArray &line); bool loadSource(const QString &path, bool dir); bool loadMap(const QString &path, bool dir); bool loadAtlas(const QString &path, bool dir); QList _maps; QString _errorString; }; #endif // MAPLIST_H