1 |
#ifndef MAINWINDOW_H |
2 |
#define MAINWINDOW_H |
3 |
|
4 |
#include "util.h" |
5 |
#include "preferences.h" |
6 |
#include "manualcommands.h" |
7 |
#include "about.h" |
8 |
#include "packagewizard.h" |
9 |
#include "soundwizard.h" |
10 |
#include "converter.h" |
11 |
#include "droptablewidget.h" |
12 |
|
13 |
#include <QMainWindow> |
14 |
#include <QSettings> |
15 |
#include <QMessageBox> |
16 |
#include <QProcess> |
17 |
#include <QColor> |
18 |
#include <QPalette> |
19 |
#include <QFileDialog> |
20 |
#include <QUrl> |
21 |
#include <QDesktopServices> |
22 |
#include <QErrorMessage> |
23 |
#include <QTextCodec> |
24 |
#include <QProgressBar> |
25 |
#include <QComboBox> |
26 |
#include <QtNetwork/QNetworkAccessManager> |
27 |
#include <QtNetwork/QNetworkRequest> |
28 |
#include <QtNetwork/QNetworkReply> |
29 |
#include <QCloseEvent> |
30 |
#include <QScriptEngine> |
31 |
#include <QScriptValueIterator> |
32 |
//#include <QDebug> |
33 |
|
34 |
namespace Ui { |
35 |
class MainWindow; |
36 |
} |
37 |
|
38 |
class MainWindow : public QMainWindow |
39 |
{ |
40 |
Q_OBJECT |
41 |
|
42 |
public: |
43 |
explicit MainWindow(QWidget *parent = 0); |
44 |
|
45 |
~MainWindow(); |
46 |
|
47 |
protected: |
48 |
void closeEvent(QCloseEvent *event); |
49 |
|
50 |
private slots: |
51 |
void on_actionExit_triggered(); |
52 |
|
53 |
void on_actionAbout_triggered(); |
54 |
|
55 |
void on_tbOni_clicked(); |
56 |
|
57 |
void on_tbAE_clicked(); |
58 |
|
59 |
void on_tbOpenFolder_clicked(); |
60 |
|
61 |
void on_cbEnvMap_toggled(bool checked); |
62 |
|
63 |
void on_cbTexture_toggled(bool checked); |
64 |
|
65 |
void on_actionCheck_For_Updates_triggered(); |
66 |
|
67 |
void on_pbAddSourceXML_clicked(); |
68 |
|
69 |
void on_pbConvertXML_clicked(); |
70 |
|
71 |
void TsetupProgressBar(int max); |
72 |
|
73 |
void TupdateProgressBar(); |
74 |
|
75 |
void TresultConversion(QString result, int numErrors); |
76 |
|
77 |
void TconversionAborted(); |
78 |
|
79 |
void on_actionWindows_triggered(); |
80 |
|
81 |
void on_actionMac_Windows_demo_triggered(); |
82 |
|
83 |
void on_pbClearSourcesXML_clicked(); |
84 |
|
85 |
void on_pbRemoveSourceXML_clicked(); |
86 |
|
87 |
void on_pbAddSourceTextures_clicked(); |
88 |
|
89 |
void on_pbRemoveSourceTextures_clicked(); |
90 |
|
91 |
void on_pbClearSourcesTextures_clicked(); |
92 |
|
93 |
void on_cbFromTextures_currentIndexChanged(const QString &arg1); |
94 |
|
95 |
void on_cbFromObjects_currentIndexChanged(const QString &arg1); |
96 |
|
97 |
void on_cbFromLevels_currentIndexChanged(const QString &arg1); |
98 |
|
99 |
void on_cbFromMisc_currentIndexChanged(const QString &arg1); |
100 |
|
101 |
void on_pbAddSourceObjects_clicked(); |
102 |
|
103 |
void on_pbAddSourceLevels_clicked(); |
104 |
|
105 |
void on_pbAddSourceMisc_clicked(); |
106 |
|
107 |
void on_pbConvertTextures_clicked(); |
108 |
|
109 |
void on_pbConvertObjects_clicked(); |
110 |
|
111 |
void on_pbConvertLevels_clicked(); |
112 |
|
113 |
void on_pbConvertMisc_clicked(); |
114 |
|
115 |
void on_pbRemoveSourceObjects_clicked(); |
116 |
|
117 |
void on_pbRemoveSourceLevels_clicked(); |
118 |
|
119 |
void on_pbRemoveSourceMisc_clicked(); |
120 |
|
121 |
void on_pbClearSourcesObjects_clicked(); |
122 |
|
123 |
void on_pbClearSourcesLevels_clicked(); |
124 |
|
125 |
void on_pbClearSourcesMisc_clicked(); |
126 |
|
127 |
void on_actionPreferences_triggered(); |
128 |
|
129 |
void on_cbToLevels_currentIndexChanged(const QString &arg1); |
130 |
|
131 |
void on_cbDatLevels_toggled(bool checked); |
132 |
|
133 |
void on_actionCheck_OniSplit_version_triggered(); |
134 |
|
135 |
void addFilesSource(DropTableWidget *myTable, QStringList files); //for drag 'n drop |
136 |
|
137 |
void dtContextMenu(DropTableWidget* myTable, QContextMenuEvent *event); //Context menu options for table widgets |
138 |
|
139 |
void checkVagoLastVersion(QNetworkReply *result); //check vago last version |
140 |
|
141 |
void on_cbBnvLevels_toggled(bool checked); |
142 |
|
143 |
void on_cbAdditionalSourcesLevels_toggled(bool checked); |
144 |
|
145 |
void on_tbCommand_clicked(); |
146 |
|
147 |
void on_actionWorkspace_triggered(); |
148 |
|
149 |
void on_actionOther_triggered(); |
150 |
|
151 |
void on_actionView_log_triggered(); |
152 |
|
153 |
void on_actionAE_Package_Creator_triggered(); |
154 |
|
155 |
void on_cbFromCharacters_currentIndexChanged(const QString &arg1); |
156 |
|
157 |
void on_pbConvertCharacters_clicked(); |
158 |
|
159 |
void on_pbAddSourceCharacters_clicked(); |
160 |
|
161 |
void on_pbRemoveSourceCharacters_clicked(); |
162 |
|
163 |
void on_pbClearSourcesCharacters_clicked(); |
164 |
|
165 |
void on_actionSound_Wizard_triggered(); |
166 |
|
167 |
void on_actionCheck_xmlTools_version_triggered(); |
168 |
|
169 |
void on_actionOpen_AE_folder_triggered(); |
170 |
|
171 |
void on_cbWithTRBS_ONCC_toggled(bool checked); |
172 |
|
173 |
void on_cbWithAnimation_toggled(bool checked); |
174 |
|
175 |
void on_cbFromXML_currentIndexChanged(const QString &arg1); |
176 |
|
177 |
void on_cbSpecificFilesLevels_toggled(bool checked); |
178 |
|
179 |
void on_tbAbortConversion_clicked(); |
180 |
|
181 |
void on_tabWidget_currentChanged(int index); |
182 |
|
183 |
private: |
184 |
Ui::MainWindow *ui; |
185 |
Logger *myLogger; |
186 |
QString workspaceLocation; //Workspace location |
187 |
QString workspaceWizardsLocation; //Workspace wizard location |
188 |
QString outputFolder; //Output folder |
189 |
QString AeLocation; //Workspace location |
190 |
int startedWindowWidth; |
191 |
int startedWindowHeight; |
192 |
#ifdef Q_OS_MAC |
193 |
bool useYesAsDefaultWhenRemovingItems; |
194 |
#endif |
195 |
QLabel *itemsLoaded; |
196 |
QProgressBar *myBar; //Progress Bar |
197 |
QHash<QString, QString> commandMap; //Map the commands for fast retreive |
198 |
QStringList *listToProccess; //items to proccess |
199 |
Converter *myConverter; |
200 |
QSettings *vagoSettings; |
201 |
static const QString VagoSettingsName; |
202 |
|
203 |
void connectSlots(); |
204 |
void showErrStatusMessage(QString message); |
205 |
void showSuccessStatusMessage(QString message); |
206 |
void mapCommands(); |
207 |
void addRowTable(DropTableWidget *myTable,QString file, QString fromTo, QString command); |
208 |
void clearTableContents(DropTableWidget *myTable); |
209 |
void removeTableContents(DropTableWidget *myTable); |
210 |
void updateComboBox(const QString &arg1, QComboBox *comboBox); |
211 |
void startConversion(DropTableWidget *myTable); |
212 |
void updateItemsLoaded(DropTableWidget *currentTable); |
213 |
void changeToCurrentSettings(QList<int> rows, DropTableWidget* myTable); //change some rows to the current settings |
214 |
void changeItemsOutput(DropTableWidget* myTable, QList<int> rows, QString newOutput); |
215 |
void setConverterButtonsSize(); |
216 |
QString getFileOutputFolder(QString fromTo, QString myOutputFolder=""); |
217 |
QString fileParsingXML(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); |
218 |
QString fileParsingTextures(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); |
219 |
QString fileParsingObjects(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); |
220 |
QString fileParsingCharacters(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); |
221 |
QString fileParsingLevels(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); |
222 |
QString fileParsingMisc(QString myOutputFolder, QString from, QString to , QString file); |
223 |
QString getCommand(DropTableWidget* myTable, QString myOutputFolder, QString from, QString to , QString file); |
224 |
QString getTypeConversion(DropTableWidget *myTable); //get the current type for a table |
225 |
QString getOSIndependentAppPath(); |
226 |
|
227 |
signals: |
228 |
void terminateCurrProcess(); |
229 |
}; |
230 |
|
231 |
#endif // MAINWINDOW_H |