QTfrontend/util/DataManager.h
changeset 6953 4c2dd25630a7
parent 6952 7f70f37bbf08
child 6958 8230a516ba93
equal deleted inserted replaced
6952:7f70f37bbf08 6953:4c2dd25630a7
    27 #include <QDir>
    27 #include <QDir>
    28 #include <QFile>
    28 #include <QFile>
    29 
    29 
    30 #include <QStringList>
    30 #include <QStringList>
    31 
    31 
       
    32 #include "HatModel.h"
    32 #include "MapModel.h"
    33 #include "MapModel.h"
    33 #include "ThemeModel.h"
    34 #include "ThemeModel.h"
    34 
    35 
    35 class QDir;
    36 class QDir;
    36 class QFile;
    37 class QFile;
    37 class QStringList;
    38 class QStringList;
       
    39 class HatModel;
    38 class MapModel;
    40 class MapModel;
    39 class ThemeModel;
    41 class ThemeModel;
    40 
    42 
    41 /**
    43 /**
    42  * @brief Offers access to the data files of hedgewars.
    44  * @brief Offers access to the data files of hedgewars.
    92          * @param relativeDataFilePath relative path of data file write path.
    94          * @param relativeDataFilePath relative path of data file write path.
    93          * @return destination of path data file.
    95          * @return destination of path data file.
    94          */
    96          */
    95         QString findFileForWrite(const QString & relativeDataFilePath) const;
    97         QString findFileForWrite(const QString & relativeDataFilePath) const;
    96 
    98 
       
    99 
    97         /**
   100         /**
    98          * @brief Returns pointer to a model for the available maps.
   101          * @brief Returns pointer to a model of available hats.
       
   102          *
       
   103          * The model is updated automatically on data reload.
       
   104          *
       
   105          * @return hat model pointer.
       
   106          */
       
   107         HatModel * hatModel();
       
   108 
       
   109         /**
       
   110          * @brief Returns pointer to a model of available maps.
    99          *
   111          *
   100          * The model is updated automatically on data reload.
   112          * The model is updated automatically on data reload.
   101          *
   113          *
   102          * @return map model pointer.
   114          * @return map model pointer.
   103          */
   115          */
   104         MapModel * mapModel();
   116         MapModel * mapModel();
   105 
   117 
   106         /**
   118         /**
   107          * @brief Returns pointer to a model for the available themes.
   119          * @brief Returns pointer to a model of available themes.
   108          *
   120          *
   109          * The model is updated automatically on data reload.
   121          * The model is updated automatically on data reload.
   110          *
   122          *
   111          * @return theme model pointer.
   123          * @return theme model pointer.
   112          */
   124          */
   134         DataManager();
   146         DataManager();
   135 
   147 
   136         QDir * m_defaultData; ///< directory of the installed data
   148         QDir * m_defaultData; ///< directory of the installed data
   137         QDir * m_userData;    ///< directory of custom data in the user's directory
   149         QDir * m_userData;    ///< directory of custom data in the user's directory
   138 
   150 
       
   151         HatModel * m_hatModel; ///< hat model instance
   139         MapModel * m_mapModel; ///< map model instance
   152         MapModel * m_mapModel; ///< map model instance
   140         ThemeModel * m_themeModel; ///< theme model instance
   153         ThemeModel * m_themeModel; ///< theme model instance
   141 };
   154 };
   142 
   155 
   143 #endif // HEDGEWARS_DATAMANAGER_H
   156 #endif // HEDGEWARS_DATAMANAGER_H