QTfrontend/util/DataManager.h
changeset 6938 217ed62e872c
parent 6937 7f77fa908a4e
child 6948 7271ce89950f
equal deleted inserted replaced
6937:7f77fa908a4e 6938:217ed62e872c
    28 #include <QDir>
    28 #include <QDir>
    29 #include <QFile>
    29 #include <QFile>
    30 
    30 
    31 #include <QStringList>
    31 #include <QStringList>
    32 
    32 
       
    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 MapModel;
    38 class ThemeModel;
    40 class ThemeModel;
    39 
    41 
    40 /**
    42 /**
    41  * @brief Offers access to the data files of hedgewars.
    43  * @brief Offers access to the data files of hedgewars.
    42  *
    44  *
    92          * @return destination of path data file.
    94          * @return destination of path data file.
    93          */
    95          */
    94         QString findFileForWrite(const QString & relativeDataFilePath) const;
    96         QString findFileForWrite(const QString & relativeDataFilePath) const;
    95 
    97 
    96         /**
    98         /**
       
    99          * @brief Returns pointer to a model for the available maps.
       
   100          *
       
   101          * The model is kept up to date automatically.
       
   102          *
       
   103          * @return map model pointer.
       
   104          */
       
   105         MapModel * mapModel();
       
   106 
       
   107         /**
    97          * @brief Returns pointer to a model for the available themes.
   108          * @brief Returns pointer to a model for the available themes.
    98          *
   109          *
    99          * The model is kept up to date automatically.
   110          * The model is kept up to date automatically.
   100          *
   111          *
   101          * @return theme model pointer
   112          * @return theme model pointer.
   102          */
   113          */
   103         ThemeModel * themeModel();
   114         ThemeModel * themeModel();
   104 
   115 
   105     public slots:
   116     public slots:
   106         /**
   117         /**
   128         DataManager();
   139         DataManager();
   129 
   140 
   130         QDir * m_defaultData; ///< directory of the installed data
   141         QDir * m_defaultData; ///< directory of the installed data
   131         QDir * m_userData;    ///< directory of custom data in the user's directory
   142         QDir * m_userData;    ///< directory of custom data in the user's directory
   132 
   143 
   133         ThemeModel * m_themeModel; ///< themes model instance
   144         MapModel * m_mapModel; ///< map model instance
       
   145         ThemeModel * m_themeModel; ///< theme model instance
   134 };
   146 };
   135 
   147 
   136 #endif // HEDGEWARS_DATAMANAGER_H
   148 #endif // HEDGEWARS_DATAMANAGER_H