--- Vago/trunk/Vago/mainwindow.h 2016/09/17 13:32:34 1052 +++ Vago/trunk/Vago/mainwindow.h 2016/10/30 14:42:39 1058 @@ -7,8 +7,10 @@ #include "about.h" #include "packagewizard.h" #include "soundwizard.h" +#include "bgimagewizard.h" #include "converter.h" #include "droptablewidget.h" +#include "xmltoolsinterface.h" #include #include @@ -34,7 +36,6 @@ #endif #include "libs/pugixml/pugixml.hpp" -//#include namespace Ui { class MainWindow; @@ -53,6 +54,8 @@ protected: void closeEvent(QCloseEvent *event); private slots: + void applicationWasLoaded(); + void on_actionExit_triggered(); void on_actionAbout_triggered(); @@ -191,6 +194,12 @@ private slots: void on_actionProject5_triggered(); + void on_actionBackground_Image_Wizard_triggered(); + + void on_actionNew_Project_triggered(); + + void on_tbXmlToolsInterface_clicked(); + private: Ui::MainWindow *ui; Logger *myLogger; @@ -207,8 +216,8 @@ private: QLabel *itemsLoaded; QProgressBar *myBar; //Progress Bar QHash commandMap; //Map the commands for fast retreive - QStringList *listToProccess; //items to proccess - Converter *myConverter; + QStringList listToProccess; //items to proccess + Converter *myConverter = nullptr; QSettings *vagoSettings; static const QString VagoSettingsName; static constexpr int recentProjectsMaxSize=5; @@ -218,6 +227,12 @@ private: QWinTaskbarProgress *win7TaskBarProgress; QWinTaskbarButton *win7TaskBarButton; #endif + 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}; @@ -246,6 +261,7 @@ private: void addNewRecentProject(const QString &filePath); void reloadRecentProjectsMenu(); void showEvent(QShowEvent *e); + void rowsWereChangedInDropTableWidget(); QString getFileOutputFolder(QString fromTo, QString myOutputFolder=""); QString fileParsingXML(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); QString fileParsingTextures(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); @@ -263,9 +279,11 @@ private: DropTableWidget *getCurrentTableWidget(); DropTableWidget* getTableWidgetByTabName(const QString &tabName); QList getAllTableWidgets(); + QMessageBox::StandardButton askToSaveCurrentProject(); signals: void terminateCurrProcess(); + void signalAppIsLoaded(); }; #endif // MAINWINDOW_H