summaryrefslogtreecommitdiff
path: root/src/directoryrefresher.h
diff options
context:
space:
mode:
authorTannin <Tannin@Miranda>2013-02-17 09:26:29 +0100
committerTannin <Tannin@Miranda>2013-02-17 09:26:29 +0100
commit6516a6b7c19713de28db7142612f1c095e541317 (patch)
tree06829bf7f82e1251a9e3db27185b7df90833bbc8 /src/directoryrefresher.h
parent5d1154c24e2475ed2b7ac248de27ab7b501a1e5e (diff)
- moved shared and uibase libraries to namespaces
- bugfix: the "fix mods" function was accessing the save game data incorrectly, causing a crash
Diffstat (limited to 'src/directoryrefresher.h')
-rw-r--r--src/directoryrefresher.h174
1 files changed, 87 insertions, 87 deletions
diff --git a/src/directoryrefresher.h b/src/directoryrefresher.h
index 47259fdd..5b785b2f 100644
--- a/src/directoryrefresher.h
+++ b/src/directoryrefresher.h
@@ -17,90 +17,90 @@ You should have received a copy of the GNU General Public License
along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef DIRECTORYREFRESHER_H
-#define DIRECTORYREFRESHER_H
-
-#include <QObject>
-#include <directoryentry.h>
-#include <vector>
-#include <QMutex>
-#include <tuple>
-
-
-/**
- * @brief used to asynchronously generate the virtual view of the combined data directory
- **/
-class DirectoryRefresher : public QObject
-{
-
- Q_OBJECT
-
-public:
-
- /**
- * @brief constructor
- *
- **/
- DirectoryRefresher();
-
- /**
- * @brief retrieve the updated directory structure
- *
- * returns a pointer to the updated directory structure. DirectoryRefresher
- * deletes its own pointer and the caller takes custody of the pointer
- *
- * @return updated directory structure
- **/
- DirectoryEntry *getDirectoryStructure();
-
- /**
- * @brief sets up the mods to be included in the directory structure
- *
- * @param mods list of the mods to include
- **/
- void setMods(const std::vector<std::tuple<QString, QString, int> > &mods);
-
- /**
- * @brief sets up the directory where mods are stored
- * @param modDirectory the mod directory
- * @note this function could be obsoleted easily by storing absolute paths in the parameter to setMods. This is legacy
- */
- void setModDirectory(const QString &modDirectory);
-
- /**
- * @brief remove files from the directory structure that are known to be irrelevant to the game
- * @param the structure to clean
- */
- static void cleanStructure(DirectoryEntry *structure);
-
- /**
- * @brief add files for a mod to the directory structure, including bsas
- * @param modName
- * @param priorityBSA
- * @param directory
- * @param priorityDir
- */
- static void addModToStructure(DirectoryEntry *directoryStructure, const QString &modName, int priority, const QString &directory);
-
-public slots:
-
- /**
- * @brief generate a directory structure from the mods set earlier
- **/
- void refresh();
-
-signals:
-
- void progress(int progress);
- void error(const QString &error);
- void refreshed();
-
-private:
-
- std::vector<std::tuple<QString, QString, int> > m_Mods;
- DirectoryEntry *m_DirectoryStructure;
- QMutex m_RefreshLock;
-
-};
-
-#endif // DIRECTORYREFRESHER_H
+#ifndef DIRECTORYREFRESHER_H
+#define DIRECTORYREFRESHER_H
+
+#include <QObject>
+#include <directoryentry.h>
+#include <vector>
+#include <QMutex>
+#include <tuple>
+
+
+/**
+ * @brief used to asynchronously generate the virtual view of the combined data directory
+ **/
+class DirectoryRefresher : public QObject
+{
+
+ Q_OBJECT
+
+public:
+
+ /**
+ * @brief constructor
+ *
+ **/
+ DirectoryRefresher();
+
+ /**
+ * @brief retrieve the updated directory structure
+ *
+ * returns a pointer to the updated directory structure. DirectoryRefresher
+ * deletes its own pointer and the caller takes custody of the pointer
+ *
+ * @return updated directory structure
+ **/
+ MOShared::DirectoryEntry *getDirectoryStructure();
+
+ /**
+ * @brief sets up the mods to be included in the directory structure
+ *
+ * @param mods list of the mods to include
+ **/
+ void setMods(const std::vector<std::tuple<QString, QString, int> > &mods);
+
+ /**
+ * @brief sets up the directory where mods are stored
+ * @param modDirectory the mod directory
+ * @note this function could be obsoleted easily by storing absolute paths in the parameter to setMods. This is legacy
+ */
+ void setModDirectory(const QString &modDirectory);
+
+ /**
+ * @brief remove files from the directory structure that are known to be irrelevant to the game
+ * @param the structure to clean
+ */
+ static void cleanStructure(MOShared::DirectoryEntry *structure);
+
+ /**
+ * @brief add files for a mod to the directory structure, including bsas
+ * @param modName
+ * @param priorityBSA
+ * @param directory
+ * @param priorityDir
+ */
+ static void addModToStructure(MOShared::DirectoryEntry *directoryStructure, const QString &modName, int priority, const QString &directory);
+
+public slots:
+
+ /**
+ * @brief generate a directory structure from the mods set earlier
+ **/
+ void refresh();
+
+signals:
+
+ void progress(int progress);
+ void error(const QString &error);
+ void refreshed();
+
+private:
+
+ std::vector<std::tuple<QString, QString, int> > m_Mods;
+ MOShared::DirectoryEntry *m_DirectoryStructure;
+ QMutex m_RefreshLock;
+
+};
+
+#endif // DIRECTORYREFRESHER_H