forked from Tails8521/WololoKingdoms
-
Notifications
You must be signed in to change notification settings - Fork 10
/
mainwindow.h
73 lines (62 loc) · 1.66 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
#pragma once
#include <QMainWindow>
#include <QMetaType>
#include <QProgressBar>
#include <QPushButton>
#include <fs.h>
namespace Ui {
class MainWindow;
}
Q_DECLARE_METATYPE(std::string)
class MainWindow : public QMainWindow {
Q_OBJECT
public slots:
void log(std::string logMessage);
void setInfo(std::string info);
void finished();
void createDialog(std::string info);
void createDialog(std::string info, std::string title);
void createDialog(std::string info, std::string toReplace,
std::string replaceWith);
void setProgress(int i);
void increaseProgress(int i);
QString translate(QString line);
public:
explicit MainWindow(QWidget* parent = 0, bool skipUpdater = false);
~MainWindow();
private:
fs::path steamPath;
fs::path hdPath;
fs::path outPath;
std::map<int,
std::tuple<std::string, std::string, std::string, int, std::string>>
dataModList;
std::string language = "en";
std::map<QString, QString> translation;
bool allowRun = true;
bool skipUpdater = false;
QProgressBar* bar = nullptr;
int dlcLevel;
int patch = -1;
std::string modName;
std::ofstream logFile;
fs::path vooblyDir;
fs::path upDir;
fs::path installDir;
fs::path nfzUpOutPath;
fs::path nfzVooblyOutPath;
std::string baseModName = "WololoKingdoms";
fs::path resourceDir;
Ui::MainWindow* ui;
void runConverter();
int initialize();
void setInstallDirectory(std::string directory);
void changeLanguage();
void setButtonWhatsThis(QPushButton* button, QString title);
void readDataModList();
bool checkSteamApi();
void readSettings();
void writeSettings();
void changeModPatch();
void updateUI();
};