guiscenemanager.h 776 B

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