-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmerger.h
61 lines (49 loc) · 1.23 KB
/
merger.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
#ifndef MERGER_H
#define MERGER_H
#include <QObject>
#include <QQueue>
#include <QProcess>
class Mod;
class Settings;
class Merger : public QObject
{
Q_OBJECT
public:
Merger(const QList<Mod*>& mods, const Settings* s, QObject* parent = 0);
~Merger();
bool isRunning = false;
bool nothingUncooked = true;
bool shouldPause = false;
void startMerging();
void prepare();
void uncookNext();
void deleteImages();
void cookAll();
void unpackAll();
void cacheBuild();
void packAll();
void generateMetadata();
void finish();
signals:
// Full process
void mergingStarted();
void startImagesDeleting();
void startCooking();
void mergingFinished();
//No cooking & cache
void skipCooking();
//Messaging
void toLog(QString message);
void toStatusbar(QString message);
private:
const QList<Mod*>& modList;
QList<Mod*> chosenMods;
QQueue<QStringList> uncookQueue;
const Settings* settings;
QProcess* wcc;
QStringList parseCmdArgs(QString cmd);
QStringList parseCmdArgs(QString cmd, QString path);
void processOutput();
void pause(QString message, QString folder, QString path, bool showNextTime);
};
#endif // MERGER_H