MainWindow.hpp 947 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. // Include modules
  3. #include "OSGWidget.hpp"
  4. #include "NoMeshWidget.hpp"
  5. #include "EditWidget.hpp"
  6. #include "ProjectStore.hpp"
  7. #include "enums.hpp"
  8. // Include dependencies
  9. #include <QMainWindow>
  10. QT_BEGIN_NAMESPACE
  11. namespace Ui { class MainWindow; }
  12. QT_END_NAMESPACE
  13. class MainWindow: public QMainWindow {
  14. Q_OBJECT
  15. public:
  16. static MainWindow* getInstance();
  17. MainWindow(QWidget* parent = nullptr);
  18. ~MainWindow();
  19. void renderView(GuiView view);
  20. OSGWidget* getOsgWidget();
  21. ProjectStore* getStore();
  22. EditWidget* getEditWiget();
  23. private:
  24. void newFile();
  25. void load();
  26. bool save();
  27. bool saveAs();
  28. void close();
  29. void cleanup();
  30. bool saveChangesPopup();
  31. Ui::MainWindow* ui;
  32. OSGWidget* osgWidget;
  33. NoMeshWidget* noMeshWidget;
  34. EditWidget* editWidget;
  35. ProjectStore* projectStore;
  36. QMenu* fileMenu;
  37. QAction* newAct;
  38. QAction* loadAct;
  39. QAction* saveAct;
  40. QAction* saveAsAct;
  41. QAction* closeAct;
  42. };