-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmainwindow.h
executable file
·178 lines (135 loc) · 4.53 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
/*
* Copyright © 2018 nastys
*
* This file is part of Title Switch.
* Title Switch is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Title Switch is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Title Switch. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTableWidgetItem>
#include <QMovie>
#include <QFile>
#include <QDesktopServices>
#include <QUrl>
#include <QFileDialog>
#include <QMessageBox>
#include <QDirIterator>
#include <QProcess>
#include <QThread>
#include <QStorageInfo>
#include <QTextStream>
#include <QDataStream>
#include <QByteArray>
#include <QCryptographicHash>
#include <QMimeData>
#include <QDragEnterEvent>
#include <QInputDialog>
void logappend(QString text);
void convNCA(QString input, QString output, QString titleid, QString name, QString titlekey="");
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void hourglass(bool show = true);
void swapHourglass(int anim = 1);
public slots:
void hideHourglass() {hourglass(false);}
void resetHourglassAnim();
void refreshTable() {fillTable();}
private slots:
void on_commandLinkButton_layeredfs_compatibility_clicked();
void on_comboBox_layeredfs_target_titleid_activated(int index);
void on_lineEdit_layeredfs_target_titleid_textEdited(const QString &arg1);
void openFile(QString file);
void on_pushButton_layeredfs_infile_browse_clicked();
void on_pushButton_autodetect_clicked();
void on_pushButton_layeredfs_browse_clicked();
void on_tableWidget_layeredfs_folders_itemDoubleClicked(QTableWidgetItem *item);
void on_pushButton_layeredfs_delete_clicked();
void on_commandLinkButton_settings_tools_xci2nca_clicked();
void on_commandLinkButton_layeredfs_start_clicked();
void on_commandLinkButton_settings_tools_makekeystxt_clicked();
void on_commandLinkButton_settings_tools_patchMainNpdm_clicked();
void on_commandLinkButton_settings_tools_saveLog_clicked();
void on_pushButton_layeredfs_setTarget_clicked();
void on_pushButton_settings_about_clicked();
void on_checkBox_layeredfs_patchingEnabled_stateChanged(int arg1);
void removeTempNCA();
void on_pushButton_layeredfs_explore_clicked();
void on_commandLinkButton_plague_compatibility_clicked();
void on_commandLinkButton_plague_start_clicked();
void on_pushButton_plague_explore_clicked();
void on_pushButton_plague_delete_clicked();
void on_commandLinkButton_plague_migrate_clicked();
void on_pushButton_layeredfs_rename_clicked();
void on_pushButton_plague_rename_clicked();
void on_pushButton_layeredfs_refresh_clicked();
void on_pushButton_plague_refresh_clicked();
private:
Ui::MainWindow *ui;
void fillTable();
void sd_browse(QString sd="");
bool toolsExist();
QString getNameByID(QString id);
QString getCustomTitleByID(QString id, QString path);
QMovie *hgmovie[3];
protected:
void dragEnterEvent(QDragEnterEvent *e);
void dropEvent(QDropEvent *e);
};
class XCIConverter : public QObject
{
Q_OBJECT
private:
QString input, output, ncaoutput, name, titleid, titlekey;
public:
XCIConverter() {}
~XCIConverter() {}
void setIn(QString in) {input=in;}
void setOut(QString out) {output=out;}
void setNCAout(QString ncaout="") {ncaoutput=ncaout;}
void setN(QString n="") {name=n;}
void setId(QString id="") {titleid=id;}
void setTitlekey(QString tkey="") {titlekey=tkey;}
public slots:
void process();
signals:
void finished();
void convFinished();
};
class NCAConverter : public QObject
{
Q_OBJECT
private:
QString input, output, name, titleid;
public:
NCAConverter() {}
~NCAConverter() {}
void setIn(QString in) {input=in;}
void setOut(QString out) {output=out;}
void setN(QString n) {name=n;}
void setId(QString id) {titleid=id;}
public slots:
void process();
signals:
void finished();
};
void patchNpdm(QString id, QString path);
#endif // MAINWINDOW_H