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 1035 by s10k, Thu Mar 24 22:28:41 2016 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"
# Line 11 | Line 11
11   #include "droptablewidget.h"
12  
13   #include <QMainWindow>
14 #include <QSettings>
14   #include <QMessageBox>
15   #include <QProcess>
16   #include <QColor>
# Line 29 | Line 28
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 {
# 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  
# Line 46 | Line 51 | public:
51  
52   protected:
53      void closeEvent(QCloseEvent *event);
54 <    
54 >
55   private slots:
56      void on_actionExit_triggered();
57  
# Line 66 | Line 71 | private slots:
71  
72      void on_pbAddSourceXML_clicked();
73  
74 <    void on_pbConvertXML_clicked();
74 >    void on_pbConvert_clicked();
75  
76      void TsetupProgressBar(int max);
77  
# Line 104 | Line 109 | private slots:
109  
110      void on_pbAddSourceMisc_clicked();
111  
107    void on_pbConvertTextures_clicked();
108
109    void on_pbConvertObjects_clicked();
110
111    void on_pbConvertLevels_clicked();
112
113    void on_pbConvertMisc_clicked();
114
112      void on_pbRemoveSourceObjects_clicked();
113  
114      void on_pbRemoveSourceLevels_clicked();
# Line 154 | Line 151 | private slots:
151  
152      void on_cbFromCharacters_currentIndexChanged(const QString &arg1);
153  
157    void on_pbConvertCharacters_clicked();
158
154      void on_pbAddSourceCharacters_clicked();
155  
156      void on_pbRemoveSourceCharacters_clicked();
# Line 178 | Line 173 | private slots:
173  
174      void on_tbAbortConversion_clicked();
175  
176 <    void on_tabWidget_currentChanged(int index);
176 >    void on_tabWidget_currentChanged(int);
177 >
178 >    void on_actionSave_Project_triggered();
179 >
180 >    void on_actionSave_triggered();
181 >
182 >    void on_actionLoad_Project_triggered();
183 >
184 >    void on_actionProject1_triggered();
185 >
186 >    void on_actionProject2_triggered();
187 >
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 187 | 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
# Line 199 | 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);
234 <    void startConversion(DropTableWidget *myTable);
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 fileParsingXML(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file);
251      QString fileParsingTextures(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file);
# Line 223 | Line 256 | private:
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();

Diff Legend

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