-
Notifications
You must be signed in to change notification settings - Fork 2
/
mainwindow.h
91 lines (78 loc) · 2.24 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "settings.h"
#include "modlistmodel.h"
#include "merger.h"
#include <QMainWindow>
#include <QTextEdit>
#include <QLabel>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QMultiMap>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget* parent = 0);
~MainWindow();
static QTextEdit* log;
QList<Mod*> modListFull;
QList<Mod*> modListMergeable;
QMultiMap<QString, QString> conflicts;
Settings* settings;
Merger* merger;
signals:
void modsListChanged();
private slots:
// Buttons
void on_buttonMods_clicked();
void on_lineEditModsPath_textChanged(const QString& arg1);
void on_actionSettings_triggered();
void on_tableView_clicked(const QModelIndex& index);
void on_tableView_customContextMenuRequested(const QPoint& pos);
void on_treeWidget_customContextMenuRequested(const QPoint& pos);
void on_textEditLog_customContextMenuRequested(const QPoint& pos);
void on_buttonUp_clicked();
void on_buttonDown_clicked();
void on_buttonRecommended_clicked();
void on_buttonSelectAll_clicked();
void on_buttonDeselect_clicked();
void on_buttonConflicts_toggled(bool checked);
void on_buttonMerge_clicked();
void on_buttonUnmerge_clicked();
// Misc
void sendToLog(const QString& str);
void sendToStatusbar(const QString& str);
void installMergedPack();
void on_mergeFinished();
void openInExplorer() const;
void markAsHidden();
void on_dragAndDrop(int src, int dest);
void saveLogToFile();
private:
Ui::MainWindow* ui;
QDir modsFolder;
ModlistModel* model;
int currentRow;
int currentRowMenu;
// Status bar
QLabel* mergerLabel;
QLabel* reportLabel;
QLabel* processingLabel;
void readStoredSettings();
void writeStoredSettings();
void showReport();
void scanModsFolder();
void updateTableView();
void handleOrderButtons();
void handleControls();
void cleanWorkingDirs() const;
void checkForConflicts();
void refreshConflictsReport();
int indexByName(QString name) const;
void closeEvent(QCloseEvent* event);
};
#endif // MAINWINDOW_H