guiscenemanager.h 856 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef INCLUDEGUIGUISCENEMANAGER_H
  2. #define INCLUDEGUIGUISCENEMANAGER_H
  3. #include <QObject>
  4. #include <map>
  5. class GUI;
  6. class Scene;
  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. bool showDetachedScene(QString scene_name, QString args = "");
  21. bool hideDetachedScene(QString scene_name);
  22. bool hideMainWindow();
  23. bool showMainWindow();
  24. private:
  25. std::map<QString, Scene*> scenes_;
  26. QString current_scene_;
  27. GUI* gui_;
  28. signals:
  29. public slots:
  30. };
  31. #endif // INCLUDEGUIGUISCENEMANAGER_H