ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/s10k/Vago/mainwindow.h
(Generate patch)

Comparing Vago/trunk/Vago/mainwindow.h (file contents):
Revision 792 by s10k, Sat Apr 6 23:10:19 2013 UTC vs.
Revision 1052 by s10k, Sat Sep 17 13:32:34 2016 UTC

# Line 1 | Line 1
1   #ifndef MAINWINDOW_H
2   #define MAINWINDOW_H
3  
4 < #include "util.h"
4 > #include "utilvago.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>
12 #include <QSettings>
14   #include <QMessageBox>
15   #include <QProcess>
16   #include <QColor>
# Line 19 | Line 20
20   #include <QDesktopServices>
21   #include <QErrorMessage>
22   #include <QTextCodec>
22 #include <converter.h>
23   #include <QProgressBar>
24 #include <droptablewidget.h>
24   #include <QComboBox>
25   #include <QtNetwork/QNetworkAccessManager>
26   #include <QtNetwork/QNetworkRequest>
27   #include <QtNetwork/QNetworkReply>
29 #include <QDebug>
28   #include <QCloseEvent>
29   #include <QScriptEngine>
30   #include <QScriptValueIterator>
31 + #ifdef Q_OS_WIN
32 + #include <QWinTaskbarProgress>
33 + #include <QWinTaskbarButton>
34 + #endif
35 +
36 + #include "libs/pugixml/pugixml.hpp"
37 + //#include <QDebug>
38  
39   namespace Ui {
40   class MainWindow;
# Line 38 | Line 43 | class MainWindow;
43   class MainWindow : public QMainWindow
44   {
45      Q_OBJECT
46 <    
46 >
47   public:
48      explicit MainWindow(QWidget *parent = 0);
49  
50      ~MainWindow();
51  
52   protected:
53 <     void closeEvent(QCloseEvent *event);
54 <    
53 >    void closeEvent(QCloseEvent *event);
54 >
55   private slots:
56      void on_actionExit_triggered();
57  
# Line 64 | Line 69 | private slots:
69  
70      void on_actionCheck_For_Updates_triggered();
71  
72 <    void on_pbAddSourceGeneral_clicked();
72 >    void on_pbAddSourceXML_clicked();
73  
74 <    void on_pbConvertGeneral_clicked();
74 >    void on_pbConvert_clicked();
75  
76      void TsetupProgressBar(int max);
77  
# Line 74 | Line 79 | private slots:
79  
80      void TresultConversion(QString result, int numErrors);
81  
82 <    void on_cbFromGeneral_currentIndexChanged(const QString &arg1);
82 >    void TconversionAborted();
83  
84      void on_actionWindows_triggered();
85  
86      void on_actionMac_Windows_demo_triggered();
87  
88 <    void on_pbClearSourcesGeneral_clicked();
88 >    void on_pbClearSourcesXML_clicked();
89  
90 <    void on_pbRemoveSourceGeneral_clicked();
90 >    void on_pbRemoveSourceXML_clicked();
91  
92      void on_pbAddSourceTextures_clicked();
93  
# Line 92 | Line 97 | private slots:
97  
98      void on_cbFromTextures_currentIndexChanged(const QString &arg1);
99  
100 <    void on_cbFromModels_currentIndexChanged(const QString &arg1);
100 >    void on_cbFromObjects_currentIndexChanged(const QString &arg1);
101  
102      void on_cbFromLevels_currentIndexChanged(const QString &arg1);
103  
104      void on_cbFromMisc_currentIndexChanged(const QString &arg1);
105  
106 <    void on_pbAddSourceModels_clicked();
106 >    void on_pbAddSourceObjects_clicked();
107  
108      void on_pbAddSourceLevels_clicked();
109  
110      void on_pbAddSourceMisc_clicked();
111  
112 <    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();
112 >    void on_pbRemoveSourceObjects_clicked();
113  
114      void on_pbRemoveSourceLevels_clicked();
115  
116      void on_pbRemoveSourceMisc_clicked();
117  
118 <    void on_pbClearSourcesModels_clicked();
118 >    void on_pbClearSourcesObjects_clicked();
119  
120      void on_pbClearSourcesLevels_clicked();
121  
# Line 126 | Line 123 | private slots:
123  
124      void on_actionPreferences_triggered();
125  
129    void on_cbToGeneral_currentIndexChanged(const QString &arg1);
130
126      void on_cbToLevels_currentIndexChanged(const QString &arg1);
127  
133    void on_cbDatGeneral_toggled(bool checked);
134
128      void on_cbDatLevels_toggled(bool checked);
129  
130      void on_actionCheck_OniSplit_version_triggered();
# Line 140 | Line 133 | private slots:
133  
134      void dtContextMenu(DropTableWidget* myTable, QContextMenuEvent *event); //Context menu options for table widgets
135  
143    void on_cbTRAMGeneral_toggled(bool checked);
144
145    void on_tabWidget_selected(const QString &arg1);
146
136      void checkVagoLastVersion(QNetworkReply *result); //check vago last version
137  
138      void on_cbBnvLevels_toggled(bool checked);
# Line 158 | Line 147 | private slots:
147  
148      void on_actionView_log_triggered();
149  
150 <    void on_cbToModels_currentIndexChanged(const QString &arg1);
150 >    void on_actionAE_Package_Creator_triggered();
151 >
152 >    void on_cbFromCharacters_currentIndexChanged(const QString &arg1);
153 >
154 >    void on_pbAddSourceCharacters_clicked();
155 >
156 >    void on_pbRemoveSourceCharacters_clicked();
157 >
158 >    void on_pbClearSourcesCharacters_clicked();
159 >
160 >    void on_actionSound_Wizard_triggered();
161 >
162 >    void on_actionCheck_xmlTools_version_triggered();
163 >
164 >    void on_actionOpen_AE_folder_triggered();
165 >
166 >    void on_cbWithTRBS_ONCC_toggled(bool checked);
167  
168      void on_cbWithAnimation_toggled(bool checked);
169  
170 <    void on_actionAE_Package_Creator_triggered();
170 >    void on_cbFromXML_currentIndexChanged(const QString &arg1);
171  
172 <    void on_cbFromAnimations_currentIndexChanged(const QString &arg1);
172 >    void on_cbSpecificFilesLevels_toggled(bool checked);
173  
174 <    void on_cbCamera_toggled(bool checked);
174 >    void on_tbAbortConversion_clicked();
175  
176 <    void on_cbGeometry_toggled(bool checked);
176 >    void on_tabWidget_currentChanged(int);
177  
178 <    void on_pbConvertAnimations_clicked();
178 >    void on_actionSave_Project_triggered();
179  
180 <    void on_pbAddSourceAnimations_clicked();
180 >    void on_actionSave_triggered();
181  
182 <    void on_pbRemoveSourceAnimations_clicked();
182 >    void on_actionLoad_Project_triggered();
183  
184 <    void on_pbClearSourcesAnimations_clicked();
184 >    void on_actionProject1_triggered();
185  
186 <    void on_actionSound_Wizard_triggered();
186 >    void on_actionProject2_triggered();
187  
188 <    void on_actionCheck_xmlTools_version_triggered();
188 >    void on_actionProject3_triggered();
189 >
190 >    void on_actionProject4_triggered();
191 >
192 >    void on_actionProject5_triggered();
193  
194   private:
195      Ui::MainWindow *ui;
# Line 189 | Line 198 | private:
198      QString workspaceWizardsLocation; //Workspace wizard location
199      QString outputFolder; //Output folder
200      QString AeLocation; //Workspace location
201 +    QString lastProjectFilePath;
202 +    int startedWindowWidth;
203 +    int startedWindowHeight;
204 + #ifdef Q_OS_MAC
205 +    bool useYesAsDefaultWhenRemovingItems;
206 + #endif
207      QLabel *itemsLoaded;
208      QProgressBar *myBar; //Progress Bar
209      QHash<QString, QString> commandMap; //Map the commands for fast retreive
# Line 196 | Line 211 | private:
211      Converter *myConverter;
212      QSettings *vagoSettings;
213      static const QString VagoSettingsName;
214 +    static constexpr int recentProjectsMaxSize=5;
215 +    QList<QString> recentProjectsList;
216 + #ifdef Q_OS_WIN
217 +    // These are deleted automatically by the window (since button is attached to it)
218 +    QWinTaskbarProgress *win7TaskBarProgress;
219 +    QWinTaskbarButton *win7TaskBarButton;
220 + #endif
221 +
222 +    // anonymous enum
223 +    enum {XMLTabIndex, TexturesTabIndex, CharactersTabIndex, ObjectsTabIndex, LevelsTabIndex, MiscTabIndex};
224  
225      void connectSlots();
226      void showErrStatusMessage(QString message);
227      void showSuccessStatusMessage(QString message);
228      void mapCommands();
229 <    void addRowTable(DropTableWidget *myTable,QString file, QString fromTo, QString command);
229 >    void addRowTable(DropTableWidget *myTable, QString file, QString fromTo, QString command, bool isToDisabled=false);
230      void clearTableContents(DropTableWidget *myTable);
231 +    void clearTableNoPrompt(DropTableWidget *myTable);
232      void removeTableContents(DropTableWidget *myTable);
233 <    void updateComboBox(const QString &arg1, QComboBox *comboBox, const QString &identifier);
234 <    void startConversion(DropTableWidget *myTable);
233 >    void updateComboBox(const QString &arg1, QComboBox *comboBox);
234 >    void startConversion();
235      void updateItemsLoaded(DropTableWidget *currentTable);
236      void changeToCurrentSettings(QList<int> rows, DropTableWidget* myTable); //change some rows to the current settings
237      void changeItemsOutput(DropTableWidget* myTable, QList<int> rows, QString newOutput);
238      void setConverterButtonsSize();
239 +    void saveProjectState(const QString &filePath);
240 +    void saveProjectWidget(pugi::xml_node &rootNode, DropTableWidget* table);
241 +    void loadProjectState(const QString &filePath);
242 +    void setVagoWindowTitle();
243 +    void loadProjectWidget(pugi::xml_document &doc, DropTableWidget* table);
244 +    void saveRecentProjects();
245 +    void loadRecentProjects();
246 +    void addNewRecentProject(const QString &filePath);
247 +    void reloadRecentProjectsMenu();
248 +    void showEvent(QShowEvent *e);
249      QString getFileOutputFolder(QString fromTo, QString myOutputFolder="");
250 <    QString fileParsingGeneral(QString myOutputFolder, QString from, QString to , QString file);
251 <    QString fileParsingTextures(QString myOutputFolder, QString from, QString to , QString file);
252 <    QString fileParsingModels(QString myOutputFolder, QString from, QString to , QString file);
253 <    QString fileParsingAnimations(QString myOutputFolder, QString from, QString to , QString file);
254 <    QString fileParsingLevels(QString myOutputFolder, QString from, QString to , QString file);
250 >    QString fileParsingXML(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file);
251 >    QString fileParsingTextures(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file);
252 >    QString fileParsingObjects(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file);
253 >    QString fileParsingCharacters(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file);
254 >    QString fileParsingLevels(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file);
255      QString fileParsingMisc(QString myOutputFolder, QString from, QString to , QString file);
256      QString getCommand(DropTableWidget* myTable, QString myOutputFolder, QString from, QString to , QString file);
257      QString getTypeConversion(DropTableWidget *myTable); //get the current type for a table
258 +    QString getOSIndependentAppPath();
259 +    QString getTabNameByTableWidget(DropTableWidget* table);
260 +    QString getCurrentTabName();
261 +    QRadioButton* getTextureRBCheckedTypeTexture();
262 +    QRadioButton *getTextureRBTypeTextureByName(const QString &texType);
263 +    DropTableWidget *getCurrentTableWidget();
264 +    DropTableWidget* getTableWidgetByTabName(const QString &tabName);
265 +    QList<DropTableWidget*> getAllTableWidgets();
266 +
267 + signals:
268 +    void terminateCurrProcess();
269   };
270  
271   #endif // MAINWINDOW_H

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)