guiscenemanager.h 762 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef INCLUDEGUIGUISCENEMANAGER_H
  2. #define INCLUDEGUIGUISCENEMANAGER_H
  3. #include <QObject>
  4. #include <QMainWindow>
  5. #include <QGridLayout>
  6. #include <map>
  7. class Scene;
  8. class GuiSceneManager : public QObject
  9. {
  10. Q_OBJECT
  11. private:
  12. explicit GuiSceneManager(QObject *parent = nullptr);
  13. ~GuiSceneManager();
  14. public:
  15. static GuiSceneManager& getInstance() {
  16. static GuiSceneManager instance;
  17. return instance;
  18. }
  19. bool registerScene(QString scene_name, Scene* name);
  20. bool changeScene(QString scene_name, QString args = "");
  21. private:
  22. std::map<QString, Scene*> scenes_;
  23. QString current_scene_;
  24. QMainWindow* window_;
  25. QGridLayout* window_layout_;
  26. signals:
  27. public slots:
  28. };
  29. #endif // INCLUDEGUIGUISCENEMANAGER_H