summaryrefslogtreecommitdiff
path: root/src/installdialog.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/installdialog.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/installdialog.h')
-rw-r--r--src/installdialog.h216
1 files changed, 108 insertions, 108 deletions
diff --git a/src/installdialog.h b/src/installdialog.h
index 14c9d733..e44d7eee 100644
--- a/src/installdialog.h
+++ b/src/installdialog.h
@@ -17,111 +17,111 @@ 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 INSTALLDIALOG_H
-#define INSTALLDIALOG_H
-
-#include "mytree.h"
-#include "archivetree.h"
-#include "tutorabledialog.h"
-#include <QDialog>
-#include <QUuid>
-#include <QTreeWidgetItem>
-#include <QProgressDialog>
-#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
-#include <archive.h>
-#include <directorytree.h>
-
-
-namespace Ui {
- class InstallDialog;
-}
-
-
-/**
- * a dialog presented to manually define how a mod is to be installed. It provides
- * a tree view of the file contents that can modified directly
- **/
-class InstallDialog : public TutorableDialog
-{
- Q_OBJECT
-
-public:
- /**
- * @brief constructor
- *
- * @param tree tree structure describing the vanilla archive structure. The InstallDialog does NOT take custody of this pointer!
- * @param modName name of the mod. The name can be modified through the dialog
- * @param parent parent widget
- **/
- explicit InstallDialog(DirectoryTree *tree, const QString &modName, QWidget *parent = 0);
- ~InstallDialog();
-
- /**
- * @brief retrieve the (modified) mod name
- *
- * @return updated mod name
- **/
- QString getModName() const;
-
- /**
- * @brief retrieve the user-modified directory structure
- *
- * @return modified data structure. This is a NEW datatree object for which the caller takes custody
- **/
- DirectoryTree *getDataTree() const;
-
-signals:
-
- void openFile(const QString fileName);
-
-private:
-
- void updatePreview();
- bool testForProblem();
- void updateProblems();
-
- void setDataRoot(QTreeWidgetItem* root);
-
- void updateFileList(QTreeWidgetItem *item, QString targetName, FileData* const *fileData, size_t size) const;
-
- void updateCheckState(QTreeWidgetItem *item);
-// void recursiveCheck(QTreeWidgetItem *item);
-// void recursiveUncheck(QTreeWidgetItem *item);
-
- void addDataToTree(DirectoryTree::Node *node, QTreeWidgetItem *treeItem);
-
- void mapDataNode(DirectoryTree::Node *node, QTreeWidgetItem *baseItem) const;
-
- static QString getFullPath(const DirectoryTree::Node *node);
-
-private slots:
-
- void on_treeContent_customContextMenuRequested(QPoint pos);
-
- void unset_data();
- void use_as_data();
- void create_directory();
- void open_file();
-
- void treeChanged();
-
- void on_cancelButton_clicked();
-
- void on_okButton_clicked();
-
-private:
- Ui::InstallDialog *ui;
-
- DirectoryTree *m_DataTree;
-
- ArchiveTree *m_Tree;
- QLabel *m_ProblemLabel;
- QTreeWidgetItem *m_TreeRoot;
- QTreeWidgetItem *m_DataRoot;
- QTreeWidgetItem *m_TreeSelection;
- bool m_Updating;
-
-};
-
-#endif // INSTALLDIALOG_H
+#ifndef INSTALLDIALOG_H
+#define INSTALLDIALOG_H
+
+#include "mytree.h"
+#include "archivetree.h"
+#include "tutorabledialog.h"
+#include <QDialog>
+#include <QUuid>
+#include <QTreeWidgetItem>
+#include <QProgressDialog>
+#define WIN32_LEAN_AND_MEAN
+#include <Windows.h>
+#include <archive.h>
+#include <directorytree.h>
+
+
+namespace Ui {
+ class InstallDialog;
+}
+
+
+/**
+ * a dialog presented to manually define how a mod is to be installed. It provides
+ * a tree view of the file contents that can modified directly
+ **/
+class InstallDialog : public MOBase::TutorableDialog
+{
+ Q_OBJECT
+
+public:
+ /**
+ * @brief constructor
+ *
+ * @param tree tree structure describing the vanilla archive structure. The InstallDialog does NOT take custody of this pointer!
+ * @param modName name of the mod. The name can be modified through the dialog
+ * @param parent parent widget
+ **/
+ explicit InstallDialog(MOBase::DirectoryTree *tree, const QString &modName, QWidget *parent = 0);
+ ~InstallDialog();
+
+ /**
+ * @brief retrieve the (modified) mod name
+ *
+ * @return updated mod name
+ **/
+ QString getModName() const;
+
+ /**
+ * @brief retrieve the user-modified directory structure
+ *
+ * @return modified data structure. This is a NEW datatree object for which the caller takes custody
+ **/
+ MOBase::DirectoryTree *getDataTree() const;
+
+signals:
+
+ void openFile(const QString fileName);
+
+private:
+
+ void updatePreview();
+ bool testForProblem();
+ void updateProblems();
+
+ void setDataRoot(QTreeWidgetItem* root);
+
+ void updateFileList(QTreeWidgetItem *item, QString targetName, FileData* const *fileData, size_t size) const;
+
+ void updateCheckState(QTreeWidgetItem *item);
+// void recursiveCheck(QTreeWidgetItem *item);
+// void recursiveUncheck(QTreeWidgetItem *item);
+
+ void addDataToTree(MOBase::DirectoryTree::Node *node, QTreeWidgetItem *treeItem);
+
+ void mapDataNode(MOBase::DirectoryTree::Node *node, QTreeWidgetItem *baseItem) const;
+
+ static QString getFullPath(const MOBase::DirectoryTree::Node *node);
+
+private slots:
+
+ void on_treeContent_customContextMenuRequested(QPoint pos);
+
+ void unset_data();
+ void use_as_data();
+ void create_directory();
+ void open_file();
+
+ void treeChanged();
+
+ void on_cancelButton_clicked();
+
+ void on_okButton_clicked();
+
+private:
+ Ui::InstallDialog *ui;
+
+ MOBase::DirectoryTree *m_DataTree;
+
+ ArchiveTree *m_Tree;
+ QLabel *m_ProblemLabel;
+ QTreeWidgetItem *m_TreeRoot;
+ QTreeWidgetItem *m_DataRoot;
+ QTreeWidgetItem *m_TreeSelection;
+ bool m_Updating;
+
+};
+
+#endif // INSTALLDIALOG_H