--- Vago/trunk/Vago/mainwindow.h 2016/10/12 21:35:13 1054 +++ s10k/Vago/mainwindow.h 2017/12/30 13:57:32 1093 @@ -8,8 +8,11 @@ #include "packagewizard.h" #include "soundwizard.h" #include "bgimagewizard.h" +#include "wmwizard.h" #include "converter.h" -#include "droptablewidget.h" +#include "xmltoolsinterface.h" +#include "wizardfactory.h" +#include "xmlParsers/projectfilevago.h" #include #include @@ -29,14 +32,13 @@ #include #include #include +#include +#include #ifdef Q_OS_WIN #include #include #endif -#include "libs/pugixml/pugixml.hpp" -//#include - namespace Ui { class MainWindow; } @@ -168,8 +170,6 @@ private slots: void on_cbWithTRBS_ONCC_toggled(bool checked); - void on_cbWithAnimation_toggled(bool checked); - void on_cbFromXML_currentIndexChanged(const QString &arg1); void on_cbSpecificFilesLevels_toggled(bool checked); @@ -198,9 +198,14 @@ private slots: void on_actionNew_Project_triggered(); + void on_tbXmlToolsInterface_clicked(); + + void on_actionWindow_Messages_Wizard_triggered(); + + void on_cbWithAnimation_toggled(bool checked); + private: Ui::MainWindow *ui; - Logger *myLogger; QString workspaceLocation; //Workspace location QString workspaceWizardsLocation; //Workspace wizard location QString outputFolder; //Output folder @@ -214,7 +219,7 @@ private: QLabel *itemsLoaded; QProgressBar *myBar; //Progress Bar QHash commandMap; //Map the commands for fast retreive - QStringList *listToProccess; //items to proccess + QStringList listToProccess; //items to proccess Converter *myConverter = nullptr; QSettings *vagoSettings; static const QString VagoSettingsName; @@ -228,13 +233,15 @@ private: bool unsavedChangesExist = false; // Indicates that the application is fully loaded which includes painting the main window bool applicationIsFullyLoaded = false; + // This variable indicates that we have a project being loaded. It should only be set by MainWindow thread. + // It allow us to ignore certain gui slots like when checking checkbox that ask the user for input + bool projectIsLoading = false; // anonymous enum enum {XMLTabIndex, TexturesTabIndex, CharactersTabIndex, ObjectsTabIndex, LevelsTabIndex, MiscTabIndex}; +private: void connectSlots(); - void showErrStatusMessage(QString message); - void showSuccessStatusMessage(QString message); void mapCommands(); void addRowTable(DropTableWidget *myTable, QString file, QString fromTo, QString command, bool isToDisabled=false); void clearTableContents(DropTableWidget *myTable); @@ -247,10 +254,8 @@ private: void changeItemsOutput(DropTableWidget* myTable, QList rows, QString newOutput); void setConverterButtonsSize(); void saveProjectState(const QString &filePath); - void saveProjectWidget(pugi::xml_node &rootNode, DropTableWidget* table); void loadProjectState(const QString &filePath); void setVagoWindowTitle(); - void loadProjectWidget(pugi::xml_document &doc, DropTableWidget* table); void saveRecentProjects(); void loadRecentProjects(); void addNewRecentProject(const QString &filePath); @@ -275,6 +280,7 @@ private: DropTableWidget* getTableWidgetByTabName(const QString &tabName); QList getAllTableWidgets(); QMessageBox::StandardButton askToSaveCurrentProject(); + ProjectFileVago::ProjectData fetchCurrentProjectData(); signals: void terminateCurrProcess();