guiscenemanager.h 796 B

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