diff -r 6e505ea936ad -r 1ee4842a9c86 QTfrontend/model/MapModel.h --- a/QTfrontend/model/MapModel.h Tue Dec 03 18:09:54 2013 +0100 +++ b/QTfrontend/model/MapModel.h Tue Dec 03 23:54:58 2013 +0400 @@ -67,12 +67,14 @@ bool dlc; ///< True if this map was not packaged with the game }; + MapModel(MapType maptype, QObject *parent = 0); + /** * @brief Searches maps in model to find out if one exists * @param map map of which to check existence * @return true if it exists */ - bool mapExists(const QString & map) const; + bool mapExists(const QString & map); /** * @brief Finds a map index (column, row) for a map name @@ -86,7 +88,7 @@ * @param map map of which to find index * @return int of index, or -1 if map not found */ - int findMap(const QString & map) const; + int findMap(const QString & map); /** * @brief Finds and returns a map item for a map name @@ -98,16 +100,16 @@ // Static MapInfos for drawn and generated maps static MapInfo MapInfoRandom, MapInfoMaze, MapInfoDrawn; - public slots: - /// Reloads the maps using the DataManager. - /// Accepts two map types: StaticMap or MissionMap. - void loadMaps(MapType maptype); + /// Loads the maps + bool loadMaps(); private: /// map index lookup table. QPair contains: //QHash > m_mapIndexes; QHash m_mapIndexes; + MapType m_maptype; + bool m_loaded; /** * @brief Creates a QStandardItem, that holds the map info and item appearance.