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 |
|
11 |
#include <QMainWindow> |
12 |
#include <QSettings> |
13 |
#include <QMessageBox> |
14 |
#include <QProcess> |
15 |
#include <QColor> |
16 |
#include <QPalette> |
17 |
#include <QFileDialog> |
18 |
#include <QUrl> |
19 |
#include <QDesktopServices> |
20 |
#include <QErrorMessage> |
21 |
#include <QTextCodec> |
22 |
#include <converter.h> |
23 |
#include <QProgressBar> |
24 |
#include <droptablewidget.h> |
25 |
#include <QComboBox> |
26 |
#include <QtNetwork/QNetworkAccessManager> |
27 |
#include <QtNetwork/QNetworkRequest> |
28 |
#include <QtNetwork/QNetworkReply> |
29 |
#include <QDebug> |
30 |
#include <QCloseEvent> |
31 |
#include <QScriptEngine> |
32 |
#include <QScriptValueIterator> |
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_pbAddSourceGeneral_clicked(); |
68 |
|
69 |
void on_pbConvertGeneral_clicked(); |
70 |
|
71 |
void TsetupProgressBar(int max); |
72 |
|
73 |
void TupdateProgressBar(); |
74 |
|
75 |
void TresultConversion(QString result, int numErrors); |
76 |
|
77 |
void on_cbFromGeneral_currentIndexChanged(const QString &arg1); |
78 |
|
79 |
void on_actionWindows_triggered(); |
80 |
|
81 |
void on_actionMac_Windows_demo_triggered(); |
82 |
|
83 |
void on_pbClearSourcesGeneral_clicked(); |
84 |
|
85 |
void on_pbRemoveSourceGeneral_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_cbFromModels_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_pbAddSourceModels_clicked(); |
102 |
|
103 |
void on_pbAddSourceLevels_clicked(); |
104 |
|
105 |
void on_pbAddSourceMisc_clicked(); |
106 |
|
107 |
void on_pbConvertTextures_clicked(); |
108 |
|
109 |
void on_pbConvertModels_clicked(); |
110 |
|
111 |
void on_pbConvertLevels_clicked(); |
112 |
|
113 |
void on_pbConvertMisc_clicked(); |
114 |
|
115 |
void on_pbRemoveSourceModels_clicked(); |
116 |
|
117 |
void on_pbRemoveSourceLevels_clicked(); |
118 |
|
119 |
void on_pbRemoveSourceMisc_clicked(); |
120 |
|
121 |
void on_pbClearSourcesModels_clicked(); |
122 |
|
123 |
void on_pbClearSourcesLevels_clicked(); |
124 |
|
125 |
void on_pbClearSourcesMisc_clicked(); |
126 |
|
127 |
void on_actionPreferences_triggered(); |
128 |
|
129 |
void on_cbToGeneral_currentIndexChanged(const QString &arg1); |
130 |
|
131 |
void on_cbToLevels_currentIndexChanged(const QString &arg1); |
132 |
|
133 |
void on_cbDatGeneral_toggled(bool checked); |
134 |
|
135 |
void on_cbDatLevels_toggled(bool checked); |
136 |
|
137 |
void on_actionCheck_OniSplit_version_triggered(); |
138 |
|
139 |
void addFilesSource(DropTableWidget *myTable, QStringList files); //for drag 'n drop |
140 |
|
141 |
void dtContextMenu(DropTableWidget* myTable, QContextMenuEvent *event); //Context menu options for table widgets |
142 |
|
143 |
void on_cbTRAMGeneral_toggled(bool checked); |
144 |
|
145 |
void on_tabWidget_selected(const QString &arg1); |
146 |
|
147 |
void checkVagoLastVersion(QNetworkReply *result); //check vago last version |
148 |
|
149 |
void on_cbBnvLevels_toggled(bool checked); |
150 |
|
151 |
void on_cbAdditionalSourcesLevels_toggled(bool checked); |
152 |
|
153 |
void on_tbCommand_clicked(); |
154 |
|
155 |
void on_actionWorkspace_triggered(); |
156 |
|
157 |
void on_actionOther_triggered(); |
158 |
|
159 |
void on_actionView_log_triggered(); |
160 |
|
161 |
void on_cbToModels_currentIndexChanged(const QString &arg1); |
162 |
|
163 |
void on_cbWithAnimation_toggled(bool checked); |
164 |
|
165 |
void on_actionAE_Package_Creator_triggered(); |
166 |
|
167 |
void on_cbFromAnimations_currentIndexChanged(const QString &arg1); |
168 |
|
169 |
void on_cbCamera_toggled(bool checked); |
170 |
|
171 |
void on_cbGeometry_toggled(bool checked); |
172 |
|
173 |
void on_pbConvertAnimations_clicked(); |
174 |
|
175 |
void on_pbAddSourceAnimations_clicked(); |
176 |
|
177 |
void on_pbRemoveSourceAnimations_clicked(); |
178 |
|
179 |
void on_pbClearSourcesAnimations_clicked(); |
180 |
|
181 |
void on_actionSound_Wizard_triggered(); |
182 |
|
183 |
void on_actionCheck_xmlTools_version_triggered(); |
184 |
|
185 |
private: |
186 |
Ui::MainWindow *ui; |
187 |
Logger *myLogger; |
188 |
QString workspaceLocation; //Workspace location |
189 |
QString workspaceWizardsLocation; //Workspace wizard location |
190 |
QString outputFolder; //Output folder |
191 |
QString AeLocation; //Workspace location |
192 |
QLabel *itemsLoaded; |
193 |
QProgressBar *myBar; //Progress Bar |
194 |
QHash<QString, QString> commandMap; //Map the commands for fast retreive |
195 |
QStringList *listToProccess; //items to proccess |
196 |
Converter *myConverter; |
197 |
QSettings *vagoSettings; |
198 |
static const QString VagoSettingsName; |
199 |
|
200 |
void connectSlots(); |
201 |
void showErrStatusMessage(QString message); |
202 |
void showSuccessStatusMessage(QString message); |
203 |
void mapCommands(); |
204 |
void addRowTable(DropTableWidget *myTable,QString file, QString fromTo, QString command); |
205 |
void clearTableContents(DropTableWidget *myTable); |
206 |
void removeTableContents(DropTableWidget *myTable); |
207 |
void updateComboBox(const QString &arg1, QComboBox *comboBox, const QString &identifier); |
208 |
void startConversion(DropTableWidget *myTable); |
209 |
void updateItemsLoaded(DropTableWidget *currentTable); |
210 |
void changeToCurrentSettings(QList<int> rows, DropTableWidget* myTable); //change some rows to the current settings |
211 |
void changeItemsOutput(DropTableWidget* myTable, QList<int> rows, QString newOutput); |
212 |
QString getFileOutputFolder(QString fromTo, QString myOutputFolder=""); |
213 |
QString fileParsingGeneral(QString myOutputFolder, QString from, QString to , QString file); |
214 |
QString fileParsingTextures(QString myOutputFolder, QString from, QString to , QString file); |
215 |
QString fileParsingModels(QString myOutputFolder, QString from, QString to , QString file); |
216 |
QString fileParsingAnimations(QString myOutputFolder, QString from, QString to , QString file); |
217 |
QString fileParsingLevels(QString myOutputFolder, QString from, QString to , QString file); |
218 |
QString fileParsingMisc(QString myOutputFolder, QString from, QString to , QString file); |
219 |
QString getCommand(DropTableWidget* myTable, QString myOutputFolder, QString from, QString to , QString file); |
220 |
QString getTypeConversion(DropTableWidget *myTable); //get the current type for a table |
221 |
}; |
222 |
|
223 |
#endif // MAINWINDOW_H |